File tree Expand file tree Collapse file tree 3 files changed +8
-20
lines changed Expand file tree Collapse file tree 3 files changed +8
-20
lines changed Original file line number Diff line number Diff line change
1
+ _ *
2
+ cap * .pcap
3
+ * .so
4
+ * .test
5
+
Original file line number Diff line number Diff line change 1
1
# Linux
2
2
CC = gcc
3
3
LDFLAGS = -fPIC -fno-common -shared
4
- BINDING += nfq.so
5
4
LUA = lua5.1
6
5
CLUA =$(shell pkg-config --cflags ${LUA})
7
6
LLUA =$(shell pkg-config --libs ${LUA})
Original file line number Diff line number Diff line change 4
4
5
5
default : build
6
6
7
- BINDING+ =net.so pcap.so nfq .so
7
+ BINDING = pcap.so
8
8
9
9
UNAME =$(shell uname)
10
10
@@ -19,7 +19,7 @@ SODIR = $(DESTDIR)$(prefix)/lib/lua/5.1/
19
19
.PHONY : install
20
20
install : $(BINDING )
21
21
mkdir -p $(SODIR )
22
- ../libnet/ install-sh -t $(SODIR ) $(BINDING )
22
+ install -t $(SODIR ) $(BINDING )
23
23
24
24
CWARNS = -Wall \
25
25
-pedantic \
@@ -43,32 +43,16 @@ CC.SO := $(CC) $(COPT) $(CFLAGS)
43
43
% .so : % .c
44
44
$(CC.SO ) -o $@ $^ $(LDLIBS )
45
45
46
- net.so : net.c libnet_decode.c
47
- net.so : LDLIBS+=$(LDDNET ) $(LDLNET )
48
- net.so : CDEFS=$(DNETDEFS ) $(LNETDEFS )
49
-
50
46
pcap.so : pcap.c
51
47
pcap.so : LDLIBS+=-lpcap
52
48
53
- nfq.so : nfq.c nflua.h
54
- nfq.so : LDLIBS+=-lnetfilter_queue
55
-
56
- nfct.so : nfct.c nflua.h
57
- nfct.so : LDLIBS+=-lnetfilter_conntrack
58
-
59
- options :
60
- ./luaopts PF /usr/include/bits/socket.h > _pf.c
61
- ./luaopts IPPROTO /usr/include/netinet/in.h > _ipproto.c
62
- ./luaopts ATTR /usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h > _attr.c
63
- ./luaopts NFCT_Q /usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h > _nfct_q.c
64
-
65
49
TNET =$(wildcard test-* .lua)
66
50
TOUT=$(TNET:.lua =.test)
67
51
68
52
echo :
69
53
echo $(TOUT )
70
54
71
- test : net.test pcap.test recoding .test $(TOUT )
55
+ test : pcap.test $(TOUT )
72
56
73
57
% .test : % .lua net.so
74
58
lua $<
You can’t perform that action at this time.
0 commit comments