Added radius_pre_auth_hook to let additional plugins stacked on top
[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 all: $(PLUGIN)
11
12 install: all
13         $(MAKE) $(MFLAGS) -C radiusclient install
14         $(INSTALL) -d -m 755 $(LIBDIR)
15         $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
16         $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
17         $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)/man8
18         $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
19
20 radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
21         gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
22
23 radattr.so: radattr.o
24         gcc -o radattr.so -shared radattr.o
25
26 radius.o: radius.c
27         gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
28
29 radattr.o: radattr.c
30         gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
31
32 radiusclient/lib/.libs/libradiusclient.a:
33         test -r radiusclient/Makefile ||           \
34                 (cd radiusclient;                  \
35                  ./configure --prefix=/usr         \
36                              --sysconfdir=/etc     \
37                              --enable-shared       \
38                              --enable-static)
39         $(MAKE) -C radiusclient
40
41 clean:
42         $(MAKE) $(MFLAGS) -C radiusclient clean
43         rm -f *.o *.so
44
45 distclean:
46         rm -f *.o *.so
47         $(MAKE) $(MFLAGS) -C radiusclient distclean
48
49 dist-clean: distclean