summaryrefslogtreecommitdiff
path: root/package/ppp/patches/patch-pppd_Makefile_linux
blob: a447ae1ea412e5e3a24e6e67d7dc5608d8715d1b (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
--- ppp-2.4.5.orig/pppd/Makefile.linux	2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/pppd/Makefile.linux	2011-01-16 17:09:40.000000000 +0100
@@ -2,12 +2,7 @@
 # pppd makefile for Linux
 # $Id: Makefile.linux,v 1.70 2007/06/19 02:08:34 carlsonj Exp $
 #
-
-# Default installation locations
-DESTDIR = $(INSTROOT)@DESTDIR@
-BINDIR = $(DESTDIR)/sbin
-MANDIR = $(DESTDIR)/share/man/man8
-INCDIR = $(DESTDIR)/include
+include ../makedefs.linux
 
 TARGETS = pppd
 
@@ -30,10 +25,6 @@ ifeq (.depend,$(wildcard .depend))
 include .depend
 endif
 
-# CC = gcc
-#
-COPTS = -O2 -pipe -Wall -g
-LIBS =
 
 # Uncomment the next 2 lines to include support for Microsoft's
 # MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
@@ -48,7 +39,7 @@ MPPE=y
 # Uncomment the next line to include support for PPP packet filtering.
 # This requires that the libpcap library and headers be installed
 # and that the kernel driver support PPP packet filtering.
-FILTER=y
+#FILTER=y
 
 # Uncomment the next line to enable multilink PPP (enabled by default)
 # Linux distributions: Please leave multilink ENABLED in your builds
@@ -58,9 +49,9 @@ HAVE_MULTILINK=y
 # Uncomment the next line to enable the TDB database (enabled by default.)
 # If you enable multilink, then TDB is automatically enabled also.
 # Linux distributions: Please leave TDB ENABLED in your builds.
-USE_TDB=y
+#USE_TDB=y
 
-HAS_SHADOW=y
+#HAS_SHADOW=y
 #USE_PAM=y
 #HAVE_INET6=y
 
@@ -75,11 +66,10 @@ PLUGIN=y
 
 MAXOCTETS=y
 
-INCLUDE_DIRS= -I../include
-
-COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
+CPPFLAGS += -I../include
+CPPFLAGS += -DHAVE_PATHS_H -DHAVE_MMAP
 
-CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
+CFLAGS+= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
 
 ifdef CHAPMS
 CFLAGS   += -DCHAPMS=1
@@ -99,7 +89,7 @@ ifdef USE_SRP
 CFLAGS	+= -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
 LIBS	+= -lsrp -L/usr/local/ssl/lib -lcrypto
 TARGETS	+= srp-entry
-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
 MANPAGES += srp-entry.8
 EXTRACLEAN += srp-entry.o
 NEEDDES=y
@@ -117,10 +107,8 @@ CFLAGS   += -DHAS_SHADOW
 #LIBS     += -lshadow $(LIBS)
 endif
 
-ifneq ($(wildcard /usr/include/crypt.h),)
 CFLAGS  += -DHAVE_CRYPT_H=1
 LIBS	+= -lcrypt
-endif
 
 ifdef NEEDDES
 ifndef USE_CRYPT
@@ -200,16 +188,16 @@ all: $(TARGETS)
 install: pppd
 	mkdir -p $(BINDIR) $(MANDIR)
 	$(EXTRAINSTALL)
-	$(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
+	$(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
 	if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
 	  chmod o-rx,u+s $(BINDIR)/pppd; fi
 	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
 
 pppd: $(PPPDOBJS)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
+	$(CC) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
 
 srp-entry:	srp-entry.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
+	$(CC) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
 
 install-devel:
 	mkdir -p $(INCDIR)/pppd
@@ -219,4 +207,4 @@ clean:
 	rm -f $(PPPDOBJS) $(EXTRACLEAN) $(TARGETS) *~ #* core
 
 depend:
-	$(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend
+	$(CPP) -M $(CPPFLAGS) $(CFLAGS) $(PPPDSRCS) >.depend