summaryrefslogtreecommitdiff
path: root/package/ppp/patches/patch-pppd_plugins_radius_Makefile_linux
diff options
context:
space:
mode:
Diffstat (limited to 'package/ppp/patches/patch-pppd_plugins_radius_Makefile_linux')
-rw-r--r--package/ppp/patches/patch-pppd_plugins_radius_Makefile_linux88
1 files changed, 62 insertions, 26 deletions
diff --git a/package/ppp/patches/patch-pppd_plugins_radius_Makefile_linux b/package/ppp/patches/patch-pppd_plugins_radius_Makefile_linux
index d01aeb86c..4c7123243 100644
--- a/package/ppp/patches/patch-pppd_plugins_radius_Makefile_linux
+++ b/package/ppp/patches/patch-pppd_plugins_radius_Makefile_linux
@@ -1,58 +1,94 @@
--- ppp-2.4.5.orig/pppd/plugins/radius/Makefile.linux 2009-11-16 23:26:07.000000000 +0100
-+++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2011-01-16 21:35:47.000000000 +0100
-@@ -1,18 +1,14 @@
++++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2011-01-21 21:29:58.278658282 +0100
+@@ -1,18 +1,20 @@
# Makefile for RADIUS plugin
- #
- # Copyright 2002 Roaring Penguin Software Inc.
-#
+ # Copyright 2002 Roaring Penguin Software Inc.
+ #
-DESTDIR = $(INSTROOT)@DESTDIR@
-MANDIR = $(DESTDIR)/share/man/man8
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
-+include ../../../makedefs.linux
-
--VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-+CPPFLAGS+=-I. -I../.. -I../../../include -DRC_LOG_FACILITY=LOG_DAEMON
+-
+ VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-INSTALL = install
-+VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
++include ../../../Makedefs.com
- PLUGIN=radius.so radattr.so radrealms.so
+-PLUGIN=radius.so radattr.so radrealms.so
-CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
++CPPFLAGS += -I. -I../.. -I../../../include -DRC_LOG_FACILITY=LOG_DAEMON
++ifeq (,$(filter -fPIC,$(CFLAGS)))
++CFLAGS += -fPIC
++endif
++ifeq (,$(filter -shared,$(LDFLAGS)))
++LDFLAGS += -shared
++endif
++
++PLUGINS = radius.so radattr.so radrealms.so
# Uncomment the next line to include support for Microsoft's
# MS-CHAP authentication protocol.
-@@ -36,25 +32,26 @@ all: $(PLUGIN)
+@@ -23,43 +25,40 @@ MPPE=y
+ MAXOCTETS=y
+
+ ifdef CHAPMS
+-CFLAGS += -DCHAPMS=1
++CPPFLAGS += -DCHAPMS=1
+ ifdef MPPE
+-CFLAGS += -DMPPE=1
++CPPFLAGS += -DMPPE=1
+ endif
+ endif
+ ifdef MAXOCTETS
+-CFLAGS += -DMAXOCTETS=1
++CPPFLAGS += -DMAXOCTETS=1
+ endif
+
+-all: $(PLUGIN)
++CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
++ clientid.o sendserver.o lock.o util.o md5.o
- install: all
- $(INSTALL) -d -m 755 $(LIBDIR)
+-install: all
+- $(INSTALL) -d -m 755 $(LIBDIR)
- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
-+ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
-+ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
-+ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
- $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
- $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
+- $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
+- $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
++all: $(PLUGINS)
radius.so: radius.o libradiusclient.a
- $(CC) -o radius.so -shared radius.o libradiusclient.a
-+ $(CC) $(LDFLAGS) -o radius.so radius.o libradiusclient.a
++ $(CC) $(LDFLAGS) -o $@ $^
radattr.so: radattr.o
- $(CC) -o radattr.so -shared radattr.o
-+ $(CC) $(LDFLAGS) -o radattr.so radattr.o
++ $(CC) $(LDFLAGS) -o $@ $^
radrealms.so: radrealms.o
- $(CC) -o radrealms.so -shared radrealms.o
-+ $(CC) $(LDFLAGS) -o radrealms.so radrealms.o
++ $(CC) $(LDFLAGS) -o $@ $^
- CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
- clientid.o sendserver.o lock.o util.o md5.o
-+
+-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 $@ $?
-+ $(TARGET_AR) rcsv $@ $?
++ $(AR) $(ARFLAGS) $@ $?
+
+-clean:
+- rm -f *.o *.so *.a
++install: $(PLUGINS)
++ $(INSTALL) -d -m 755 $(LIBDIR)
++ $(INSTALL) -d -m 755 $(MANDIR)
++ $(INSTALL) $(STRIP) -c -m 755 radius.so $(LIBDIR)
++ $(INSTALL) $(STRIP) -c -m 755 radattr.so $(LIBDIR)
++ $(INSTALL) $(STRIP) -c -m 755 radrealms.so $(LIBDIR)
++ $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
++ $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
- clean:
+-distclean:
++clean:
rm -f *.o *.so *.a
+-
+-dist-clean: distclean