Skip to content

Commit 0892d5a

Browse files
committed
Merge pull request #3 from shithead/master
FreeBSD support
2 parents ed096dc + 14af799 commit 0892d5a

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

Darwin.mak

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OS X
22
CC = MACOSX_DEPLOYMENT_TARGET="10.3" gcc
3+
LUA = lua
34
LDFLAGS = -fno-common -bundle -undefined dynamic_lookup
45
CLUA=-I/usr/local/include
5-
LLUA=-llua
6-
6+
LLUA=-l${LUA}

FreeBSD.mak

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# FreeBSD
2+
CC = clang
3+
LDFLAGS = -fPIC -fno-common -shared
4+
LUA = lua51
5+
CLUA=-I/usr/local/include -I/usr/local/include/${LUA}
6+
LLUA=-llua-5.1

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ echo:
5959
test: pcap.test $(TOUT)
6060

6161
%.test: %.lua net.so
62-
lua $<
62+
$(LUA) $<
6363
touch $@
6464

6565
%.test: %-test %.so
66-
lua $<
66+
$(LUA) $<
6767
touch $@
6868

6969
%.test: %-test net.so
70-
lua $<
70+
$(LUA) $<
7171
touch $@
7272

7373
doc: README.txt

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ systems.
88
The binding doesn't implement the full libpcap API, just what we've needed so
99
far.
1010

11-
To build, see Makefile, it supports Linux and OS X.
11+
To build, see Makefile, it supports FreeBSD, Linux and OS X.
1212

1313
To decode the packets, you might want to use libnet's lua bindings, see the
1414
lua/ subdirectory of <https://github.com/sam-github/libnet>.

README.txt.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ systems.
88
The binding doesn't implement the full libpcap API, just what we've needed so
99
far.
1010

11-
To build, see Makefile, it supports Linux and OS X.
11+
To build, see Makefile, it supports FreeBSD, Linux and OS X.
1212

1313
To decode the packets, you might want to use libnet's lua bindings, see the
1414
lua/ subdirectory of <https://github.com/sam-github/libnet>.

0 commit comments

Comments
 (0)