blob: 6deefc4a2bc80efd05ceb8b765ccc20298326d00 (
plain)
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
|
#
# Makefile of (m)bscan v0.0, skyper
# Massiv Banner Scanner
#
CC=gcc
COPT=-Wall -ggdb -I../include -I/usr/include/pcap -static
LEX=flex
LEXOPT=
OBJS=bscan.o arpg.o snarf.o network_raw.o restore.o
OBJS2=tty.o system.o signal.o dcd_icmp.o garage.o cf_prse.o module.o
SUPOBJ=../support/hpuxdl.o ../support/snprintf.o
TARGET=bscan
INDENT=indent
INDENT_OPT=-bap -nbc -bbo -bl -bli0 -bls -ncdb -nce -cp1 -cs -di2 -ndj -nfc1 -nfca -hnl -i4 -ip5 -lp -psl -nsc -nsob
# LINUX
#######
LOPT=-export-dynamic
DEFS=`libnet-config --defines` -DHAVE_DLSYM -D_SVID_SOURCE #-DDEBUG
LIBS=-lpcap -ldl -lm `libnet-config --libs` -lpthread
# SunOS 5.7/5.8 + gcc
#####################
#LOPT=-export-dynamic
#DEFS=`libnet-config --defines` -DHAVE_DLSYM #-DDEBUG
#LIBS=-lpcap -ldl -lm `libnet-config --libs` -lpthread
# HP-UX 11.00
#############
#LOPT=-Xlinker -E
#DEFS=`libnet-config --defines` -DHAVE_DLSYM #-DDEBUG
#LIBS=-lpcap -ldld -lm `libnet-config --libs` -lpthread
# HP-UX 10.20
# HP-UX 10.20 is not supported. You need snprintf.c and
# some hacks to use IP_HDRINCL and the kernel patches
# to access the link_layer interface.
#############
#LOPT=-Xlinker -E
#DEFS=`libnet-config --defines` -DHAVE_DLSYM -DHP10 #-DDEBUG
#LIBS=-lpcap -ldld -lm `libnet-config --libs` -lpthread
# OpenBSD
#########
#LOPT=
#DEFS=`libnet-config --defines` -DHAVE_DLSYM #-DDEBUG
#LIBS=-lpcap -lm `libnet-config --libs` -lpthread
all: $(SUPOBJ) $(OBJS2) $(OBJS)
$(CC) $(SUPOBJ) $(OBJS) $(OBJS2) $(LOPT) $(LIBS) $(COPT) -o $(TARGET)
cf_prse.o:
$(LEX) $(LEXOPT) -ocf_prse.c cf_prse.l
$(CC) $(COPT) -c cf_prse.c
dcd_icmp.o: dcd_icmp.c
$(CC) $(COPT) -c dcd_icmp.c
garage.o: garage.c
$(CC) $(COPT) -c garage.c
module.o: module.c
$(CC) $(COPT) $(DEFS) -c module.c
system.o: system.c
$(CC) $(COPT) -c system.c
tty.o: tty.c
$(CC) $(COPT) -c tty.c
signal.o: signal.c
$(CC) $(COPT) -c signal.c
../support/hpuxdl.o: ../support/hpuxdl.c
$(MAKE) -C ../support
../support/snprintf.o: ../support/snprintf.c
$(MAKE) -C ../support
.c.o:
$(CC) $(COPT) $(DEFS) -c $<
clean:
rm -f $(OBJS) $(OBJS2) $(TARGET) cf_prse.c core *~
indent:
$(INDENT) $(INDENT_OPT) *.c *.h
|