summaryrefslogtreecommitdiff
path: root/package/ppp/patches/patch-pppd_plugins_pppol2tp_Makefile_linux
blob: 4c46c59714216f49f6ef3f8c4fe45fb2835e6634 (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
--- ppp-2.4.5.orig/pppd/plugins/pppol2tp/Makefile.linux	2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux	2011-01-16 21:32:19.000000000 +0100
@@ -1,13 +1,10 @@
-#CC	= gcc
-COPTS	= -O2 -g
-CFLAGS	= $(COPTS) -I. -I../.. -I../../../include -fPIC
-LDFLAGS	= -shared
-INSTALL	= install
+include ../../../makedefs.linux
 
-#***********************************************************************
+CPPFLAGS += -I. -I../.. -I../../../include
+#CFLAGS += -fPIC
+#LDFLAGS	+= -shared
 
-DESTDIR = @DESTDIR@
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+#***********************************************************************
 
 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
 
@@ -16,7 +13,11 @@ PLUGINS := pppol2tp.so openl2tp.so
 all: $(PLUGINS)
 
 %.so: %.o
-	$(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
+	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+	echo $(LDFLAGS)
+
+%.o: %.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
 
 install: all
 	$(INSTALL) -d -m 755 $(LIBDIR)
@@ -25,5 +26,4 @@ install: all
 clean:
 	rm -f *.o *.so
 
-%.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $<
+.PHONY: clean