2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.39 2000/08/01 01:38:29 paulus 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 multilink.c tdb.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 multilink.o \
23 # include dependancies if present and backup if as a header file
24 ifeq (.depend,$(wildcard .depend))
30 COPTS = -O2 -pipe -Wall -g
33 ifneq ($(wildcard /usr/lib/libcrypt.*),)
37 # Uncomment the next 2 lines to include support for Microsoft's
38 # MS-CHAP authentication protocol.
41 ifneq ($(wildcard /usr/lib/libcrypt.*),)
45 # Uncomment the next line to include support for PPP packet filtering.
46 # This requires that the libpcap library and headers be installed.
55 INCLUDE_DIRS= -I../include
57 COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP
59 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
66 CFLAGS += -DUSE_CRYPT=1
67 ifneq ($(wildcard /usr/include/crypt.h),)
68 CFLAGS += -DHAVE_CRYPT_H=1
71 PPPDOBJS += md4.o chap_ms.o
73 CFLAGS += -DMSLANMAN=1
78 CFLAGS += -DHAS_SHADOW
79 #LIBS := -lshadow $(LIBS)
82 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
85 LIBS := -lpam -ldl $(LIBS)
88 # Lock library binary for Linux is included in 'linux' subdirectory.
90 LIBS := -llock $(LIBS)
102 CFLAGS += -DPPP_FILTER -I/usr/include/pcap
106 PPPDSRCS += ipv6cp.c eui64.c
107 HEADERS += ipv6cp.h eui64.h
108 PPPDOBJS += ipv6cp.o eui64.o
113 INSTALL= install -o root
116 mkdir -p $(BINDIR) $(MANDIR)
117 $(INSTALL) -s -c -m 4550 pppd $(BINDIR)/pppd
118 if ! chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
119 chmod o+rx $(BINDIR)/pppd; fi
120 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
123 $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
126 rm -f $(PPPDOBJS) pppd *~ #* core
129 $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend