]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/Makefile.linux
Allow overriding the optimization level with CFLAGS (#197)
[ppp.git] / pppd / plugins / radius / Makefile.linux
1 # Makefile for RADIUS plugin
2 #
3 # Copyright 2002 Roaring Penguin Software Inc.
4 #
5
6 DESTDIR = $(INSTROOT)@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 ?= -O2
16 CFLAGS += -I. -I../.. -I../../../include -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
17
18 # Uncomment the next line to include support for Microsoft's
19 # MS-CHAP authentication protocol.
20 CHAPMS=y
21 # Uncomment the next line to include support for MPPE.
22 MPPE=y
23 # Uncomment the next lint to include support for traffic limiting
24 MAXOCTETS=y
25
26 ifdef CHAPMS
27 CFLAGS += -DCHAPMS=1
28 ifdef MPPE
29 CFLAGS += -DMPPE=1
30 endif
31 endif
32 ifdef MAXOCTETS
33 CFLAGS += -DMAXOCTETS=1
34 endif
35
36 all: $(PLUGIN)
37
38 install: all
39         $(INSTALL) -d -m 755 $(LIBDIR)
40         $(INSTALL) -c -m 755 radius.so $(LIBDIR)
41         $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
42         $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
43         $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
44         $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
45
46 radius.so: radius.o libradiusclient.a
47         $(CC) $(LDFLAGS) -o radius.so -shared radius.o libradiusclient.a
48
49 radattr.so: radattr.o
50         $(CC) $(LDFLAGS) -o radattr.so -shared radattr.o
51
52 radrealms.so: radrealms.o
53         $(CC) $(LDFLAGS) -o radrealms.so -shared radrealms.o
54
55 CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
56         clientid.o sendserver.o lock.o util.o md5.o
57 libradiusclient.a: $(CLIENTOBJS)
58         $(AR) rv $@ $?
59
60 clean:
61         rm -f *.o *.so *.a
62
63 distclean:
64         rm -f *.o *.so *.a
65
66 dist-clean: distclean