]> git.ozlabs.org Git - ppp.git/blob - pppd/Makefile.linux
increase buffer size
[ppp.git] / pppd / Makefile.linux
1 #
2 # pppd makefile for Linux
3 # $Id: Makefile.linux,v 1.35 1999/12/23 01:23: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 #HAVE_INET6=y
48
49 PLUGIN=y
50
51 INCLUDE_DIRS= -I../include
52
53 COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE
54
55 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
56
57 ifdef CHAPMS
58 CFLAGS   += -DCHAPMS=1
59 ifndef USE_CRYPT
60 LIBS     := -ldes $(LIBS)
61 else
62 CFLAGS   += -DUSE_CRYPT=1
63 ifneq ($(wildcard /usr/include/crypt.h),)
64 CFLAGS   += -DHAVE_CRYPT_H=1
65 endif
66 endif
67 PPPDOBJS += md4.o chap_ms.o
68 ifdef MSLANMAN
69 CFLAGS   += -DMSLANMAN=1
70 endif
71 endif
72
73 ifdef HAS_SHADOW
74 CFLAGS   += -DHAS_SHADOW
75 #LIBS     := -lshadow $(LIBS)
76 endif
77
78 # For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
79 ifdef USE_PAM
80 CFLAGS   += -DUSE_PAM
81 LIBS     := -lpam -ldl $(LIBS)
82 endif
83
84 # Lock library binary for Linux is included in 'linux' subdirectory.
85 ifdef LOCKLIB
86 LIBS     := -llock $(LIBS)
87 CFLAGS   += -DLOCKLIB=1
88 endif
89
90 ifdef PLUGIN
91 CFLAGS  += -DPLUGIN
92 LDFLAGS += -Wl,-E
93 LIBS    += -ldl
94 endif
95
96 ifdef HAVE_INET6
97      PPPDSRCS += ipv6cp.c eui64.c
98      HEADERS  += ipv6cp.h eui64.h
99      PPPDOBJS += ipv6cp.o eui64.o
100      CFLAGS   += -DINET6=1
101 endif
102
103
104 INSTALL= install -o root
105
106 install: pppd
107         mkdir -p $(BINDIR) $(MANDIR)
108         $(INSTALL) -s -c -m 4550 pppd $(BINDIR)/pppd
109         if ! chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
110           chmod o+rx $(BINDIR)/pppd; fi
111         $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
112
113 pppd: $(PPPDOBJS)
114         $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
115
116 clean:
117         rm -f $(PPPDOBJS) pppd *~ #* core
118
119 depend:
120         $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend