File: Makefile

package info (click to toggle)
tcpspy 1.7d-17
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 364 kB
  • sloc: ansic: 3,318; lex: 467; yacc: 204; makefile: 54; sh: 42
file content (52 lines) | stat: -rw-r--r-- 1,420 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
# Makefile for tcpspy
# Tim J. Robbins, 2000
# $Id: Makefile,v 2.5 2001/04/25 01:40:17 tim Stab $

# You may specify the syslog facility to use here. If in doubt, use LOG_DAEMON
# or LOG_LOCAL[0-7]. See the syslog(3) manual page for a complete list of
# facilities.
CFLAGS+=-DFACILITY=LOG_LOCAL1

# You may also override the default number of buckets in the connection table
# here, but this not usually necessary.
#CFLAGS+=-DCONNTABLE_BUCKETS=5003

# Comment out the following line to enable debugging (slower!)
CFLAGS+=-DNDEBUG

# Add any other options for the compiler here
#CFLAGS+=-O2 -Wall -W


default: tcpspy
all: tcpspy doc

tcpspy: log.o rule_lexer.o rule_grammar.o rule.o tcpspy.o
	$(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) log.o rule_lexer.o rule_grammar.o rule.o tcpspy.o -o tcpspy

log.o: log.c

rule_lexer.o: rule_lexer.c
rule_lexer.c: rule_grammar.c rule_lexer.l
	flex -Prule -orule_lexer.c rule_lexer.l

rule_grammar.o: rule_grammar.c
rule_grammar.c: rule_grammar.y
	bison -p rule -o rule_grammar.c -d rule_grammar.y

rule.o: rule.c

tcpspy.o: tcpspy.c

doc:
	groff -Tps -man tcpspy.8 >tcpspy.ps
	ps2pdf tcpspy.ps tcpspy.pdf

clean:
	rm -f log.o rule_lexer.o rule_grammar.o rule_lexer.c \
		rule_grammar.c rule_grammar.h rule.o tcpspy.o tcpspy \
		tcpspy.ps tcpspy.pdf

install: tcpspy
	install -m 644 -D tcpspy.8 $(DESTDIR)/usr/share/man/man8/tcpspy.8
	install -m 755 -D tcpspy $(DESTDIR)/usr/sbin/tcpspy