-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jmakefile
78 lines (67 loc) · 1.7 KB
/
Jmakefile
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
baseDir := ~
libsDir := $(baseDir)/libs
projectName := ban2fail
versions := debug release
cc_exe := ban2fail b2f-grep
#install_dir := /usr/local/bin
########################################
# Set up sources & libraries here. #
########################################
ifeq ($(exe), ban2fail)
src := \
addrRpt.c \
ban2fail.c \
cfgmap.c \
cntry.c \
dynstack.c \
es.c \
ez_libc.c \
ez_libdb.c \
ez_libpthread.c \
ez_libz.c \
iptables.c \
logType.c \
logFile.c \
map.c \
maxoff.c \
msgqueue.c \
obsvTpl.c \
offEntry.c \
pdns.c \
ptrvec.c \
str.c \
target.c \
timestamp.c \
util.c \
libs += z crypto GeoIP pthread db
endif
ifeq ($(exe), b2f-grep)
src := \
ez_libc.c \
b2f-grep.c \
ptrvec.c \
str.c \
util.c \
libs += gmp
endif
ifeq ($(exe), fsckdns)
src := \
ez_libc.c \
fsckdns.c \
str.c \
util.c \
# libs := z crypto GeoIP pthread
endif
########################################
# Set up custom compile flags here. #
########################################
ifeq ($(version),debug)
local_cppflags := $(local_cppflags) -D_DEBUG -DDEBUG -std=gnu99
local_codeflags := -g2 -O0 -Wreturn-type -Wformat -Wchar-subscripts -Wparentheses -Wcast-qual -Wmissing-declarations
local_ldflags := $(local_ldflags) -L$(libsDir)/$(version)
endif
ifeq ($(version),release)
local_cppflags := $(local_cppflags) -DNDEBUG -std=gnu99
local_codeflags := -g0 -O3 -Wreturn-type -Wformat -Wchar-subscripts -Wparentheses -Wcast-qual -Wmissing-declarations
local_ldflags := $(local_ldflags) -L$(libsDir)/$(version)
endif