Skip to content

Commit 8b0fd76

Browse files
committed
Updated Makefile after pulling from libnet/lua.
1 parent c3ddd6e commit 8b0fd76

File tree

3 files changed

+8
-20
lines changed

3 files changed

+8
-20
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_*
2+
cap*.pcap
3+
*.so
4+
*.test
5+

Linux.mak

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Linux
22
CC = gcc
33
LDFLAGS = -fPIC -fno-common -shared
4-
BINDING += nfq.so
54
LUA = lua5.1
65
CLUA=$(shell pkg-config --cflags ${LUA})
76
LLUA=$(shell pkg-config --libs ${LUA})

Makefile

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
default: build
66

7-
BINDING+=net.so pcap.so nfq.so
7+
BINDING=pcap.so
88

99
UNAME=$(shell uname)
1010

@@ -19,7 +19,7 @@ SODIR = $(DESTDIR)$(prefix)/lib/lua/5.1/
1919
.PHONY: install
2020
install: $(BINDING)
2121
mkdir -p $(SODIR)
22-
../libnet/install-sh -t $(SODIR) $(BINDING)
22+
install -t $(SODIR) $(BINDING)
2323

2424
CWARNS = -Wall \
2525
-pedantic \
@@ -43,32 +43,16 @@ CC.SO := $(CC) $(COPT) $(CFLAGS)
4343
%.so: %.c
4444
$(CC.SO) -o $@ $^ $(LDLIBS)
4545

46-
net.so: net.c libnet_decode.c
47-
net.so: LDLIBS+=$(LDDNET) $(LDLNET)
48-
net.so: CDEFS=$(DNETDEFS) $(LNETDEFS)
49-
5046
pcap.so: pcap.c
5147
pcap.so: LDLIBS+=-lpcap
5248

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-
6549
TNET=$(wildcard test-*.lua)
6650
TOUT=$(TNET:.lua=.test)
6751

6852
echo:
6953
echo $(TOUT)
7054

71-
test: net.test pcap.test recoding.test $(TOUT)
55+
test: pcap.test $(TOUT)
7256

7357
%.test: %.lua net.so
7458
lua $<

0 commit comments

Comments
 (0)