]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/Makefile.linux
05a8730d0ca873b164812523f65ade47c0b4b7db
[ppp.git] / pppd / plugins / radius / Makefile.linux
1 # Makefile for RADIUS plugin
2 #
3 # Copyright 2002 Roaring Penguin Software Inc.
4 #
5
6 DESTDIR = @DESTDIR@
7 MANDIR = $(DESTDIR)/share/man/man8
8 LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
9
10 INSTALL = install
11
12 PLUGIN=radius.so radattr.so radrealms.so
13 CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2
14
15 # Uncomment the next line to include support for Microsoft's
16 # MS-CHAP authentication protocol.
17 CHAPMS=y
18 # Uncomment the next line to include support for MPPE.
19 MPPE=y
20 # Uncomment the next lint to include support for traffic limiting
21 MAXOCTETS=y
22
23 ifdef CHAPMS
24 CFLAGS += -DCHAPMS=1
25 ifdef MPPE
26 CFLAGS += -DMPPE=1
27 endif
28 endif
29 ifdef MAXOCTETS
30 CFLAGS += -DMAXOCTETS=1
31 endif
32
33 all: $(PLUGIN)
34
35 install: all
36         $(MAKE) $(MFLAGS) -C radiusclient install
37         $(INSTALL) -d -m 755 $(LIBDIR)
38         $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
39         $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
40         $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
41         $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
42         $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
43
44 radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
45         gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
46
47 radattr.so: radattr.o
48         gcc -o radattr.so -shared radattr.o
49
50 radrealms.so: radrealms.o
51         gcc -o radrealms.so -shared radrealms.o
52
53 radius.o: radius.c
54         gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
55
56 radattr.o: radattr.c
57         gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
58
59 radrealms.o: radrealms.c
60         gcc $(CFLAGS) -c -o radrealms.o -fPIC radrealms.c
61
62 radiusclient/lib/.libs/libradiusclient.a:
63         test -r radiusclient/Makefile ||            \
64                 (cd radiusclient;                   \
65                  ./configure --prefix=@PREFIX@      \
66                              --sysconfdir=@SYSCONF@ \
67                              --enable-shared        \
68                              --enable-static)
69         $(MAKE) -C radiusclient
70
71 clean:
72         $(MAKE) $(MFLAGS) -C radiusclient clean
73         rm -f *.o *.so
74
75 distclean:
76         rm -f *.o *.so
77         $(MAKE) $(MFLAGS) -C radiusclient distclean
78
79 dist-clean: distclean