• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#CC	= 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 pppol2tp
13# Uncomment the next line to include the radius authentication plugin
14SUBDIRS += radius
15PLUGINS := minconn.so passprompt.so passwordfd.so winbind.so
16
17# This setting should match the one in ../Makefile.linux
18MPPE=y
19
20ifdef MPPE
21CFLAGS   += -DMPPE=1
22endif
23
24# include dependencies if present
25ifeq (.depend,$(wildcard .depend))
26include .depend
27endif
28
29all:	$(PLUGINS)
30	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
31
32%.so: %.c
33	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
34
35VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
36
37install: $(PLUGINS)
38	$(INSTALL) -d $(LIBDIR)
39	$(INSTALL) $? $(LIBDIR)
40	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d install; done
41
42clean:
43	rm -f *.o *.so *.a
44	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
45
46depend:
47	$(CPP) -M $(CFLAGS) *.c >.depend
48	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done
49