summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 11 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index a373633..87225f7 100644
--- a/Makefile
+++ b/Makefile
@@ -64,8 +64,13 @@ GIT_VERSION=`sh -c 'command -v git >/dev/null && test -d .git && git rev-parse H
64OPTS_debug=-D_DEBUG -g -ggdb # -pg -fprofile-arcs -ftest-coverage 64OPTS_debug=-D_DEBUG -g -ggdb # -pg -fprofile-arcs -ftest-coverage
65OPTS_production=-O3 65OPTS_production=-O3
66 66
67CFLAGS+=-I$(LIBOWFAT_HEADERS) -DGIT_VERSION=$(GIT_VERSION) -Wall -pipe -pthread -Wextra -Wwrite-strings #-ansi -pedantic 67CFLAGS+=-DGIT_VERSION=$(GIT_VERSION) -Wall -pipe -pthread -Wextra -Wwrite-strings #-ansi -pedantic
68LDFLAGS+=-L$(LIBOWFAT_LIBRARY) -lowfat -pthread 68LDFLAGS+=-pthread
69
70# Only the proxy, which has not been ported since the tracker went dual stack,
71# still wants libowfat.
72CFLAGS_libowfat=-I$(LIBOWFAT_HEADERS)
73LDFLAGS_libowfat=-L$(LIBOWFAT_LIBRARY) -lowfat
69 74
70BINARY =opentracker 75BINARY =opentracker
71HEADERS=trackerlogic.h ot_urlencoded.h ot_batch.h ot_buf.h ot_event.h ot_fdstate.h ot_hex.h ot_ip.h ot_config.h ot_scan.h ot_socket.h ot_mutex.h ot_random.h ot_stats.h ot_vector.h ot_clean.h ot_udp.h ot_iovec.h ot_fullscrape.h ot_accesslist.h ot_http.h ot_livesync.h ot_rijndael.h 76HEADERS=trackerlogic.h ot_urlencoded.h ot_batch.h ot_buf.h ot_event.h ot_fdstate.h ot_hex.h ot_ip.h ot_config.h ot_scan.h ot_socket.h ot_mutex.h ot_random.h ot_stats.h ot_vector.h ot_clean.h ot_udp.h ot_iovec.h ot_fullscrape.h ot_accesslist.h ot_http.h ot_livesync.h ot_rijndael.h
@@ -84,8 +89,8 @@ all: $(BINARY) $(BINARY).debug
84CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES) 89CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES)
85CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES) 90CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES)
86 91
87CFLAGS_proxy = $(CFLAGS_production) -DWANT_SYNC_LIVE 92CFLAGS_proxy = $(CFLAGS_production) $(CFLAGS_libowfat) -DWANT_SYNC_LIVE
88CFLAGS_proxy_debug = $(CFLAGS_debug) -DWANT_SYNC_LIVE 93CFLAGS_proxy_debug = $(CFLAGS_debug) $(CFLAGS_libowfat) -DWANT_SYNC_LIVE
89 94
90$(BINARY): $(OBJECTS) 95$(BINARY): $(OBJECTS)
91 $(CC) -o $@ $(OBJECTS) $(LDFLAGS) 96 $(CC) -o $@ $(OBJECTS) $(LDFLAGS)
@@ -93,9 +98,9 @@ $(BINARY): $(OBJECTS)
93$(BINARY).debug: $(OBJECTS_debug) 98$(BINARY).debug: $(OBJECTS_debug)
94 $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS) 99 $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS)
95proxy: $(OBJECTS_proxy) 100proxy: $(OBJECTS_proxy)
96 $(CC) -o $@ $(OBJECTS_proxy) $(CFLAGS_production) $(LDFLAGS) 101 $(CC) -o $@ $(OBJECTS_proxy) $(CFLAGS_production) $(LDFLAGS) $(LDFLAGS_libowfat)
97proxy.debug: $(OBJECTS_proxy_debug) 102proxy.debug: $(OBJECTS_proxy_debug)
98 $(CC) -o $@ $(OBJECTS_proxy_debug) $(LDFLAGS) 103 $(CC) -o $@ $(OBJECTS_proxy_debug) $(LDFLAGS) $(LDFLAGS_libowfat)
99 104
100$(OBJECTS): $(HEADERS) 105$(OBJECTS): $(HEADERS)
101$(OBJECTS_debug): $(HEADERS) 106$(OBJECTS_debug): $(HEADERS)