2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.56 2003/01/13 08:17:04 fcusack Exp $
6 # Default installation locations
7 BINDIR = $(DESTDIR)/usr/sbin
8 MANDIR = $(DESTDIR)/usr/man
9 INCDIR = $(DESTDIR)/usr/include
13 PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c ecp.c \
14 ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c \
15 demand.c utils.c tty.c eap.c
17 HEADERS = ccp.h chap.h ecp.h fsm.h ipcp.h \
18 ipxcp.h lcp.h magic.h md5.h patchlevel.h pathnames.h pppd.h \
22 PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o ecp.o \
23 auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o eap.o
26 # include dependencies if present
27 ifeq (.depend,$(wildcard .depend))
33 COPTS = -O2 -pipe -Wall -g
36 # Uncomment the next 2 lines to include support for Microsoft's
37 # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
40 # Don't use MSLANMAN unless you really know what you're doing.
42 # Uncomment the next line to include support for MPPE. CHAPMS (above) must
43 # also be enabled. Also, edit plugins/radius/Makefile.linux.
45 ifneq ($(wildcard /usr/lib/libcrypt.*),)
49 # Uncomment the next line to include support for PPP packet filtering.
50 # This requires that the libpcap library and headers be installed
51 # and that the kernel driver support PPP packet filtering, which it
55 # Uncomment the next line to enable multilink PPP (enabled by default)
56 # Linux distributions: Please leave multilink ENABLED in your builds
60 # Uncomment the next line to enable the TDB database (enabled by default.)
61 # If you enable multilink, then TDB is automatically enabled also.
62 # Linux distributions: Please leave TDB ENABLED in your builds.
72 # Enable Microsoft proprietary Callback Control Protocol
75 # Enable EAP SRP-SHA1 authentication (requires libsrp)
80 INCLUDE_DIRS= -I../include
82 COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
84 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
89 PPPDOBJS += md4.o chap_ms.o
90 HEADERS += md4.h chap_ms.h
92 CFLAGS += -DMSLANMAN=1
101 CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
102 LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
104 EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
105 MANPAGES += srp-entry.8
106 EXTRACLEAN += srp-entry.o
109 # OpenSSL has an integrated version of SHA-1, and its implementation
110 # is incompatible with this local SHA-1 implementation. We must use
111 # one or the other, not both.
118 CFLAGS += -DHAS_SHADOW
119 #LIBS += -lshadow $(LIBS)
124 LIBS += -ldes $(LIBS)
126 CFLAGS += -DUSE_CRYPT=1
127 ifneq ($(wildcard /usr/include/crypt.h),)
128 CFLAGS += -DHAVE_CRYPT_H=1
130 ifneq ($(wildcard /usr/lib/libcrypt.*),)
134 PPPDOBJS += pppcrypt.o
135 HEADERS += pppcrypt.h
138 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
146 # Multilink implies the use of TDB
149 CFLAGS += -DHAVE_MULTILINK
150 PPPDSRCS += multilink.c
151 PPPDOBJS += multilink.o
156 CFLAGS += -DUSE_TDB=1
162 # Lock library binary for Linux is included in 'linux' subdirectory.
165 CFLAGS += -DLOCKLIB=1
176 CFLAGS += -DPPP_FILTER -I/usr/include/pcap
180 PPPDSRCS += ipv6cp.c eui64.c
181 HEADERS += ipv6cp.h eui64.h
182 PPPDOBJS += ipv6cp.o eui64.o
189 CFLAGS += -DCBCP_SUPPORT
194 CFLAGS += -DMAXOCTETS
197 INSTALL= install -o root
202 mkdir -p $(BINDIR) $(MANDIR)
204 $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
205 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
206 chmod o-rx,u+s $(BINDIR)/pppd; fi
207 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
210 $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
212 srp-entry: srp-entry.c
213 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
216 mkdir -p $(INCDIR)/pppd
217 $(INSTALL) -c -m 644 $(HEADERS) $(INCDIR)/pppd
220 rm -f $(PPPDOBJS) $(EXTRACLEAN) $(TARGETS) *~ #* core
223 $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend