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