]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/radius/Makefile.linux
Add --prefix and --sysconfdir options to configure, and put
[ppp.git] / pppd / plugins / radius / Makefile.linux
index 30fcb7aad425783069f86525310ae3f9fd28a6f9..96d5c78265a2da950af7b662e204205fdf5c7d43 100644 (file)
@@ -3,16 +3,31 @@
 # Copyright 2002 Roaring Penguin Software Inc.
 #
 
-MANDIR=/usr/man
-PLUGIN=radius.so radattr.so
-CFLAGS=-I../.. -Iradiusclient/include -O2
+DESTDIR = @DESTDIR@
+MANDIR = $(DESTDIR)/man/man8
+LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+
+INSTALL        = install -o root
+
+PLUGIN=radius.so radattr.so radrealms.so
+CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2
 
 # 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)
@@ -22,8 +37,9 @@ install: all
        $(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
@@ -31,18 +47,24 @@ radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
 radattr.so: radattr.o
        gcc -o radattr.so -shared radattr.o
 
+radrealms.so: radrealms.o
+       gcc -o radrealms.so -shared radrealms.o
+
 radius.o: radius.c
        gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
 
 radattr.o: radattr.c
        gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
 
+radrealms.o: radrealms.c
+       gcc $(CFLAGS) -c -o radrealms.o -fPIC radrealms.c
+
 radiusclient/lib/.libs/libradiusclient.a:
-       test -r radiusclient/Makefile ||           \
-               (cd radiusclient;                  \
-                ./configure --prefix=/usr         \
-                            --sysconfdir=/etc     \
-                            --enable-shared       \
+       test -r radiusclient/Makefile ||            \
+               (cd radiusclient;                   \
+                ./configure --prefix=@PREFIX@      \
+                            --sysconfdir=@SYSCONF@ \
+                            --enable-shared        \
                             --enable-static)
        $(MAKE) -C radiusclient