2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.50 2002/06/10 13:46:28 dfs Exp $
6 # Default installation locations
11 PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c ecp.c \
12 ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c cbcp.c \
13 demand.c utils.c tty.c sha1.c
15 HEADERS = cbcp.h ccp.h chap.h chap_ms.h ecp.h fsm.h ipcp.h \
16 ipxcp.h lcp.h magic.h md4.h md5.h patchlevel.h pathnames.h pppd.h \
20 PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o ecp.o \
21 auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o sha1.o
26 # include dependencies if present
27 ifeq (.depend,$(wildcard .depend))
33 COPTS = -O2 -pipe -Wall -g
36 ifneq ($(wildcard /usr/lib/libcrypt.*),)
40 # Uncomment the next 2 lines to include support for Microsoft's
41 # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
44 # Uncomment the next line to include support for MPPE. CHAPMS (above) must
45 # also be enabled. Also, edit plugins/radius/Makefile.linux.
47 ifneq ($(wildcard /usr/lib/libcrypt.*),)
51 # Uncomment the next line to include support for PPP packet filtering.
52 # This requires that the libpcap library and headers be installed
53 # and that the kernel driver support PPP packet filtering, which it
57 # Uncomment the next line to enable multilink PPP (enabled by default)
58 # Linux distributions: Please leave multilink ENABLED in your builds
62 # Uncomment the next line to enable the TDB database (enabled by default.)
63 # If you enable multilink, then TDB is automatically enabled also.
64 # Linux distributions: Please leave TDB ENABLED in your builds.
75 INCLUDE_DIRS= -I../include
77 COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
79 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
86 CFLAGS += -DUSE_CRYPT=1
87 ifneq ($(wildcard /usr/include/crypt.h),)
88 CFLAGS += -DHAVE_CRYPT_H=1
91 PPPDOBJS += md4.o chap_ms.o
93 CFLAGS += -DMSLANMAN=1
101 CFLAGS += -DHAS_SHADOW
102 #LIBS := -lshadow $(LIBS)
105 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
108 LIBS := -lpam -ldl $(LIBS)
113 # Multilink implies the use of TDB
116 CFLAGS += -DHAVE_MULTILINK
117 PPPDSRCS += multilink.c
118 PPPDOBJS += multilink.o
123 CFLAGS += -DUSE_TDB=1
128 # Lock library binary for Linux is included in 'linux' subdirectory.
130 LIBS := -llock $(LIBS)
131 CFLAGS += -DLOCKLIB=1
142 CFLAGS += -DPPP_FILTER -I/usr/include/pcap
146 PPPDSRCS += ipv6cp.c eui64.c
147 HEADERS += ipv6cp.h eui64.h
148 PPPDOBJS += ipv6cp.o eui64.o
154 CFLAGS += -DCBCP_SUPPORT
157 INSTALL= install -o root
160 mkdir -p $(BINDIR) $(MANDIR)
161 $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
162 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
163 chmod o-rx,u+s $(BINDIR)/pppd; fi
164 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
167 $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
170 mkdir -p $(INCDIR)/pppd
171 $(INSTALL) -c -m 644 $(HEADERS) $(INCDIR)/pppd
174 rm -f $(PPPDOBJS) pppd *~ #* core
177 $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend