1CC = gcc 2COPTS = -O2 -g 3CFLAGS = $(COPTS) -I.. -I../../include -fPIC 4LDFLAGS = -shared 5INSTALL = install 6 7DESTDIR = $(INSTROOT)@DESTDIR@ 8BINDIR = $(DESTDIR)/sbin 9MANDIR = $(DESTDIR)/share/man/man8 10LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION) 11 12SUBDIRS := rp-pppoe pppoatm 13# Uncomment the next line to include the radius authentication plugin 14SUBDIRS += radius 15PLUGINS := minconn.so passprompt.so passwordfd.so winbind.so 16 17# include dependencies if present 18ifeq (.depend,$(wildcard .depend)) 19include .depend 20endif 21 22all: $(PLUGINS) 23 for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done 24 25%.so: %.c 26 $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ 27 28VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h) 29 30install: $(PLUGINS) 31 $(INSTALL) -d $(LIBDIR) 32 $(INSTALL) $? $(LIBDIR) 33 for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d install; done 34 35clean: 36 rm -f *.o *.so *.a 37 for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done 38 39depend: 40 $(CPP) -M $(CFLAGS) *.c >.depend 41 for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done 42