]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/Makefile.linux
Patches from Frank Cusack:
[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
16 ifdef CHAPMS
17 CFLAGS += -DCHAPMS=1
18 ifdef MPPE
19 CFLAGS += -DMPPE=1
20 endif
21 endif
22
23 all: $(PLUGIN)
24
25 install: all
26         $(MAKE) $(MFLAGS) -C radiusclient install
27         $(INSTALL) -d -m 755 $(LIBDIR)
28         $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
29         $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
30         $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)/man8
31         $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
32
33 radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
34         gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
35
36 radattr.so: radattr.o
37         gcc -o radattr.so -shared radattr.o
38
39 radius.o: radius.c
40         gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
41
42 radattr.o: radattr.c
43         gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
44
45 radiusclient/lib/.libs/libradiusclient.a:
46         test -r radiusclient/Makefile ||           \
47                 (cd radiusclient;                  \
48                  ./configure --prefix=/usr         \
49                              --sysconfdir=/etc     \
50                              --enable-shared       \
51                              --enable-static)
52         $(MAKE) -C radiusclient
53
54 clean:
55         $(MAKE) $(MFLAGS) -C radiusclient clean
56         rm -f *.o *.so
57
58 distclean:
59         rm -f *.o *.so
60         $(MAKE) $(MFLAGS) -C radiusclient distclean
61
62 dist-clean: distclean