1 $NetBSD: patch-aj,v 1.1.1.1 2005/01/02 02:51:42 cube Exp $
3 --- pppd/Makefile.netbsd.orig 2008-12-19 11:48:24 +0200
4 +++ pppd/Makefile.netbsd 2008-12-19 12:14:52 +0200
7 +# pppd makefile for NetBSD
10 +# Default installation locations
12 +BINDIR = $(DESTDIR)/sbin
13 +MANDIR = $(DESTDIR)/man/man8
14 +INCDIR = $(DESTDIR)/include
18 +PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap-new.c md5.c ccp.c \
19 + ecp.c ipxcp.c auth.c options.c sys-bsd.c chap_ms.c \
20 + demand.c utils.c tty.c eap.c chap-md5.c
22 +HEADERS = ccp.h chap-new.h ecp.h fsm.h ipcp.h \
23 + ipxcp.h lcp.h magic.h md5.h patchlevel.h pathnames.h pppd.h \
27 +PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o \
28 + ecp.o auth.o options.o demand.o utils.o sys-bsd.o ipxcp.o tty.o \
32 +# include dependencies if present
33 +ifeq (.depend,$(wildcard .depend))
39 +COPTS = -O2 -pipe -Wall -g
42 +ifeq ($(shell /usr/bin/uname -s),DragonFly)
43 +LIBS += -lcipher -lmd
46 +# Uncomment the next 2 lines to include support for Microsoft's
47 +# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
50 +# Don't use MSLANMAN unless you really know what you're doing.
52 +# Uncomment the next line to include support for MPPE. CHAPMS (above) must
53 +# also be enabled. Also, edit plugins/radius/Makefile.linux.
56 +# Uncomment the next line to include support for PPP packet filtering.
57 +# This requires that the libpcap library and headers be installed
58 +# and that the kernel driver support PPP packet filtering.
61 +# Uncomment the next line to enable multilink PPP (enabled by default)
62 +# Linux distributions: Please leave multilink ENABLED in your builds
66 +# Uncomment the next line to enable the TDB database (enabled by default.)
67 +# If you enable multilink, then TDB is automatically enabled also.
68 +# Linux distributions: Please leave TDB ENABLED in your builds.
78 +# Enable Microsoft proprietary Callback Control Protocol
81 +# Enable EAP SRP-SHA1 authentication (requires libsrp)
86 +INCLUDE_DIRS= -I../include
88 +COMPILE_FLAGS= -DHAVE_PATHS_H -DHAVE_MMAP -DHAS_STRLFUNCS
90 +CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
95 +PPPDOBJS += chap_ms.o
98 +CFLAGS += -DMSLANMAN=1
107 +CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
108 +LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
109 +TARGETS += srp-entry
110 +EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
111 +MANPAGES += srp-entry.8
112 +EXTRACLEAN += srp-entry.o
115 +# OpenSSL has an integrated version of SHA-1, and its implementation
116 +# is incompatible with this local SHA-1 implementation. We must use
117 +# one or the other, not both.
124 +CFLAGS += -DHAS_SHADOW
125 +#LIBS += -lshadow $(LIBS)
128 +ifneq ($(wildcard /usr/include/crypt.h),)
129 +CFLAGS += -DHAVE_CRYPT_H=1
131 +ifneq ($(wildcard /usr/lib/libcrypt.*),)
137 +LIBS += -ldes $(LIBS)
139 +CFLAGS += -DUSE_CRYPT=1
141 +PPPDOBJS += pppcrypt.o
142 +HEADERS += pppcrypt.h
145 +# For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
152 +ifdef HAVE_MULTILINK
153 + # Multilink implies the use of TDB
156 + CFLAGS += -DHAVE_MULTILINK
157 + PPPDSRCS += multilink.c
158 + PPPDOBJS += multilink.o
163 + CFLAGS += -DUSE_TDB=1
164 + PPPDSRCS += tdb.c spinlock.c
165 + PPPDOBJS += tdb.o spinlock.o
166 + HEADERS += tdb.h spinlock.h
169 +# Lock library binary for Linux is included in 'linux' subdirectory.
172 +CFLAGS += -DLOCKLIB=1
181 +ifneq ($(wildcard /usr/include/pcap-bpf.h),)
183 +CFLAGS += -DPPP_FILTER
188 + PPPDSRCS += ipv6cp.c eui64.c
189 + HEADERS += ipv6cp.h eui64.h
190 + PPPDOBJS += ipv6cp.o eui64.o
191 + CFLAGS += -DINET6=1
197 + CFLAGS += -DCBCP_SUPPORT
202 + CFLAGS += -DMAXOCTETS
210 + mkdir -p $(BINDIR) $(MANDIR)
212 + $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
213 + if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
214 + chmod o-rx,u+s $(BINDIR)/pppd; fi
215 + $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
218 + $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
220 +srp-entry: srp-entry.c
221 + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
224 + mkdir -p $(INCDIR)/pppd
225 + $(INSTALL) -c -m 644 $(HEADERS) $(INCDIR)/pppd
228 + rm -f $(PPPDOBJS) $(EXTRACLEAN) $(TARGETS) *~ #* core
231 + $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend