summaryrefslogtreecommitdiff
path: root/package/ppp/patches/patch-pppd_plugins_pppoatm_Makefile_linux
blob: e7fb3f5e7c5a1e5bd9914141d7326efce7aad2c3 (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
--- ppp-2.4.5.orig/pppd/plugins/pppoatm/Makefile.linux	2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/pppd/plugins/pppoatm/Makefile.linux	2011-01-16 21:12:55.000000000 +0100
@@ -1,13 +1,10 @@
-#CC	= gcc
-COPTS	= -O2 -g
-CFLAGS	= $(COPTS) -I../.. -I../../../include -fPIC
-LDFLAGS	= -shared
-INSTALL	= install
+include ../../../makedefs.linux
 
-#***********************************************************************
+CPPFLAGS += -I../.. -I../../../include
+CFLAGS += -fPIC
+LDFLAGS	+= -shared
 
-DESTDIR = $(INSTROOT)@DESTDIR@
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+#***********************************************************************
 
 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
 
@@ -33,7 +30,7 @@ endif
 all: $(PLUGIN)
 
 $(PLUGIN): $(PLUGIN_OBJS)
-	$(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
+	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 install: all
 	$(INSTALL) -d -m 755 $(LIBDIR)
@@ -43,4 +40,4 @@ clean:
 	rm -f *.o *.so
 
 %.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<