diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 11 insertions, 6 deletions
| @@ -64,8 +64,13 @@ GIT_VERSION=`sh -c 'command -v git >/dev/null && test -d .git && git rev-parse H | |||
| 64 | OPTS_debug=-D_DEBUG -g -ggdb # -pg -fprofile-arcs -ftest-coverage | 64 | OPTS_debug=-D_DEBUG -g -ggdb # -pg -fprofile-arcs -ftest-coverage |
| 65 | OPTS_production=-O3 | 65 | OPTS_production=-O3 |
| 66 | 66 | ||
| 67 | CFLAGS+=-I$(LIBOWFAT_HEADERS) -DGIT_VERSION=$(GIT_VERSION) -Wall -pipe -pthread -Wextra -Wwrite-strings #-ansi -pedantic | 67 | CFLAGS+=-DGIT_VERSION=$(GIT_VERSION) -Wall -pipe -pthread -Wextra -Wwrite-strings #-ansi -pedantic |
| 68 | LDFLAGS+=-L$(LIBOWFAT_LIBRARY) -lowfat -pthread | 68 | LDFLAGS+=-pthread |
| 69 | |||
| 70 | # Only the proxy, which has not been ported since the tracker went dual stack, | ||
| 71 | # still wants libowfat. | ||
| 72 | CFLAGS_libowfat=-I$(LIBOWFAT_HEADERS) | ||
| 73 | LDFLAGS_libowfat=-L$(LIBOWFAT_LIBRARY) -lowfat | ||
| 69 | 74 | ||
| 70 | BINARY =opentracker | 75 | BINARY =opentracker |
| 71 | HEADERS=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 | 76 | HEADERS=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 | |||
| 84 | CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES) | 89 | CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES) |
| 85 | CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES) | 90 | CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES) |
| 86 | 91 | ||
| 87 | CFLAGS_proxy = $(CFLAGS_production) -DWANT_SYNC_LIVE | 92 | CFLAGS_proxy = $(CFLAGS_production) $(CFLAGS_libowfat) -DWANT_SYNC_LIVE |
| 88 | CFLAGS_proxy_debug = $(CFLAGS_debug) -DWANT_SYNC_LIVE | 93 | CFLAGS_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) |
| 95 | proxy: $(OBJECTS_proxy) | 100 | proxy: $(OBJECTS_proxy) |
| 96 | $(CC) -o $@ $(OBJECTS_proxy) $(CFLAGS_production) $(LDFLAGS) | 101 | $(CC) -o $@ $(OBJECTS_proxy) $(CFLAGS_production) $(LDFLAGS) $(LDFLAGS_libowfat) |
| 97 | proxy.debug: $(OBJECTS_proxy_debug) | 102 | proxy.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) |
