]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/Makefile.linux
30a3ac40de500653b20c1db1e9aeed3bec7151d8
[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
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) -c -m 444 pppd-radius.8 $(MANDIR)/man8
36         $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
37
38 radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
39         gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
40
41 radattr.so: radattr.o
42         gcc -o radattr.so -shared radattr.o
43
44 radius.o: radius.c
45         gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
46
47 radattr.o: radattr.c
48         gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
49
50 radiusclient/lib/.libs/libradiusclient.a:
51         test -r radiusclient/Makefile ||           \
52                 (cd radiusclient;                  \
53                  ./configure --prefix=/usr         \
54                              --sysconfdir=/etc     \
55                              --enable-shared       \
56                              --enable-static)
57         $(MAKE) -C radiusclient
58
59 clean:
60         $(MAKE) $(MFLAGS) -C radiusclient clean
61         rm -f *.o *.so
62
63 distclean:
64         rm -f *.o *.so
65         $(MAKE) $(MFLAGS) -C radiusclient distclean
66
67 dist-clean: distclean