X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fplugins%2Fradius%2FMakefile.linux;h=e7022636906d8219d75165fda6ffccda695c9fe0;hp=1fa7ff9730e1c95787030f41301110faaee64d97;hb=a96702158e72c0d527a146940b983a366dbce464;hpb=d95598c16f6a3feb4846db669601856bad15bb74 diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux index 1fa7ff9..e702263 100644 --- a/pppd/plugins/radius/Makefile.linux +++ b/pppd/plugins/radius/Makefile.linux @@ -3,47 +3,63 @@ # Copyright 2002 Roaring Penguin Software Inc. # -MANDIR=/usr/man -PLUGIN=radius.so radattr.so -CFLAGS=-I../.. -Iradiusclient/include -O2 +DESTDIR = $(INSTROOT)@DESTDIR@ +MANDIR = $(DESTDIR)/share/man/man8 +LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION) + +VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) + +INSTALL = install + +PLUGIN=radius.so radattr.so radrealms.so +CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON + +# Uncomment the next line to include support for Microsoft's +# MS-CHAP authentication protocol. +CHAPMS=y +# Uncomment the next line to include support for MPPE. +MPPE=y +# Uncomment the next lint to include support for traffic limiting +MAXOCTETS=y + +ifdef CHAPMS +CFLAGS += -DCHAPMS=1 +ifdef MPPE +CFLAGS += -DMPPE=1 +endif +endif +ifdef MAXOCTETS +CFLAGS += -DMAXOCTETS=1 +endif all: $(PLUGIN) install: all - $(MAKE) $(MFLAGS) -C radiusclient install $(INSTALL) -d -m 755 $(LIBDIR) $(INSTALL) -s -c -m 755 radius.so $(LIBDIR) $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR) - $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)/man8 - $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8 + $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR) + $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR) + $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR) -radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o - gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a +radius.so: radius.o libradiusclient.a + $(CC) $(LDFLAGS) -o radius.so -shared radius.o libradiusclient.a radattr.so: radattr.o - gcc -o radattr.so -shared radattr.o - -radius.o: radius.c - gcc $(CFLAGS) -c -o radius.o -fPIC radius.c + $(CC) $(LDFLAGS) -o radattr.so -shared radattr.o -radattr.o: radattr.c - gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c +radrealms.so: radrealms.o + $(CC) $(LDFLAGS) -o radrealms.so -shared radrealms.o -radiusclient/lib/.libs/libradiusclient.a: - test -r radiusclient/Makefile || \ - (cd radiusclient; \ - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --enable-shared \ - --enable-static) - $(MAKE) -C radiusclient +CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \ + clientid.o sendserver.o lock.o util.o md5.o +libradiusclient.a: $(CLIENTOBJS) + $(AR) rv $@ $? clean: - $(MAKE) $(MFLAGS) -C radiusclient clean - rm -f *.o *.so + rm -f *.o *.so *.a distclean: - rm -f *.o *.so - $(MAKE) $(MFLAGS) -C radiusclient distclean + rm -f *.o *.so *.a dist-clean: distclean