2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.1.1.4 2003/10/14 08:09:53 sparq 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
47 # and that the kernel driver support PPP packet filtering, which it
57 INCLUDE_DIRS= -I. -I../include
59 COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP
61 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
68 CFLAGS += -DUSE_CRYPT=1
69 ifneq ($(wildcard /usr/include/crypt.h),)
70 CFLAGS += -DHAVE_CRYPT_H=1
73 PPPDOBJS += md4.o chap_ms.o
75 CFLAGS += -DMSLANMAN=1
80 CFLAGS += -DHAS_SHADOW
81 #LIBS := -lshadow $(LIBS)
84 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
87 LIBS := -lpam -ldl $(LIBS)
90 # Lock library binary for Linux is included in 'linux' subdirectory.
92 LIBS := -llock $(LIBS)
104 CFLAGS += -DPPP_FILTER -I/usr/include/pcap
108 PPPDSRCS += ipv6cp.c eui64.c
109 HEADERS += ipv6cp.h eui64.h
110 PPPDOBJS += ipv6cp.o eui64.o
115 INSTALL= install -o root
118 mkdir -p $(BINDIR) $(MANDIR)
119 $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
120 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
121 chmod o-rx,u+s $(BINDIR)/pppd; fi
122 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
125 $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
128 rm -f $(PPPDOBJS) pppd *~ #* core
131 $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend