summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-02 02:30:38 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-02 02:30:38 +0100
commitbe82b2aa821d0635e8a7d12792b02e9e56675aa2 (patch)
tree7dc9a17850f9d8faa63b9b6314242bc016959036 /Makefile
parent5e15d0c9cd5d9a432999f242e931951e64404c05 (diff)
The proxy did not survive the dual stack migration, might be resurrected in v1.1.0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 12 insertions, 28 deletions
diff --git a/Makefile b/Makefile
index a4fe92f..587af67 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,6 @@
1# $Id$ 1# $Id$
2 2
3# Linux flavour
4# PREFIX?=/opt/diet
5# LIBOWFAT_HEADERS=$(PREFIX)/include
6# LIBOWFAT_LIBRARY=$(PREFIX)/lib
7
8# BSD flavour
9# PREFIX?=/usr/local
10# LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat
11# LIBOWFAT_LIBRARY=$(PREFIX)/lib
12
13# Debug flavour
14PREFIX?=.. 3PREFIX?=..
15LIBOWFAT_HEADERS=$(PREFIX)/libowfat
16LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
17
18BINDIR?=$(PREFIX)/bin 4BINDIR?=$(PREFIX)/bin
19STRIP?=strip 5STRIP?=strip
20 6
@@ -62,11 +48,6 @@ OPTS_production=-O3
62CFLAGS+=-DOT_VERSION=\"$(VERSION)\" -DGIT_VERSION=\"$(GIT_VERSION)\" -Wall -pipe -pthread -Wextra -Wwrite-strings #-ansi -pedantic 48CFLAGS+=-DOT_VERSION=\"$(VERSION)\" -DGIT_VERSION=\"$(GIT_VERSION)\" -Wall -pipe -pthread -Wextra -Wwrite-strings #-ansi -pedantic
63LDFLAGS+=-pthread 49LDFLAGS+=-pthread
64 50
65# Only the proxy, which has not been ported since the tracker went dual stack,
66# still wants libowfat.
67CFLAGS_libowfat=-I$(LIBOWFAT_HEADERS)
68LDFLAGS_libowfat=-L$(LIBOWFAT_LIBRARY) -lowfat
69
70# Record feature flags as a dep to allow rebuild when they change 51# Record feature flags as a dep to allow rebuild when they change
71BUILDSTAMP=.buildstamp 52BUILDSTAMP=.buildstamp
72BUILDDEPS=Makefile $(BUILDSTAMP) 53BUILDDEPS=Makefile $(BUILDSTAMP)
@@ -79,25 +60,28 @@ FORCE:
79BINARY =opentracker 60BINARY =opentracker
80HEADERS=trackerlogic.h ot_urlencoded.h ot_batch.h ot_buf.h ot_event.h ot_fdstate.h ot_fmt.h ot_hex.h ot_ip.h ot_config.h ot_scan.h ot_socket.h ot_tcp.h ot_worker.h ot_workqueue.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 61HEADERS=trackerlogic.h ot_urlencoded.h ot_batch.h ot_buf.h ot_event.h ot_fdstate.h ot_fmt.h ot_hex.h ot_ip.h ot_config.h ot_scan.h ot_socket.h ot_tcp.h ot_worker.h ot_workqueue.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
81SOURCES=opentracker.c trackerlogic.c ot_urlencoded.c ot_batch.c ot_buf.c ot_event.c ot_fdstate.c ot_fmt.c ot_hex.c ot_ip.c ot_config.c ot_scan.c ot_socket.c ot_tcp.c ot_worker.c ot_workqueue.c ot_mutex.c ot_random.c ot_stats.c ot_vector.c ot_clean.c ot_udp.c ot_iovec.c ot_fullscrape.c ot_accesslist.c ot_http.c ot_livesync.c ot_rijndael.c 62SOURCES=opentracker.c trackerlogic.c ot_urlencoded.c ot_batch.c ot_buf.c ot_event.c ot_fdstate.c ot_fmt.c ot_hex.c ot_ip.c ot_config.c ot_scan.c ot_socket.c ot_tcp.c ot_worker.c ot_workqueue.c ot_mutex.c ot_random.c ot_stats.c ot_vector.c ot_clean.c ot_udp.c ot_iovec.c ot_fullscrape.c ot_accesslist.c ot_http.c ot_livesync.c ot_rijndael.c
82SOURCES_proxy=proxy.c ot_batch.c ot_fdstate.c ot_vector.c ot_mutex.c ot_random.c ot_scan.c ot_ip.c ot_socket.c
83 63
84all: $(BINARY) $(BINARY).debug 64all: $(BINARY) $(BINARY).debug
85 65
86CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES) 66CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES)
87CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES) 67CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES)
88 68
89CFLAGS_proxy = $(CFLAGS_production) $(CFLAGS_libowfat) -DWANT_SYNC_LIVE
90CFLAGS_proxy_debug = $(CFLAGS_debug) $(CFLAGS_libowfat) -DWANT_SYNC_LIVE
91
92$(BINARY): $(SOURCES) $(HEADERS) $(BUILDDEPS) 69$(BINARY): $(SOURCES) $(HEADERS) $(BUILDDEPS)
93 $(CC) -o $@ $(CFLAGS_production) $(SOURCES) $(LDFLAGS) 70 $(CC) -o $@ $(CFLAGS_production) $(SOURCES) $(LDFLAGS)
94 $(STRIP) $@ 71 $(STRIP) $@
95$(BINARY).debug: $(SOURCES) $(HEADERS) $(BUILDDEPS) 72$(BINARY).debug: $(SOURCES) $(HEADERS) $(BUILDDEPS)
96 $(CC) -o $@ $(CFLAGS_debug) $(SOURCES) $(LDFLAGS) 73 $(CC) -o $@ $(CFLAGS_debug) $(SOURCES) $(LDFLAGS)
97proxy: $(SOURCES_proxy) $(HEADERS) $(BUILDDEPS) 74
98 $(CC) -o $@ $(CFLAGS_proxy) $(SOURCES_proxy) $(LDFLAGS) $(LDFLAGS_libowfat) 75# The proxy is out of service
99proxy.debug: $(SOURCES_proxy) $(HEADERS) $(BUILDDEPS) 76#
100 $(CC) -o $@ $(CFLAGS_proxy_debug) $(SOURCES_proxy) $(LDFLAGS) $(LDFLAGS_libowfat) 77# SOURCES_proxy=proxy.c ot_batch.c ot_fdstate.c ot_vector.c ot_mutex.c ot_random.c ot_scan.c ot_ip.c ot_socket.c
78# CFLAGS_proxy = $(CFLAGS_production) -DWANT_SYNC_LIVE
79# CFLAGS_proxy_debug = $(CFLAGS_debug) -DWANT_SYNC_LIVE
80#
81# proxy: $(SOURCES_proxy) $(HEADERS) $(BUILDDEPS)
82# $(CC) -o $@ $(CFLAGS_proxy) $(SOURCES_proxy) $(LDFLAGS)
83# proxy.debug: $(SOURCES_proxy) $(HEADERS) $(BUILDDEPS)
84# $(CC) -o $@ $(CFLAGS_proxy_debug) $(SOURCES_proxy) $(LDFLAGS)
101 85
102# Unit tests. The modules under test are compiled straight into the test 86# Unit tests. The modules under test are compiled straight into the test
103# binary, so a test may reach a static function by including the source if it 87# binary, so a test may reach a static function by including the source if it
@@ -174,7 +158,7 @@ check-all:
174 158
175.PHONY: all FORCE dist check check-poll check-sanitize check-integration check-tsan check-all clean install 159.PHONY: all FORCE dist check check-poll check-sanitize check-integration check-tsan check-all clean install
176 160
177BINARIES=opentracker opentracker.debug opentracker.integration opentracker.tsan proxy proxy.debug $(TESTBIN) $(TESTBIN).sanitize $(TESTBIN).poll 161BINARIES=opentracker opentracker.debug opentracker.integration opentracker.tsan $(TESTBIN) $(TESTBIN).sanitize $(TESTBIN).poll
178 162
179clean: 163clean:
180 rm -rf $(BINARIES) $(BINARIES:=.dSYM) $(BUILDSTAMP) *.o *~ 164 rm -rf $(BINARIES) $(BINARIES:=.dSYM) $(BUILDSTAMP) *.o *~