2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.44 2002/01/14 14:26:31 dfs Exp $
6 # Default installation locations
10 PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c \
11 ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c cbcp.c \
12 demand.c utils.c tty.c
13 HEADERS = callout.h pathnames.h patchlevel.h chap.h md5.h chap_ms.h md4.h \
16 PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o \
17 auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o
22 # include dependencies if present
23 ifeq (.depend,$(wildcard .depend))
29 COPTS = -O2 -pipe -Wall -g
32 ifneq ($(wildcard /usr/lib/libcrypt.*),)
36 # Uncomment the next 2 lines to include support for Microsoft's
37 # MS-CHAP authentication protocol.
40 ifneq ($(wildcard /usr/lib/libcrypt.*),)
44 # Uncomment the next line to include support for PPP packet filtering.
45 # This requires that the libpcap library and headers be installed
46 # and that the kernel driver support PPP packet filtering, which it
50 # Uncomment the next line to enable multilink PPP (enabled by default)
51 # Linux distributions: Please leave multilink ENABLED in your builds
55 # Uncomment the next line to enable the TDB database (enabled by default.)
56 # If you enable multilink, then TDB is automatically enabled also.
57 # Linux distributions: Please leave TDB ENABLED in your builds.
66 INCLUDE_DIRS= -I../include
68 COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
70 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
77 CFLAGS += -DUSE_CRYPT=1
78 ifneq ($(wildcard /usr/include/crypt.h),)
79 CFLAGS += -DHAVE_CRYPT_H=1
82 PPPDOBJS += md4.o chap_ms.o
84 CFLAGS += -DMSLANMAN=1
89 CFLAGS += -DHAS_SHADOW
90 #LIBS := -lshadow $(LIBS)
93 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
96 LIBS := -lpam -ldl $(LIBS)
101 # Multilink implies the use of TDB
104 CFLAGS += -DHAVE_MULTILINK
105 PPPDSRCS += multilink.c
106 PPPDOBJS += multilink.o
111 CFLAGS += -DUSE_TDB=1
116 # Lock library binary for Linux is included in 'linux' subdirectory.
118 LIBS := -llock $(LIBS)
119 CFLAGS += -DLOCKLIB=1
130 CFLAGS += -DPPP_FILTER -I/usr/include/pcap
134 PPPDSRCS += ipv6cp.c eui64.c
135 HEADERS += ipv6cp.h eui64.h
136 PPPDOBJS += ipv6cp.o eui64.o
141 INSTALL= install -o root
144 mkdir -p $(BINDIR) $(MANDIR)
145 $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
146 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
147 chmod o-rx,u+s $(BINDIR)/pppd; fi
148 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
151 $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
154 rm -f $(PPPDOBJS) pppd *~ #* core
157 $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend