]> git.ozlabs.org Git - ppp.git/blob - pppd/Makefile.linux
update for 2.3.3; don't need extra -lcrypt
[ppp.git] / pppd / Makefile.linux
1 #
2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.23 1998/02/04 01:39:24 paulus Exp $
4 #
5
6 # Default installation locations
7 BINDIR = /usr/sbin
8 MANDIR = /usr/man
9
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
13 HEADERS =  callout.h pathnames.h patchlevel.h chap.h md5.h chap_ms.h md4.h \
14            ipxcp.h cbcp.h
15 MANPAGES = pppd.8
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
18
19 all: pppd
20
21 #
22 # include dependancies if present and backup if as a header file
23 ifeq (.depend,$(wildcard .depend))
24 include .depend
25 endif
26
27 # CC = gcc
28 #
29 COPTS = -O2 # -g
30 VER = 2.3.3
31 LIBS =
32
33 ifneq ($(wildcard /usr/lib/libcrypt*),)
34 LIBS += -lcrypt
35 endif
36
37 # Uncomment the next 2 lines to include support for Microsoft's
38 # MS-CHAP authentication protocol.
39 #CHAPMS=y
40 #USE_CRYPT=y
41
42 # The INCLUDE_DIRS must include the standard headers before the local
43 # ones. If you just had -I.. then the order would be reversed. So, use
44 # the default location for include files first before the .. location.
45 #INCLUDE_DIRS= -I/usr/include -I..
46 INCLUDE_DIRS=
47
48 COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE
49
50 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
51
52 ifdef CHAPMS
53 CFLAGS   += -DCHAPMS=1
54 ifndef USE_CRYPT
55 LIBS     := -ldes $(LIBS)
56 else
57 CFLAGS   += -DUSE_CRYPT=1
58 endif
59 PPPDOBJS += md4.o chap_ms.o
60 ifdef MSLANMAN
61 CFLAGS   += -DMSLANMAN=1
62 endif
63 endif
64
65 ifdef HAS_SHADOW
66 CFLAGS   += -DHAS_SHADOW
67 LIBS     := -lshadow $(LIBS)
68 endif
69
70 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
71 ifdef USE_PAM
72 CFLAGS   += -DUSE_PAM
73 LIBS     := -lpam -ldl $(LIBS)
74 endif
75
76 # Lock library binary for Linux is included in 'linux' subdirectory.
77 ifdef LOCKLIB
78 LIBS     := -llock $(LIBS)
79 CFLAGS   += -DLOCKLIB=1
80 endif
81
82 install: pppd
83         mkdir -p $(BINDIR) $(MANDIR)
84         install -s -c -m 4555 -o root pppd $(BINDIR)/pppd
85         install -c -m 555 -o root pppd.8 $(MANDIR)/man8
86
87 pppd: $(PPPDOBJS)
88         $(CC) $(CFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
89
90 clean:
91         rm -f $(PPPDOBJS) pppd *~ #* core
92
93 depend:
94         $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend