]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/Makefile.linux
Patch from Frank Cusack to make RADIUS plugin support MS-CHAP authentication.
[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../.. -Iradiusclient/include -O2
9
10 # Uncomment the next line to include support for Microsoft's
11 # MS-CHAP authentication protocol.
12 CHAPMS=y
13
14 ifdef CHAPMS
15 CFLAGS += -DCHAPMS=1
16 endif
17
18 all: $(PLUGIN)
19
20 install: all
21         $(MAKE) $(MFLAGS) -C radiusclient install
22         $(INSTALL) -d -m 755 $(LIBDIR)
23         $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
24         $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
25         $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)/man8
26         $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
27
28 radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
29         gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
30
31 radattr.so: radattr.o
32         gcc -o radattr.so -shared radattr.o
33
34 radius.o: radius.c
35         gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
36
37 radattr.o: radattr.c
38         gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
39
40 radiusclient/lib/.libs/libradiusclient.a:
41         test -r radiusclient/Makefile ||           \
42                 (cd radiusclient;                  \
43                  ./configure --prefix=/usr         \
44                              --sysconfdir=/etc     \
45                              --enable-shared       \
46                              --enable-static)
47         $(MAKE) -C radiusclient
48
49 clean:
50         $(MAKE) $(MFLAGS) -C radiusclient clean
51         rm -f *.o *.so
52
53 distclean:
54         rm -f *.o *.so
55         $(MAKE) $(MFLAGS) -C radiusclient distclean
56
57 dist-clean: distclean