2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.31 1999/05/13 00:35:14 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 \
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
22 # include dependancies if present and backup if as a header file
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*),)
48 INCLUDE_DIRS= -I../include
50 COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE
52 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
59 CFLAGS += -DUSE_CRYPT=1
60 ifneq ($(wildcard /usr/include/crypt.h),)
61 CFLAGS += -DHAVE_CRYPT_H=1
64 PPPDOBJS += md4.o chap_ms.o
66 CFLAGS += -DMSLANMAN=1
71 CFLAGS += -DHAS_SHADOW
72 #LIBS := -lshadow $(LIBS)
75 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
78 LIBS := -lpam -ldl $(LIBS)
81 # Lock library binary for Linux is included in 'linux' subdirectory.
83 LIBS := -llock $(LIBS)
88 mkdir -p $(BINDIR) $(MANDIR)
89 install -s -c -m 4550 -o root pppd $(BINDIR)/pppd
90 if ! chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
91 chmod o+rx $(BINDIR)/pppd; fi
92 install -c -m 444 -o root pppd.8 $(MANDIR)/man8
95 $(CC) $(CFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
98 rm -f $(PPPDOBJS) pppd *~ #* core
101 $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend