1# Makefile for RADIUS plugin 2# 3# Copyright 2002 Roaring Penguin Software Inc. 4# 5 6DESTDIR = $(INSTROOT)@DESTDIR@ 7MANDIR = $(DESTDIR)/share/man/man8 8LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION) 9 10VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) 11 12INSTALL = install 13 14PLUGIN=radius.so radattr.so radrealms.so 15CFLAGS=-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. 19CHAPMS=y 20# Uncomment the next line to include support for MPPE. 21MPPE=y 22# Uncomment the next lint to include support for traffic limiting 23MAXOCTETS=y 24 25ifdef CHAPMS 26CFLAGS += -DCHAPMS=1 27ifdef MPPE 28CFLAGS += -DMPPE=1 29endif 30endif 31ifdef MAXOCTETS 32CFLAGS += -DMAXOCTETS=1 33endif 34 35all: $(PLUGIN) 36 37install: 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 45radius.so: radius.o libradiusclient.a 46 $(CC) -o radius.so -shared radius.o libradiusclient.a 47 48radattr.so: radattr.o 49 $(CC) -o radattr.so -shared radattr.o 50 51radrealms.so: radrealms.o 52 $(CC) -o radrealms.so -shared radrealms.o 53 54CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \ 55 clientid.o sendserver.o lock.o util.o md5.o 56libradiusclient.a: $(CLIENTOBJS) 57 $(AR) rv $@ $? 58 59clean: 60 rm -f *.o *.so *.a 61 62distclean: 63 rm -f *.o *.so *.a 64 65dist-clean: distclean 66