forked from adam-palmer1/tundeep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (23 loc) · 792 Bytes
/
Makefile
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
#Makefile for tundeep
#To disable Linux specific features i.e. tun/tap (not recommended), remove '-D_LINUX'
#To disable zlib compression support, remote '-D_COMPRESS -lz'
CC=gcc
MY_MACH := $(shell gcc -dumpmachine)
ifneq (, $(findstring cygwin, $(MY_MACH)))
MY_OS := Cygwin
else
MY_OS := Linux
endif
ifeq ($(MY_OS), Cygwin)
#Cygwin
CFLAGS=-s -I -O3 -Wall -W -D_COMPRESS -lz -lpthread -lwpcap
else
#Linux
# CFLAGS=-s -I -O3 -Wall -W -D_LINUX -D_COMPRESS -lz -lpthread -lpcap
CFLAGS=-s -O3 -Wall -Wextra -Wno-stringop-truncation -D_LINUX -lpthread -lpcap
endif
tundeep: main.o pcap.o threads.o recv.o misc.o sock.o tap.o
@echo "Building for: $(MY_OS) ($(MY_MACH))"
$(CC) -o tundeep main.o pcap.o threads.o recv.o misc.o sock.o tap.o $(CFLAGS)
clean:
rm -f *.o tundeep tundeep.exe