#
# pppd makefile for Linux
-# $Id: Makefile.linux,v 1.12 1996/05/28 00:53:30 paulus Exp $
+# $Id: Makefile.linux,v 1.15 1996/09/14 05:13:45 paulus Exp $
#
+# Default installation locations
+BINDIR = /usr/sbin
+MANDIR = /usr/man
+
PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c \
- ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c
+ ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c \
+ demand.c
HEADERS = callout.h pathnames.h patchlevel.h chap.h md5.h chap_ms.h md4.h \
ipxcp.h
MANPAGES = pppd.8
# include dependancies if present and backup if as a header file
ifeq (.depend,$(wildcard .depend))
include .depend
-HEADERS := $(HEADERS) .depend
endif
# CC = gcc
-# DEBUG_FLAGS = -DDEBUGALL
-COMPILE_FLAGS = -D_linux_=1 -DHAVE_PATHS_H
+#
COPTS = -O2 # -g
-VER = 0.2.8
-LIBS = -lbsd
+VER = 2.3.0
+LIBS = -lc -lbsd
-CFLAGS= $(COPTS) $(DEBUG_FLAGS) $(COMPILE_FLAGS)
+# The INCLUDE_DIRS must include the standard headers before the local
+# ones. If you just had -I.. then the order would be reversed. So, use
+# the default location for include files first before the .. location.
+#INCLUDE_DIRS= -I/usr/include -I..
+INCLUDE_DIRS=
-ifdef USE_MS_DNS
-CFLAGS += -DUSE_MS_DNS=1
-endif
+COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -D__BSD_SOURCE -DIPX_CHANGE
-ifdef IPX_CHANGE
-CFLAGS += -DIPX_CHANGE=1
-PPPDOBJS += ipxcp.o
-endif
+CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
ifdef HAS_SHADOW
CFLAGS += -DHAS_SHADOW
LIBS += -lshadow
endif
+ifdef USE_PAM
+CFLAGS += -DUSE_PAM
+LIBS += -lpam -ldl
+endif
+
install: pppd
mkdir -p $(BINDIR) $(MANDIR)
install -s -c -m 4555 -o root pppd $(BINDIR)/pppd
install -c -m 555 -o root pppd.8 $(MANDIR)/man8
pppd: $(PPPDOBJS)
- $(CC) $(CFLAGS) -o pppd $(PPPDOBJS) $(LIBS) # -Wl,-M >pppd.map
+ $(CC) $(CFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
clean:
rm -f $(PPPDOBJS) pppd *~ #* core