]> git.ozlabs.org Git - ppp.git/blob - pppd/Makefile.linux
Changed maintainer for Sol 2/SunOS 4.x to Adi Masputra <adi.masputra@sun.com>
[ppp.git] / pppd / Makefile.linux
1 #
2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.32 1999/08/12 03:59:07 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 utils.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 utils.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 -pipe -Wall -g
30 LIBS =
31
32 ifneq ($(wildcard /usr/lib/libcrypt*),)
33 LIBS += -lcrypt
34 endif
35
36 # Uncomment the next 2 lines to include support for Microsoft's
37 # MS-CHAP authentication protocol.
38 CHAPMS=y
39 USE_CRYPT=y
40 ifneq ($(wildcard /usr/lib/libcrypt*),)
41 HAVE_CRYPT_H=y
42 endif
43
44
45 HAS_SHADOW=y
46 #USE_PAM=y
47
48 INCLUDE_DIRS= -I../include
49
50 COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE
51
52 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
53
54 ifdef CHAPMS
55 CFLAGS   += -DCHAPMS=1
56 ifndef USE_CRYPT
57 LIBS     := -ldes $(LIBS)
58 else
59 CFLAGS   += -DUSE_CRYPT=1
60 ifneq ($(wildcard /usr/include/crypt.h),)
61 CFLAGS   += -DHAVE_CRYPT_H=1
62 endif
63 endif
64 PPPDOBJS += md4.o chap_ms.o
65 ifdef MSLANMAN
66 CFLAGS   += -DMSLANMAN=1
67 endif
68 endif
69
70 ifdef HAS_SHADOW
71 CFLAGS   += -DHAS_SHADOW
72 #LIBS     := -lshadow $(LIBS)
73 endif
74
75 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
76 ifdef USE_PAM
77 CFLAGS   += -DUSE_PAM
78 LIBS     := -lpam -ldl $(LIBS)
79 endif
80
81 # Lock library binary for Linux is included in 'linux' subdirectory.
82 ifdef LOCKLIB
83 LIBS     := -llock $(LIBS)
84 CFLAGS   += -DLOCKLIB=1
85 endif
86
87 INSTALL= install -o root
88
89 install: pppd
90         mkdir -p $(BINDIR) $(MANDIR)
91         $(INSTALL) -s -c -m 4550 pppd $(BINDIR)/pppd
92         if ! chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
93           chmod o+rx $(BINDIR)/pppd; fi
94         $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
95
96 pppd: $(PPPDOBJS)
97         $(CC) $(CFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
98
99 clean:
100         rm -f $(PPPDOBJS) pppd *~ #* core
101
102 depend:
103         $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend