2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.25 1998/04/01 02:06:41 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 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
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*),)
49 INCLUDE_DIRS= -I../include
51 COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE
53 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
60 CFLAGS += -DUSE_CRYPT=1
61 ifneq ($(wildcard /usr/include/crypt.h),)
62 CFLAGS += -DHAVE_CRYPT_H=1
65 PPPDOBJS += md4.o chap_ms.o
67 CFLAGS += -DMSLANMAN=1
72 CFLAGS += -DHAS_SHADOW
73 #LIBS := -lshadow $(LIBS)
76 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
79 LIBS := -lpam -ldl $(LIBS)
82 # Lock library binary for Linux is included in 'linux' subdirectory.
84 LIBS := -llock $(LIBS)
89 mkdir -p $(BINDIR) $(MANDIR)
90 install -s -c -m 4555 -o root pppd $(BINDIR)/pppd
91 install -c -m 444 -o root pppd.8 $(MANDIR)/man8
94 $(CC) $(CFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
97 rm -f $(PPPDOBJS) pppd *~ #* core
100 $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend