File: Makefile

package info (click to toggle)
diald 0.99.4-9
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,148 kB
  • ctags: 935
  • sloc: ansic: 7,109; tcl: 977; sh: 880; perl: 306; makefile: 109
file content (126 lines) | stat: -rw-r--r-- 4,637 bytes parent folder | download | duplicates (2)
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
# ------------------ USER CONFIGURABLE SETTINGS ---------------------------

# Once you have read, understood, and made any necessary changes
# you may comment out the next two lines.
#unconfig:
#	@echo 'EDIT THE CONFIG SETTINGS IN THE MAKEFILE!'; exit 1

# The directories where files will be installed, you may want to change these.
# dctrl goes here
BINDIR=/usr/bin
# diald goes here
SBINDIR=/usr/sbin
# the manual page goes here
MANDIR=/usr/share/man
# the configuration files go here
LIBDIR=/etc/diald
# the pam service files go here
PAMDIR=/etc/pam.d

# Compiler flags. Note that with gcc 2.5.8 using -g without -O
# will cause it to miscompile the filter parsing code.
# Also note that some versions of gcc may generate bad code
# with the -fomit-frame-pointer option.

# Linux, libc.so.6, TCP access control via /etc/hosts.allow (tcp_wrappers)
# and PAM authentication protocol
CFLAGS = -O2 -Wall -pipe -DTCP_WRAPPERS -DAUTH_PAM
LIBS = -lwrap -lnsl -lpam -ldl

# Linux, libc.so.6, TCP access control via /etc/hosts.allow (tcp_wrappers)
#CFLAGS = -O2 -Wall -pipe -DTCP_WRAPPERS
#LIBS = -lwrap -lnsl

# Linux, libc.so.6, no TCP access control
#CFLAGS = -O2 -Wall -pipe
#LIBS = -lnsl

# Linux, libc.so.5, TCP access control via /etc/hosts.allow (tcp_wrappers)
#CFLAGS = -O2 -Wall -pipe -DTCP_WRAPPERS
#LIBS = -lwrap

# Linux, libc.so.5, no TCP access control
#CFLAGS = -O2 -Wall -pipe
#LIBS =


#Moderately paranoid CFLAGS (this is moderately useful):
#CFLAGS = -Wall -Wtraditional -Wshadow -Wpointer-arith \
#	-Wcast-qual -Wcast-align -Wconversion \
#        -Wstrict-prototypes -Wnested-externs -Winline \
#	-Waggregate-return \
#	-O2 -fomit-frame-pointer -pipe

# Totally paranoid CFLAGS: (Only useful if you like warning messages:-))
#CFLAGS = -Wall -Wtraditional -Wshadow -Wpointer-arith \
#        -Wbad-function-cast -Wcast-qual -Wcast-align \
#        -Wwrite-strings -Wconversion -Waggregate-return \
#        -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
#        -Wredundant-decls -Wnested-externs -Winline \
#        -O2 -fomit-frame-pointer -pipe


# ------------------ END OF USER CONFIGURATIONS ---------------------------

OBJFILES=diald.o options.o modem.o filter.o slip.o lock.o ppp.o dev.o \
	proxyarp.o fsm.o timer.o parse.o buffer.o \
	route.o bufio.o utils.o firewall.o log.o access.o \
	proxy.o proxy_tap.o proxy_slip.o proxy_dev.o shell.o
SOURCEFILES=diald.c options.c modem.c filter.c slip.c lock.c ppp.c dev.c \
	proxyarp.c fsm.c timer.c firewall.c parse.c buffer.c \
	route.c bufio.c utils.c log.c access.c \
	proxy.c proxy_tap.c proxy_slip.c proxy_dev.c shell.c \
	bin patches config
HFILES=config.h diald.h firewall.h fsm.h version.h timer.h bufio.h access.h
DOCFILES=CHANGES README BUGS THANKS LICENSE doc/diald.man doc/diald-faq.txt \
	doc/dctrl.man doc/diald-examples.man doc/diald-control.man \
	doc/diald-monitor.man
CONTRIBFILES=contrib
DISTFILES=Makefile $(SOURCEFILES) $(HFILES) $(DOCFILES) $(CONTRIBFILES)

diald: $(OBJFILES)
	./fixwrappers
	$(CC) $(LDFLAGS) -o diald $(OBJFILES) $(LIBS)

install: diald
	-mkdir -p ${DESTDIR}${BINDIR}
	install -o root -g bin bin/dctrl ${DESTDIR}${BINDIR}/dctrl
	-mkdir -p ${DESTDIR}${SBINDIR}
	install -o root -g bin diald ${DESTDIR}${SBINDIR}/diald
	-mkdir -p ${DESTDIR}${MANDIR}/man1 ${DESTDIR}${MANDIR}/man5 \
		${DESTDIR}${MANDIR}/man8
	install -o root -g bin -m 0644 doc/diald.man ${DESTDIR}${MANDIR}/man8/diald.8
	install -o root -g bin -m 0644 doc/dctrl.man ${DESTDIR}${MANDIR}/man1/dctrl.1
	install -o root -g bin -m 0644 doc/diald-examples.man ${DESTDIR}${MANDIR}/man5/diald-examples.5
	install -o root -g bin -m 0644 doc/diald-control.man ${DESTDIR}${MANDIR}/man5/diald-control.5
	install -o root -g bin -m 0644 doc/diald-monitor.man ${DESTDIR}${MANDIR}/man5/diald-monitor.5
	-mkdir -p ${DESTDIR}${LIBDIR}
	install -o root -g bin lib/*.gif ${DESTDIR}${LIBDIR}
	install -o root -g bin -m 0644 config/diald.defs ${DESTDIR}${LIBDIR}/diald.defs
	install -o root -g bin -m 0644 config/standard.filter ${DESTDIR}${LIBDIR}/standard.filter
	install -o root -g root -m 0644 config/diald.pam ${DESTDIR}${PAMDIR}/diald
	install -o root -g bin bin/connect ${DESTDIR}${LIBDIR}/connect

clean:
	rm -f *.o diald

dist: $(DISTFILES)
	d=diald-`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.a]*\).*/\1/' -e q version.h` ; \
	rm -f ../$$d; \
	ln -s `pwd` ../$$d; \
	cd ..; \
	files=""; \
	for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
	tar chof $$d/$$d.tar $$files; \
	gzip $$d/$$d.tar ; \
	rm -f $$d

depend:
	$(CPP) -MM *.c > .depend

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif