File: Makefile.in

package info (click to toggle)
isdnutils 1:3.25+dfsg1-3.5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 18,188 kB
  • ctags: 12,236
  • sloc: ansic: 98,041; sh: 19,044; perl: 4,948; makefile: 3,145; cpp: 2,708; tcl: 22
file content (173 lines) | stat: -rw-r--r-- 4,080 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
#
# ipppd makefile for Linux
# $Id: Makefile.in,v 1.21 2008/08/31 10:49:38 keil Exp $
#

HAVE_LIBSSL   := @HAVE_LIBSSL@
HAVE_LIBDES   := @HAVE_LIBDES@
HAVE_LIBCRYPT := @HAVE_LIBCRYPT@
HAVE_SHADOW_H := @HAVE_SHADOW_H@
HAVE_LZSCOMP_H:= @HAVE_LZSCOMP_H@
HAVE_PCAP_BPF_H := @HAVE_PCAP_BPF_H@
HAVE_NET_BPF_H:= @HAVE_NET_BPF_H@
IPPP_FILTER   := @CONFIG_IPPP_FILTER@
SBINDIR       := @CONFIG_SBINDIR@
MANDIR        := @CONFIG_MANDIR@
CC            := @CC@
INSTALL       := @INSTALL@
INSTALL_DIR   := $(INSTALL) -m 0755 -o 0 -g 0 -d
INSTALL_SBIN  := $(INSTALL) -m 0700 -o 0 -g 0
INSTALL_BIN   := $(INSTALL) -m 0755 -o 0 -g 0
INSTALL_DATA  := $(INSTALL) -m 0644 -o 0 -g 0
RADIUS_CLIENT_CONFIG_FILE := @RADIUS_CLIENT_CONFIG_FILE@

ifeq (@CONFIG_IPPPD_MSCHAP@,y)
USE_MSCHAP    := 1
endif

ifeq (@CONFIG_IPPPD_RADIUS@,y)
RADIUS :=1
endif

ifeq (@CONFIG_RADIUS_WTMP_LOGGING@,y)
RADIUS_WTMP_LOGGING := 1
endif

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 cbcp.c environ_bsd.c readpw.c
HEADERS =  callout.h pathnames.h patchlevel.h chap.h md5.h \
	   ipxcp.h cbcp.h environ_bsd.h
MANPAGES = ipppd.8
PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o \
	   auth.o options.o sys-linux.o cbcp.o ipxcp.o environ_bsd.o readpw.o

all: ipppd

%.8: %.man
	cp $< $@

install-man: $(MANPAGES)
	for i in $(MANPAGES) ; do \
		MANSECT=`echo $$i | cut -d. -f2` ;\
		$(INSTALL_DIR) $(DESTDIR)$(MANDIR)/man$$MANSECT ;\
		$(INSTALL_DATA) $$i $(DESTDIR)$(MANDIR)/man$$MANSECT/$$i ;\
	done

uninstall-man:
	for i in $(MANPAGES) ; do \
		MANSECT=`echo $$i | cut -d. -f2` ;\
		rm -f $(DESTDIR)$(MANDIR)/man$$MANSECT/$$i ;\
	done

uninstall: uninstall-man
	rm -f $(DESTDIR)$(SBINDIR)/ipppd

install: ipppd install-man
	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
	$(INSTALL_SBIN) ipppd $(DESTDIR)$(SBINDIR)/ipppd

ifeq (.depend,$(wildcard .depend))
include .depend
HEADERS := $(HEADERS) .depend
endif

DEBUG_FLAGS   = @CONFIG_IPPPD_DEBUGFLAGS@
COMPILE_FLAGS = @CFLAGS@
CFLAGS        = -O2 -fomit-frame-pointer -Wall -DREQ_SYSOPTIONS=0
VER           = 2.2.0

# it's a hack
ifeq ($(HAVE_LIBCRYPT),1)
LIBS        = -lcrypt -lutil
endif

ifeq ($(IPPP_FILTER),y)
COPTS      += -DIPPP_FILTER
LIBS       += -lpcap
endif

SOURCE = RELNOTES configure *.in $(PPPDSRCS) $(HEADERS) $(MANPAGES)

MSG    = ''
ifdef USE_MSCHAP
	ifeq ($(HAVE_LIBSSL),1)
		PPPDSRCS += md4.c chap_ms.c
		PPPDOBJS += md4.o chap_ms.o
		HEADERS  += md4.h chap_ms.h
		COPTS    += -DUSE_MSCHAP -DUSE_SSLDES
		LIBS     += -lssl
	else
		ifeq ($(HAVE_LIBDES),1)
			PPPDSRCS += md4.c chap_ms.c
			PPPDOBJS += md4.o chap_ms.o
			HEADERS  += md4.h chap_ms.h
			COPTS    += -DUSE_MSCHAP
			LIBS     += -ldes
		else
			MSG = '\n\nLibrary libdes not found, USE_MSCHAP disabled\n\n'
		endif
	endif
endif

ifdef RADIUS
	PPPDSRCS += radius.c
	PPPDOBJS += radius.o
	COPTS    += -DRADIUS -D_linux_=1 -I/usr/local/include 
	COPTS 	 += -DPATH_RADIUSCLIENT_CONF=\"$(RADIUS_CLIENT_CONFIG_FILE)\"
	LIBS     += -L/usr/local/lib -lradiusclient
	ifdef RADIUS_WTMP_LOGGING
        	COPTS    += -DRADIUS_WTMP_LOGGING
	endif
endif

ifeq ($(HAVE_SHADOW_H),1)
PPPDOBJS += isexpired.o
PPPDSRCS += isexpired.c
endif

ifeq ($(HAVE_LZSCOMP_H),1)
	COPTS += -DHAVE_LZSCOMP_H
endif

ifeq ($(HAVE_PCAP_BPF_H),1)
	COPTS += -DHAVE_PCAP_BPF_H
endif

ifeq ($(HAVE_NET_BPF_H),1)
	COPTS += -DHAVE_NET_BPF_H
endif

%.8: %.man
	cp $< $@

Makefile: Makefile.in config.status
	./config.status

config.status: configure
	./config.status --recheck

#
# Makefile in depencies forces rebuild after running
# configure.
#
%.o: %.c Makefile
	$(CC) $(CFLAGS) $(COPTS) $(DEBUG_FLAGS) $(COMPILE_FLAGS) -c -o $@ $<

ipppd: $(PPPDOBJS)
	$(CC) $(CFLAGS) -o ipppd $(PPPDOBJS) $(LIBS)
	@echo -n $(MSG)

ipppd.tar: $(SOURCE)
	tar -cvf ipppd.tar $(SOURCE)

ipppd.tar.gz: ipppd.tar
	gzip ipppd.tar

clean:
	rm -f $(PPPDOBJS) ipppd *~ #* core

distclean: clean
	rm -f config.h config.status config.cache config.log *.man *.8 pathnames.h Makefile

depend:
	$(CPP) -M $(CFLAGS) $(COPTS) $(DEBUG_FLAGS) $(COMPILE_FLAGS) $(PPPDSRCS) >.depend