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