ban2fail/Jmakefile

65 lines
1.5 KiB
Plaintext
Raw Normal View History

2019-11-23 05:16:33 +00:00
baseDir := ~
libsDir := $(baseDir)/libs
projectName := ban2fail
versions := debug release
2019-12-02 15:19:22 +00:00
cc_exe := ban2fail fsckdns
2019-11-30 19:32:12 +00:00
install_dir := /usr/local/bin
2019-11-23 05:16:33 +00:00
########################################
# Set up sources & libraries here. #
########################################
ifeq ($(exe), ban2fail)
src := \
2019-12-02 03:29:32 +00:00
addrRpt.c \
2019-11-23 05:16:33 +00:00
ban2fail.c \
cfgmap.c \
cntry.c \
2019-12-03 02:56:55 +00:00
dynstack.c \
2019-11-29 22:23:16 +00:00
es.c \
ez_es.c \
2019-11-29 14:00:39 +00:00
ez_libc.c \
2019-12-03 02:56:55 +00:00
ez_libdb.c \
2019-11-29 14:00:39 +00:00
ez_libz.c \
2019-11-23 05:16:33 +00:00
iptables.c \
logType.c \
logFile.c \
map.c \
maxoff.c \
2019-11-29 22:23:16 +00:00
msgqueue.c \
2019-12-03 02:56:55 +00:00
obsvTpl.c \
2019-12-01 22:23:30 +00:00
offEntry.c \
pdns.c \
2019-11-23 05:16:33 +00:00
ptrvec.c \
str.c \
util.c \
2019-12-03 02:56:55 +00:00
libs := z crypto GeoIP pthread db
2019-11-23 05:16:33 +00:00
endif
2019-12-02 15:19:22 +00:00
ifeq ($(exe), fsckdns)
src := \
ez_libc.c \
fsckdns.c \
str.c \
util.c \
# libs := z crypto GeoIP pthread
endif
2019-11-23 05:16:33 +00:00
########################################
# 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