diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-24 01:50:25 +0200 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-24 01:50:25 +0200 |
| commit | ecb1f1e92ab449023d1427f9db26c5bac09c4901 (patch) | |
| tree | 5af48da0cac32e2927aa5e2946c9f08173fedb69 /Makefile | |
| parent | e4b6decf72a91453bc8d31b4b15e7aed923c56d2 (diff) | |
Use new entropy fascility and add tests for it
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 9 insertions, 8 deletions
| @@ -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 | |||
| 67 | LDFLAGS+=-L$(LIBOWFAT_LIBRARY) -lowfat -pthread | 68 | LDFLAGS+=-L$(LIBOWFAT_LIBRARY) -lowfat -pthread |
| 68 | 69 | ||
| 69 | BINARY =opentracker | 70 | BINARY =opentracker |
| 70 | HEADERS=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 | 71 | HEADERS=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 |
| 71 | SOURCES=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 | 72 | SOURCES=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 |
| 72 | SOURCES_proxy=proxy.c ot_vector.c ot_mutex.c | 73 | SOURCES_proxy=proxy.c ot_vector.c ot_mutex.c ot_random.c |
| 73 | 74 | ||
| 74 | OBJECTS = $(SOURCES:%.c=%.o) | 75 | OBJECTS = $(SOURCES:%.c=%.o) |
| 75 | OBJECTS_debug = $(SOURCES:%.c=%.debug.o) | 76 | OBJECTS_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. |
| 106 | TESTBIN=tests/runner | 107 | TESTBIN=tests/runner |
| 107 | TEST_SOURCES=tests/runner.c tests/test.c tests/stubs.c tests/t_scan_urlencoded_query.c tests/t_iovec.c tests/t_vector.c | 108 | TEST_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 |
| 108 | TEST_UNITS=scan_urlencoded_query.c ot_iovec.c ot_vector.c | 109 | TEST_UNITS=scan_urlencoded_query.c ot_iovec.c ot_vector.c ot_random.c |
| 109 | TEST_HEADERS=tests/test.h $(HEADERS) | 110 | TEST_HEADERS=tests/test.h $(HEADERS) |
| 110 | CFLAGS_test = $(CFLAGS) -I. -g -O1 $(FEATURES) | 111 | CFLAGS_test = $(CFLAGS) -I. -g -O1 $(FEATURES) |
| 111 | 112 | ||
