blob: 09d845f6adfcad7f82a2bd5e50c3b3263dfd4acc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/Makefile.linux 2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2011-01-16 21:38:08.000000000 +0100
@@ -1,6 +1,3 @@
-# Generated automatically from Makefile.in by configure.
-#***********************************************************************
-#
# Makefile
#
# Makefile for Roaring Penguin's Linux PPPoE plugin.
@@ -13,52 +10,50 @@
#
# $Id: Makefile.linux,v 1.8 2008/06/09 08:34:23 paulus Exp $
#***********************************************************************
-
-DESTDIR = $(INSTROOT)@DESTDIR@
-BINDIR = $(DESTDIR)/sbin
-LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
-
-PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-
-INSTALL = install
+include ../../../makedefs.linux
# Version is set ONLY IN THE MAKEFILE! Don't delete this!
RP_VERSION=3.8p
-COPTS=-O2 -g
-CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
+CPPFLAGS += -I../../.. -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
+CFLAGS += -fPIC
+LDFLAGS += -shared
+
+VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
+
all: rp-pppoe.so pppoe-discovery
pppoe-discovery: pppoe-discovery.o debug.o
- $(CC) -o pppoe-discovery pppoe-discovery.o debug.o
+ $(CC) $(LDFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o
pppoe-discovery.o: pppoe-discovery.c
- $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
debug.o: debug.c
- $(CC) $(CFLAGS) -c -o debug.o debug.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
rp-pppoe.so: plugin.o discovery.o if.o common.o
- $(CC) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
+ $(CC) $(LDFLAGS) -o $@ $^
install: all
$(INSTALL) -d -m 755 $(LIBDIR)
- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
$(INSTALL) -d -m 755 $(BINDIR)
- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
clean:
rm -f *.o *.so pppoe-discovery
plugin.o: plugin.c
- $(CC) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o plugin.o plugin.c
discovery.o: discovery.c
- $(CC) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o discovery.o discovery.c
if.o: if.c
- $(CC) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o if.o if.c
common.o: common.c
- $(CC) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o common.o common.c
+.PHONY: clean
|