2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.55 2002/11/05 11:52:07 carlsonj 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.
41 # Uncomment the next line to include support for MPPE. CHAPMS (above) must
42 # also be enabled. Also, edit plugins/radius/Makefile.linux.
44 ifneq ($(wildcard /usr/lib/libcrypt.*),)
48 # Uncomment the next line to include support for PPP packet filtering.
49 # This requires that the libpcap library and headers be installed
50 # and that the kernel driver support PPP packet filtering, which it
54 # Uncomment the next line to enable multilink PPP (enabled by default)
55 # Linux distributions: Please leave multilink ENABLED in your builds
59 # Uncomment the next line to enable the TDB database (enabled by default.)
60 # If you enable multilink, then TDB is automatically enabled also.
61 # Linux distributions: Please leave TDB ENABLED in your builds.
71 # Enable Microsoft proprietary Callback Control Protocol
74 # Enable EAP SRP-SHA1 authentication (requires libsrp)
79 INCLUDE_DIRS= -I../include
81 COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
83 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
88 PPPDOBJS += md4.o chap_ms.o
89 HEADERS += md4.h chap_ms.h
91 CFLAGS += -DMSLANMAN=1
100 CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
101 LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
103 EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
104 MANPAGES += srp-entry.8
105 EXTRACLEAN += srp-entry.o
108 # OpenSSL has an integrated version of SHA-1, and its implementation
109 # is incompatible with this local SHA-1 implementation. We must use
110 # one or the other, not both.
117 CFLAGS += -DHAS_SHADOW
118 #LIBS += -lshadow $(LIBS)
123 LIBS += -ldes $(LIBS)
125 CFLAGS += -DUSE_CRYPT=1
126 ifneq ($(wildcard /usr/include/crypt.h),)
127 CFLAGS += -DHAVE_CRYPT_H=1
129 ifneq ($(wildcard /usr/lib/libcrypt.*),)
133 PPPDOBJS += pppcrypt.o
134 HEADERS += pppcrypt.h
137 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
145 # Multilink implies the use of TDB
148 CFLAGS += -DHAVE_MULTILINK
149 PPPDSRCS += multilink.c
150 PPPDOBJS += multilink.o
155 CFLAGS += -DUSE_TDB=1
161 # Lock library binary for Linux is included in 'linux' subdirectory.
164 CFLAGS += -DLOCKLIB=1
175 CFLAGS += -DPPP_FILTER -I/usr/include/pcap
179 PPPDSRCS += ipv6cp.c eui64.c
180 HEADERS += ipv6cp.h eui64.h
181 PPPDOBJS += ipv6cp.o eui64.o
188 CFLAGS += -DCBCP_SUPPORT
193 CFLAGS += -DMAXOCTETS
196 INSTALL= install -o root
201 mkdir -p $(BINDIR) $(MANDIR)
203 $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
204 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
205 chmod o-rx,u+s $(BINDIR)/pppd; fi
206 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
209 $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
211 srp-entry: srp-entry.c
212 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
215 mkdir -p $(INCDIR)/pppd
216 $(INSTALL) -c -m 644 $(HEADERS) $(INCDIR)/pppd
219 rm -f $(PPPDOBJS) $(EXTRACLEAN) $(TARGETS) *~ #* core
222 $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend