patch-pppd_Makefile_linux 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. --- ppp-2.4.6.orig/pppd/Makefile.linux 2014-01-02 05:42:08.000000000 +0100
  2. +++ ppp-2.4.6/pppd/Makefile.linux 2014-06-06 08:23:21.000000000 +0200
  3. @@ -2,12 +2,7 @@
  4. # pppd makefile for Linux
  5. # $Id: Makefile.linux,v 1.70 2007/06/19 02:08:34 carlsonj Exp $
  6. #
  7. -
  8. -# Default installation locations
  9. -DESTDIR = $(INSTROOT)@DESTDIR@
  10. -BINDIR = $(DESTDIR)/sbin
  11. -MANDIR = $(DESTDIR)/share/man/man8
  12. -INCDIR = $(DESTDIR)/include
  13. +include ../Makedefs.com
  14. TARGETS = pppd
  15. @@ -24,16 +19,6 @@ PPPDOBJS = main.o magic.o fsm.o lcp.o ip
  16. ecp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o \
  17. eap.o chap-md5.o session.o
  18. -#
  19. -# include dependencies if present
  20. -ifeq (.depend,$(wildcard .depend))
  21. -include .depend
  22. -endif
  23. -
  24. -# CC = gcc
  25. -#
  26. -COPTS = -O2 -pipe -Wall -g
  27. -LIBS =
  28. # Uncomment the next 2 lines to include support for Microsoft's
  29. # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
  30. @@ -78,28 +63,25 @@ USE_LIBUTIL=y
  31. MAXOCTETS=y
  32. -INCLUDE_DIRS= -I../include
  33. -
  34. -COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
  35. -
  36. -CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
  37. +CPPFLAGS += -I../include
  38. +CPPFLAGS += -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP '-DDESTDIR="@DESTDIR@"'
  39. ifdef CHAPMS
  40. -CFLAGS += -DCHAPMS=1
  41. +CPPFLAGS += -DCHAPMS=1
  42. NEEDDES=y
  43. PPPDOBJS += md4.o chap_ms.o
  44. HEADERS += md4.h chap_ms.h
  45. ifdef MSLANMAN
  46. -CFLAGS += -DMSLANMAN=1
  47. +CPPFLAGS += -DMSLANMAN=1
  48. endif
  49. ifdef MPPE
  50. -CFLAGS += -DMPPE=1
  51. +CPPFLAGS += -DMPPE=1
  52. endif
  53. endif
  54. # EAP SRP-SHA1
  55. ifdef USE_SRP
  56. -CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
  57. +CPPFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
  58. LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
  59. TARGETS += srp-entry
  60. EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
  61. @@ -116,17 +98,17 @@ PPPDOBJS += sha1.o
  62. endif
  63. ifdef HAS_SHADOW
  64. -CFLAGS += -DHAS_SHADOW
  65. +CPPFLAGS += -DHAS_SHADOW
  66. #LIBS += -lshadow $(LIBS)
  67. endif
  68. ifneq ($(wildcard /usr/include/crypt.h),)
  69. -CFLAGS += -DHAVE_CRYPT_H=1
  70. +CPPFLAGS += -DHAVE_CRYPT_H=1
  71. LIBS += -lcrypt
  72. endif
  73. ifdef USE_LIBUTIL
  74. -CFLAGS += -DHAVE_LOGWTMP=1
  75. +CPPFLAGS += -DHAVE_LOGWTMP=1
  76. LIBS += -lutil
  77. endif
  78. @@ -134,7 +116,7 @@ ifdef NEEDDES
  79. ifndef USE_CRYPT
  80. LIBS += -ldes $(LIBS)
  81. else
  82. -CFLAGS += -DUSE_CRYPT=1
  83. +CPPFLAGS += -DUSE_CRYPT=1
  84. endif
  85. PPPDOBJS += pppcrypt.o
  86. HEADERS += pppcrypt.h
  87. @@ -142,36 +124,36 @@ endif
  88. # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
  89. ifdef USE_PAM
  90. -CFLAGS += -DUSE_PAM
  91. +CPPFLAGS += -DUSE_PAM
  92. LIBS += -lpam -ldl
  93. endif
  94. # Multi-linnk
  95. ifdef HAVE_MULTILINK
  96. - # Multilink implies the use of TDB
  97. - USE_TDB=y
  98. +# Multilink implies the use of TDB
  99. +USE_TDB=y
  100. - CFLAGS += -DHAVE_MULTILINK
  101. - PPPDSRCS += multilink.c
  102. - PPPDOBJS += multilink.o
  103. +CPPFLAGS += -DHAVE_MULTILINK
  104. +PPPDSRCS += multilink.c
  105. +PPPDOBJS += multilink.o
  106. endif
  107. # TDB
  108. ifdef USE_TDB
  109. - CFLAGS += -DUSE_TDB=1
  110. - PPPDSRCS += tdb.c spinlock.c
  111. - PPPDOBJS += tdb.o spinlock.o
  112. - HEADERS += tdb.h spinlock.h
  113. +CPPFLAGS += -DUSE_TDB=1
  114. +PPPDSRCS += tdb.c spinlock.c
  115. +PPPDOBJS += tdb.o spinlock.o
  116. +HEADERS += tdb.h spinlock.h
  117. endif
  118. # Lock library binary for Linux is included in 'linux' subdirectory.
  119. ifdef LOCKLIB
  120. LIBS += -llock
  121. -CFLAGS += -DLOCKLIB=1
  122. +CPPFLAGS += -DLOCKLIB=1
  123. endif
  124. ifdef PLUGIN
  125. -CFLAGS += -DPLUGIN
  126. +CPPFLAGS += -DPLUGIN
  127. LDFLAGS += -Wl,-E
  128. LIBS += -ldl
  129. endif
  130. @@ -179,36 +161,34 @@ endif
  131. ifdef FILTER
  132. ifneq ($(wildcard /usr/include/pcap-bpf.h),)
  133. LIBS += -lpcap
  134. -CFLAGS += -DPPP_FILTER
  135. +CPPFLAGS += -DPPP_FILTER
  136. endif
  137. endif
  138. ifdef HAVE_INET6
  139. - PPPDSRCS += ipv6cp.c eui64.c
  140. - HEADERS += ipv6cp.h eui64.h
  141. - PPPDOBJS += ipv6cp.o eui64.o
  142. - CFLAGS += -DINET6=1
  143. +PPPDSRCS += ipv6cp.c eui64.c
  144. +HEADERS += ipv6cp.h eui64.h
  145. +PPPDOBJS += ipv6cp.o eui64.o
  146. +CPPFLAGS += -DINET6=1
  147. endif
  148. ifdef CBCP
  149. - PPPDSRCS += cbcp.c
  150. - PPPDOBJS += cbcp.o
  151. - CFLAGS += -DCBCP_SUPPORT
  152. - HEADERS += cbcp.h
  153. +PPPDSRCS += cbcp.c
  154. +PPPDOBJS += cbcp.o
  155. +CPPFLAGS += -DCBCP_SUPPORT
  156. +HEADERS += cbcp.h
  157. endif
  158. ifdef MAXOCTETS
  159. - CFLAGS += -DMAXOCTETS
  160. +CPPFLAGS += -DMAXOCTETS
  161. endif
  162. -INSTALL= install
  163. -
  164. all: $(TARGETS)
  165. install: pppd
  166. mkdir -p $(BINDIR) $(MANDIR)
  167. $(EXTRAINSTALL)
  168. - $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
  169. + $(INSTALL) $(STRIP) -c -m 555 pppd $(BINDIR)/pppd
  170. if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
  171. chmod o-rx,u+s $(BINDIR)/pppd; fi
  172. $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
  173. @@ -216,8 +196,8 @@ install: pppd
  174. pppd: $(PPPDOBJS)
  175. $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
  176. -srp-entry: srp-entry.c
  177. - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
  178. +srp-entry: srp-entry.o
  179. + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
  180. install-devel:
  181. mkdir -p $(INCDIR)/pppd
  182. @@ -225,6 +205,3 @@ install-devel:
  183. clean:
  184. rm -f $(PPPDOBJS) $(EXTRACLEAN) $(TARGETS) *~ #* core
  185. -
  186. -depend:
  187. - $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend