2 CFLAGS = -g -O2 -I.. -I../../include -D_linux_=1 -fPIC
4 INSTALL = install -o root
6 SUBDIRS = rp-pppoe radius
7 PLUGINS = minconn.so passprompt.so passwordfd.so
9 # include dependencies if present
10 ifeq (.depend,$(wildcard .depend))
15 for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
18 $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
20 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
21 LIBDIR = $(DESTDIR)/usr/lib/pppd/$(VERSION)
24 $(INSTALL) -d $(LIBDIR)
25 $(INSTALL) $? $(LIBDIR)
26 for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d INSTALL=$(INSTALL) \
27 LIBDIR=$(LIBDIR) install; done
31 for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
34 $(CPP) -M $(CFLAGS) *.c >.depend
35 for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done