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