summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-24 01:50:25 +0200
committerDirk Engling <erdgeist@erdgeist.org>2026-10-24 01:50:25 +0200
commitecb1f1e92ab449023d1427f9db26c5bac09c4901 (patch)
tree5af48da0cac32e2927aa5e2946c9f08173fedb69 /Makefile
parente4b6decf72a91453bc8d31b4b15e7aed923c56d2 (diff)
Use new entropy fascility and add tests for it
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 8f967f7..60a61cd 100644
--- a/Makefile
+++ b/Makefile
@@ -51,9 +51,10 @@ FEATURES+=-DWANT_FULLSCRAPE
51# full scrape transfer, if you rely on an older versions, enable this flag 51# full scrape transfer, if you rely on an older versions, enable this flag
52#FEATURES+=-DWANT_NO_AUTO_FREE 52#FEATURES+=-DWANT_NO_AUTO_FREE
53 53
54# Is enabled on BSD systems by default in trackerlogic.h 54# opentracker takes its randomness from arc4random, which is part of libc on
55# on Linux systems the include Makefile adds -lbsd 55# the BSDs, on macOS and on glibc 2.36 and newer. On an older glibc or on musl
56#include Makefile.arc4random 56# it comes from libbsd instead, so uncomment the next include to link it.
57#LDFLAGS+=-lbsd
57 58
58#FEATURES+=-D_DEBUG_HTTPERROR 59#FEATURES+=-D_DEBUG_HTTPERROR
59#FEATURES+=-D_DEBUG_RANDOMTORRENTS 60#FEATURES+=-D_DEBUG_RANDOMTORRENTS
@@ -67,9 +68,9 @@ CFLAGS+=-I$(LIBOWFAT_HEADERS) -DGIT_VERSION=$(GIT_VERSION) -Wall -pipe -pthread
67LDFLAGS+=-L$(LIBOWFAT_LIBRARY) -lowfat -pthread 68LDFLAGS+=-L$(LIBOWFAT_LIBRARY) -lowfat -pthread
68 69
69BINARY =opentracker 70BINARY =opentracker
70HEADERS=trackerlogic.h scan_urlencoded_query.h ot_mutex.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 71HEADERS=trackerlogic.h scan_urlencoded_query.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
71SOURCES=opentracker.c trackerlogic.c scan_urlencoded_query.c ot_mutex.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 72SOURCES=opentracker.c trackerlogic.c scan_urlencoded_query.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
72SOURCES_proxy=proxy.c ot_vector.c ot_mutex.c 73SOURCES_proxy=proxy.c ot_vector.c ot_mutex.c ot_random.c
73 74
74OBJECTS = $(SOURCES:%.c=%.o) 75OBJECTS = $(SOURCES:%.c=%.o)
75OBJECTS_debug = $(SOURCES:%.c=%.debug.o) 76OBJECTS_debug = $(SOURCES:%.c=%.debug.o)
@@ -104,8 +105,8 @@ proxy.debug: $(OBJECTS_proxy_debug) $(HEADERS)
104# has to. tests/stubs.c supplies the few symbols those modules reference but 105# has to. tests/stubs.c supplies the few symbols those modules reference but
105# the tests never reach. 106# the tests never reach.
106TESTBIN=tests/runner 107TESTBIN=tests/runner
107TEST_SOURCES=tests/runner.c tests/test.c tests/stubs.c tests/t_scan_urlencoded_query.c tests/t_iovec.c tests/t_vector.c 108TEST_SOURCES=tests/runner.c tests/test.c tests/stubs.c tests/t_scan_urlencoded_query.c tests/t_iovec.c tests/t_vector.c tests/t_random.c
108TEST_UNITS=scan_urlencoded_query.c ot_iovec.c ot_vector.c 109TEST_UNITS=scan_urlencoded_query.c ot_iovec.c ot_vector.c ot_random.c
109TEST_HEADERS=tests/test.h $(HEADERS) 110TEST_HEADERS=tests/test.h $(HEADERS)
110CFLAGS_test = $(CFLAGS) -I. -g -O1 $(FEATURES) 111CFLAGS_test = $(CFLAGS) -I. -g -O1 $(FEATURES)
111 112