2020-10-14 23:30:44 +00:00
|
|
|
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
index 6a4b897..8f29c1f 100644
|
2020-10-14 23:30:44 +00:00
|
|
|
--- a/pppd/Makefile.linux
|
|
|
|
+++ b/pppd/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
@@ -12,6 +12,7 @@ DESTDIR = $(INSTROOT)@DESTDIR@
|
2020-10-14 23:30:44 +00:00
|
|
|
BINDIR = $(DESTDIR)/sbin
|
|
|
|
MANDIR = $(DESTDIR)/share/man/man8
|
|
|
|
INCDIR = $(DESTDIR)/include
|
|
|
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)
|
|
|
|
|
|
|
|
TARGETS = pppd
|
|
|
|
|
2021-01-05 21:57:18 +00:00
|
|
|
@@ -93,7 +94,7 @@ INCLUDE_DIRS= -I../include
|
2020-10-14 23:30:44 +00:00
|
|
|
|
2021-01-05 21:57:18 +00:00
|
|
|
COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -pipe
|
2020-10-14 23:30:44 +00:00
|
|
|
|
2021-01-05 21:57:18 +00:00
|
|
|
-CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
|
|
|
|
+CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"' -DLIBDIR=\""$(LIBDIR)"\"
|
|
|
|
|
|
|
|
ifdef CHAPMS
|
|
|
|
CFLAGS += -DCHAPMS=1
|
2020-10-14 23:30:44 +00:00
|
|
|
diff --git a/pppd/pathnames.h b/pppd/pathnames.h
|
2021-01-05 21:57:18 +00:00
|
|
|
index 524d608..c7eadbb 100644
|
2020-10-14 23:30:44 +00:00
|
|
|
--- a/pppd/pathnames.h
|
|
|
|
+++ b/pppd/pathnames.h
|
2021-01-05 21:57:18 +00:00
|
|
|
@@ -62,7 +62,7 @@
|
2020-10-14 23:30:44 +00:00
|
|
|
|
|
|
|
#ifdef PLUGIN
|
|
|
|
#ifdef __STDC__
|
|
|
|
-#define _PATH_PLUGIN DESTDIR "/lib/pppd/" VERSION
|
|
|
|
+#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION
|
|
|
|
#else /* __STDC__ */
|
|
|
|
#define _PATH_PLUGIN "/usr/lib/pppd"
|
|
|
|
#endif /* __STDC__ */
|
|
|
|
diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
index 6403e3d..f42d18c 100644
|
2020-10-14 23:30:44 +00:00
|
|
|
--- a/pppd/plugins/Makefile.linux
|
|
|
|
+++ b/pppd/plugins/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
@@ -5,7 +5,7 @@ COPTS=@CFLAGS@
|
2020-10-14 23:30:44 +00:00
|
|
|
DESTDIR = $(INSTROOT)@DESTDIR@
|
|
|
|
BINDIR = $(DESTDIR)/sbin
|
|
|
|
MANDIR = $(DESTDIR)/share/man/man8
|
|
|
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
2021-01-05 21:57:18 +00:00
|
|
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
2020-10-14 23:30:44 +00:00
|
|
|
|
2021-01-05 21:57:18 +00:00
|
|
|
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
|
|
|
|
LDFLAGS_SHARED = -shared
|
2020-10-14 23:30:44 +00:00
|
|
|
diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
index d3a8086..c2aff0c 100644
|
2020-10-14 23:30:44 +00:00
|
|
|
--- a/pppd/plugins/pppoatm/Makefile.linux
|
|
|
|
+++ b/pppd/plugins/pppoatm/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
@@ -4,7 +4,7 @@ CC=$(CROSS_COMPILE)@CC@
|
|
|
|
COPTS=@CFLAGS@
|
2020-10-14 23:30:44 +00:00
|
|
|
|
|
|
|
DESTDIR = $(INSTROOT)@DESTDIR@
|
|
|
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
|
|
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
|
|
|
|
|
|
|
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
|
|
|
|
2021-01-05 21:57:18 +00:00
|
|
|
diff --git a/pppd/plugins/pppoe/Makefile.linux b/pppd/plugins/pppoe/Makefile.linux
|
|
|
|
index c415ce3..d3b7392 100644
|
|
|
|
--- a/pppd/plugins/pppoe/Makefile.linux
|
|
|
|
+++ b/pppd/plugins/pppoe/Makefile.linux
|
|
|
|
@@ -18,7 +18,7 @@ COPTS=@CFLAGS@
|
|
|
|
|
|
|
|
DESTDIR = $(INSTROOT)@DESTDIR@
|
|
|
|
BINDIR = $(DESTDIR)/sbin
|
|
|
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
|
|
|
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(PPPDVERSION)
|
|
|
|
|
|
|
|
PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
|
|
|
|
2020-10-14 23:30:44 +00:00
|
|
|
diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
index 1aa1c0b..e4442f9 100644
|
2020-10-14 23:30:44 +00:00
|
|
|
--- a/pppd/plugins/pppol2tp/Makefile.linux
|
|
|
|
+++ b/pppd/plugins/pppol2tp/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
@@ -4,7 +4,7 @@ CC=$(CROSS_COMPILE)@CC@
|
|
|
|
COPTS=@CFLAGS@
|
2020-10-14 23:30:44 +00:00
|
|
|
|
2021-01-05 21:57:18 +00:00
|
|
|
DESTDIR = $(INSTROOT)/@DESTDIR@
|
2020-10-14 23:30:44 +00:00
|
|
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
|
|
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
|
|
|
|
|
|
|
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
|
|
|
|
|
|
|
diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
index 489aef2..d2ef044 100644
|
2020-10-14 23:30:44 +00:00
|
|
|
--- a/pppd/plugins/radius/Makefile.linux
|
|
|
|
+++ b/pppd/plugins/radius/Makefile.linux
|
2021-01-05 21:57:18 +00:00
|
|
|
@@ -9,7 +9,7 @@ COPTS=@CFLAGS@
|
2020-10-14 23:30:44 +00:00
|
|
|
|
|
|
|
DESTDIR = $(INSTROOT)@DESTDIR@
|
|
|
|
MANDIR = $(DESTDIR)/share/man/man8
|
|
|
|
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
|
|
|
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
|
|
|
|
|
|
|
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
|
|
|
|