X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=pppd%2Fplugins%2FMakefile.linux;h=b52f284278008247a74935b64e12c293393c9240;hb=910e26074b507e492c5f31923e0b57c8e4c97db5;hp=1c99dc00cfd0f549f258aa033d42a5003a61a1c1;hpb=95d719f47943c479df4d7bf13eb928567392166d;p=ppp.git diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux index 1c99dc0..b52f284 100644 --- a/pppd/plugins/Makefile.linux +++ b/pppd/plugins/Makefile.linux @@ -1,11 +1,41 @@ CC = gcc -CFLAGS = -g -O2 -I.. -I../../include +COPTS = -O2 -g +CFLAGS = $(COPTS) -I.. -I../../include -fPIC LDFLAGS = -shared +INSTALL = install -all: minconn.so passprompt.so +DESTDIR = @DESTDIR@ +BINDIR = $(DESTDIR)/sbin +MANDIR = $(DESTDIR)/share/man/man8 +LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION) -minconn.so: minconn.c - $(CC) -o $@ $(LDFLAGS) $(CFLAGS) minconn.c +SUBDIRS := rp-pppoe pppoatm radius +# Uncomment the next line to include the radius authentication plugin +# SUBDIRS += radius +PLUGINS := minconn.so passprompt.so passwordfd.so winbind.so -passprompt.so: passprompt.c - $(CC) -o $@ $(LDFLAGS) $(CFLAGS) passprompt.c +# include dependencies if present +ifeq (.depend,$(wildcard .depend)) +include .depend +endif + +all: $(PLUGINS) + for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done + +%.so: %.c + $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ + +VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h) + +install: $(PLUGINS) + $(INSTALL) -d $(LIBDIR) + $(INSTALL) $? $(LIBDIR) + for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d install; done + +clean: + rm -f *.o *.so *.a + for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done + +depend: + $(CPP) -M $(CFLAGS) *.c >.depend + for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done