]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/Makefile.linux
Remove references to the old CHAP code.
[ppp.git] / pppd / plugins / Makefile.linux
1 CC      = gcc
2 CFLAGS  = -g -O2 -I.. -I../../include -fPIC
3 LDFLAGS = -shared
4 INSTALL = install -o root
5
6 SUBDIRS := rp-pppoe
7 # Uncomment the next line to include the radius authentication plugin
8 # SUBDIRS += radius
9 PLUGINS := minconn.so passprompt.so passwordfd.so
10
11 # include dependencies if present
12 ifeq (.depend,$(wildcard .depend))
13 include .depend
14 endif
15
16 all:    $(PLUGINS)
17         for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
18
19 %.so: %.c
20         $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
21
22 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
23 LIBDIR  = $(DESTDIR)/usr/lib/pppd/$(VERSION)
24
25 install: $(PLUGINS)
26         $(INSTALL) -d $(LIBDIR)
27         $(INSTALL) $? $(LIBDIR)
28         for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d INSTALL=$(INSTALL) \
29                                 LIBDIR=$(LIBDIR) install; done
30
31 clean:
32         rm -f *.o *.so *.a
33         for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
34
35 depend:
36         $(CPP) -M $(CFLAGS) *.c >.depend
37         for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done