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
|
$NetBSD: patch-aa,v 1.9 2011/12/07 15:18:51 joerg Exp $
--- Makefile.in.orig 2004-03-04 20:33:56.000000000 +0000
+++ Makefile.in
@@ -1,4 +1,4 @@
-#
+#
# Makefile for tcptrace
#
srcdir = @srcdir@
@@ -34,8 +34,8 @@ DEFINES += -DBUNZIP2="\"bunzip2\""
#
##################################################################
PCAP_LDLIBS = @V_PCAP_LDLIBS@
-PCAP_INCS = -I/usr/local/include -I. -I../pcap -I/usr/include/pcap
-PCAP_LDFLAGS = -L/usr/local/lib -Llib -Lpcap -L../pcap -L./cygwin-libs
+PCAP_INCS = -I.
+PCAP_LDFLAGS = -Llib -L./cygwin-libs
@@ -129,8 +129,8 @@ DEFINES += -DGROK_ERF
#
##################################################################
# Pathname of directory to install the binary
-BINDIR = /usr/local/bin
-MANDIR = /usr/local/man/
+BINDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man
##################################################################
@@ -151,7 +151,7 @@ INCLS = -I. @V_INCLS@ ${PCAP_INCS}
# Probably want full optimization
# FreeBSD needs -Ae
# HP needs -Ae
-CFLAGS = $(CCOPT) $(DEFINES) @DEFS@ @V_DEFINES@ $(INCLS)
+CFLAGS += $(CCOPT) $(DEFINES) @DEFS@ @V_DEFINES@ $(INCLS)
# Standard LIBS
LDLIBS = @LIBS@ ${PCAP_LDLIBS}
@@ -196,7 +196,7 @@ tcptrace: ${OFILES}
# your machine, just hack in a quick string below in place of the command.
version.o: ${CFILES} Makefile
${CC} ${CFLAGS} -o version.o -c $(srcdir)/version.c \
- -DBUILT_USER="\"`whoami`\"" -DBUILT_HOST="\"`hostname`\"" -DBUILT_DATE="\"`date`\""
+ -DBUILT_USER="\"${USER}\"" -DBUILT_HOST="\"${HOST}\"" -DBUILT_DATE="\"`date`\""
#
# special rules for scanner/parser
@@ -210,26 +210,11 @@ YACC_VAL=@YACC@
LEX_VAL=@LEX@
filt_parser.c: filt_parser.y filter.h
- if test "${YACC_VAL}" = "bison -y" ; then \
- @YACC@ -vd -p filtyy -o filt_parser.c $(srcdir)/filt_parser.y ;\
- cp filt_parser.c flex_bison ;\
- cp filt_parser.h flex_bison ;\
- else \
- echo "Could not find BISON on this system";\
- echo "Copying the BISON output files generated at our place" ;\
- cp flex_bison/filt_parser.c . ;\
- cp flex_bison/filt_parser.h . ;\
- fi
+ @YACC@ -vd -p filtyy -o filt_parser.c $(srcdir)/filt_parser.y
filt_scanner.c: filt_scanner.l filter.h filt_parser.h
- if test ${LEX_VAL} = "flex" ; then \
- @LEX@ -t -Pfiltyy $(srcdir)/filt_scanner.l > filt_scanner.c ;\
- cp filt_scanner.c flex_bison ;\
- else \
- echo "Could not find FLEX on this system" ;\
- echo "Copying the FLEX output files generated at our place" ;\
- cp flex_bison/filt_scanner.c . ;\
- fi
+ @LEX@ -t -Pfiltyy $(srcdir)/filt_scanner.l > filt_scanner.c
+ cp filt_scanner.c flex_bison
# filt_parser.h created as a side effect of running yacc...
filt_parser.h: filt_parser.c
|