Magellan Linux

Contents of /trunk/ppp/patches/ppp-2.4.4-make-vars.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 797 - (show annotations) (download)
Mon May 11 09:46:04 2009 UTC (15 years ago) by niro
File size: 5856 byte(s)
-added patches from gentoo

1 diff -ur ppp-2.4.4.orig/chat/Makefile.linux ppp-2.4.4/chat/Makefile.linux
2 --- ppp-2.4.4.orig/chat/Makefile.linux 2006-06-04 05:07:46.000000000 +0000
3 +++ ppp-2.4.4/chat/Makefile.linux 2008-08-01 20:43:42.000000000 +0000
4 @@ -10,7 +10,6 @@
5 CDEF4= -DFNDELAY=O_NDELAY # Old name value
6 CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
7
8 -COPTS= -O2 -g -pipe
9 CFLAGS= $(COPTS) $(CDEFS)
10
11 INSTALL= install
12 @@ -18,7 +17,7 @@
13 all: chat
14
15 chat: chat.o
16 - $(CC) -o chat chat.o
17 + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^
18
19 chat.o: chat.c
20 $(CC) -c $(CFLAGS) -o chat.o chat.c
21 diff -ur ppp-2.4.4.orig/pppd/Makefile.linux ppp-2.4.4/pppd/Makefile.linux
22 --- ppp-2.4.4.orig/pppd/Makefile.linux 2006-06-04 05:07:46.000000000 +0000
23 +++ ppp-2.4.4/pppd/Makefile.linux 2008-08-01 20:43:42.000000000 +0000
24 @@ -32,7 +32,7 @@
25
26 # CC = gcc
27 #
28 -COPTS = -O2 -pipe -Wall -g
29 +COPTS+= -Wall
30 LIBS =
31
32 # Uncomment the next 2 lines to include support for Microsoft's
33 diff -ur ppp-2.4.4.orig/pppd/plugins/Makefile.linux ppp-2.4.4/pppd/plugins/Makefile.linux
34 --- ppp-2.4.4.orig/pppd/plugins/Makefile.linux 2006-06-04 05:04:14.000000000 +0000
35 +++ ppp-2.4.4/pppd/plugins/Makefile.linux 2008-08-01 20:45:50.000000000 +0000
36 @@ -1,7 +1,11 @@
37 -CC = gcc
38 -COPTS = -O2 -g
39 +# CC = gcc
40 CFLAGS = $(COPTS) -I.. -I../../include -fPIC
41 -LDFLAGS = -shared
42 +LDFLAGS_PROG := $(LDFLAGS)
43 +export LDFLAGS LDFLAGS_PROG
44 +LDFLAGS += -shared
45 +# need the following option, otherwise linking plugins might fail with undef errors (Gentoo bug 210837)
46 +LDFLAGS += -Wl,--allow-shlib-undefined
47 +LIBS =
48 INSTALL = install
49
50 DESTDIR = $(INSTROOT)@DESTDIR@
51 @@ -23,7 +27,7 @@
52 for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
53
54 %.so: %.c
55 - $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
56 + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBS)
57
58 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
59
60 diff -ur ppp-2.4.4.orig/pppd/plugins/pppoatm/Makefile.linux ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux
61 --- ppp-2.4.4.orig/pppd/plugins/pppoatm/Makefile.linux 2004-11-14 01:12:10.000000000 +0000
62 +++ ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux 2008-08-01 20:43:42.000000000 +0000
63 @@ -1,7 +1,5 @@
64 -CC = gcc
65 -COPTS = -O2 -g
66 +# CC = gcc
67 CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC
68 -LDFLAGS = -shared
69 INSTALL = install
70
71 #***********************************************************************
72 @@ -33,7 +31,7 @@
73 all: $(PLUGIN)
74
75 $(PLUGIN): $(PLUGIN_OBJS)
76 - $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
77 + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBS)
78
79 install: all
80 $(INSTALL) -d -m 755 $(LIBDIR)
81 diff -ur ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux ppp-2.4.4/pppd/plugins/radius/Makefile.linux
82 --- ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux 2006-06-04 05:04:14.000000000 +0000
83 +++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2008-08-01 20:43:42.000000000 +0000
84 @@ -12,7 +12,7 @@
85 INSTALL = install
86
87 PLUGIN=radius.so radattr.so radrealms.so
88 -CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
89 +CFLAGS=$(COPTS) -I. -I../.. -I../../../include -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
90
91 # Uncomment the next line to include support for Microsoft's
92 # MS-CHAP authentication protocol.
93 @@ -43,13 +43,13 @@
94 $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
95
96 radius.so: radius.o libradiusclient.a
97 - $(CC) -o radius.so -shared radius.o libradiusclient.a
98 + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^
99
100 radattr.so: radattr.o
101 - $(CC) -o radattr.so -shared radattr.o
102 + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^
103
104 radrealms.so: radrealms.o
105 - $(CC) -o radrealms.so -shared radrealms.o
106 + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^
107
108 CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
109 clientid.o sendserver.o lock.o util.o md5.o
110 diff -ur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux
111 --- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/Makefile.linux 2006-06-04 05:07:46.000000000 +0000
112 +++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux 2008-08-01 20:43:42.000000000 +0000
113 @@ -24,18 +24,17 @@
114 # Version is set ONLY IN THE MAKEFILE! Don't delete this!
115 VERSION=3.3
116
117 -COPTS=-O2 -g
118 CFLAGS=$(COPTS) -I../../../include/linux
119 all: rp-pppoe.so pppoe-discovery
120
121 pppoe-discovery: libplugin.a pppoe-discovery.o
122 - $(CC) -o pppoe-discovery pppoe-discovery.o libplugin.a
123 + $(CC) $(LDFLAGS_PROG) $(CFLAGS) -o pppoe-discovery pppoe-discovery.o libplugin.a
124
125 pppoe-discovery.o: pppoe-discovery.c
126 $(CC) $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o pppoe-discovery.o pppoe-discovery.c
127
128 rp-pppoe.so: libplugin.a plugin.o
129 - $(CC) -o rp-pppoe.so -shared plugin.o libplugin.a
130 + $(CC) $(LDFLAGS) $(CFLAGS) -o rp-pppoe.so plugin.o libplugin.a
131
132 install: all
133 $(INSTALL) -d -m 755 $(LIBDIR)
134 diff -ur ppp-2.4.4.orig/pppdump/Makefile.linux ppp-2.4.4/pppdump/Makefile.linux
135 --- ppp-2.4.4.orig/pppdump/Makefile.linux 2006-06-04 05:04:14.000000000 +0000
136 +++ ppp-2.4.4/pppdump/Makefile.linux 2008-08-01 20:43:42.000000000 +0000
137 @@ -2,7 +2,7 @@
138 BINDIR = $(DESTDIR)/sbin
139 MANDIR = $(DESTDIR)/share/man/man8
140
141 -CFLAGS= -O -I../include/net
142 +CFLAGS=$(COPTS) -I../include/net
143 OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
144
145 INSTALL= install
146 @@ -10,7 +10,7 @@
147 all: pppdump
148
149 pppdump: $(OBJS)
150 - $(CC) -o pppdump $(OBJS)
151 + $(CC) $(LDFLAGS) -o pppdump $(OBJS)
152
153 clean:
154 rm -f pppdump $(OBJS) *~
155 diff -ur ppp-2.4.4.orig/pppstats/Makefile.linux ppp-2.4.4/pppstats/Makefile.linux
156 --- ppp-2.4.4.orig/pppstats/Makefile.linux 2006-06-04 05:07:46.000000000 +0000
157 +++ ppp-2.4.4/pppstats/Makefile.linux 2008-08-01 20:43:42.000000000 +0000
158 @@ -10,7 +10,6 @@
159 PPPSTATOBJS = pppstats.o
160
161 #CC = gcc
162 -COPTS = -O
163 COMPILE_FLAGS = -I../include
164 LIBS =
165
166 @@ -26,7 +25,7 @@
167 $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
168
169 pppstats: $(PPPSTATSRCS)
170 - $(CC) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
171 + $(CC) $(CFLAGS) $(LDFLAGS) -o pppstats pppstats.c $(LIBS)
172
173 clean:
174 rm -f pppstats *~ #* core