]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/Makefile.linux
Simplified and cleaned up the radiusclient implementation, and
[ppp.git] / pppd / plugins / radius / Makefile.linux
1 # Makefile for RADIUS plugin
2 #
3 # Copyright 2002 Roaring Penguin Software Inc.
4 #
5
6 DESTDIR = @DESTDIR@
7 MANDIR = $(DESTDIR)/share/man/man8
8 LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
9
10 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
11
12 INSTALL = install
13
14 PLUGIN=radius.so radattr.so radrealms.so
15 CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
16
17 # Uncomment the next line to include support for Microsoft's
18 # MS-CHAP authentication protocol.
19 CHAPMS=y
20 # Uncomment the next line to include support for MPPE.
21 MPPE=y
22 # Uncomment the next lint to include support for traffic limiting
23 MAXOCTETS=y
24
25 ifdef CHAPMS
26 CFLAGS += -DCHAPMS=1
27 ifdef MPPE
28 CFLAGS += -DMPPE=1
29 endif
30 endif
31 ifdef MAXOCTETS
32 CFLAGS += -DMAXOCTETS=1
33 endif
34
35 all: $(PLUGIN)
36
37 install: all
38         $(INSTALL) -d -m 755 $(LIBDIR)
39         $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
40         $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
41         $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
42         $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
43         $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
44
45 radius.so: radius.o libradiusclient.a
46         $(CC) -o radius.so -shared radius.o libradiusclient.a
47
48 radattr.so: radattr.o
49         $(CC) -o radattr.so -shared radattr.o
50
51 radrealms.so: radrealms.o
52         $(CC) -o radrealms.so -shared radrealms.o
53
54 CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
55         clientid.o sendserver.o lock.o util.o md5.o
56 libradiusclient.a: $(CLIENTOBJS)
57         $(AR) rv $@ $?
58
59 clean:
60         rm -f *.o *.so *.a
61
62 distclean:
63         rm -f *.o *.so *.a
64
65 dist-clean: distclean