diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 20:50:24 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 21:14:02 +0100 |
| commit | ad541c67761b8aa6da1566802c347cac4018d0c2 (patch) | |
| tree | a9166fa9d349911d69a6948e53b05344dcc348a0 | |
| parent | c679ff8a3b1418a5960cc49ba6458a0007df54fa (diff) | |
Move the build sources into src/
| -rw-r--r-- | DESIGN | 2 | ||||
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | Mk/proxy.mk | 2 | ||||
| -rw-r--r-- | Mk/tests.mk | 4 | ||||
| -rw-r--r-- | src/opentracker.c (renamed from opentracker.c) | 0 | ||||
| -rw-r--r-- | src/ot_accesslist.c (renamed from ot_accesslist.c) | 0 | ||||
| -rw-r--r-- | src/ot_accesslist.h (renamed from ot_accesslist.h) | 0 | ||||
| -rw-r--r-- | src/ot_batch.c (renamed from ot_batch.c) | 0 | ||||
| -rw-r--r-- | src/ot_batch.h (renamed from ot_batch.h) | 0 | ||||
| -rw-r--r-- | src/ot_buf.c (renamed from ot_buf.c) | 0 | ||||
| -rw-r--r-- | src/ot_buf.h (renamed from ot_buf.h) | 0 | ||||
| -rw-r--r-- | src/ot_clean.c (renamed from ot_clean.c) | 0 | ||||
| -rw-r--r-- | src/ot_clean.h (renamed from ot_clean.h) | 0 | ||||
| -rw-r--r-- | src/ot_config.c (renamed from ot_config.c) | 0 | ||||
| -rw-r--r-- | src/ot_config.h (renamed from ot_config.h) | 0 | ||||
| -rw-r--r-- | src/ot_event.c (renamed from ot_event.c) | 0 | ||||
| -rw-r--r-- | src/ot_event.h (renamed from ot_event.h) | 0 | ||||
| -rw-r--r-- | src/ot_fdstate.c (renamed from ot_fdstate.c) | 0 | ||||
| -rw-r--r-- | src/ot_fdstate.h (renamed from ot_fdstate.h) | 0 | ||||
| -rw-r--r-- | src/ot_fmt.c (renamed from ot_fmt.c) | 0 | ||||
| -rw-r--r-- | src/ot_fmt.h (renamed from ot_fmt.h) | 0 | ||||
| -rw-r--r-- | src/ot_fullscrape.c (renamed from ot_fullscrape.c) | 0 | ||||
| -rw-r--r-- | src/ot_fullscrape.h (renamed from ot_fullscrape.h) | 0 | ||||
| -rw-r--r-- | src/ot_hex.c (renamed from ot_hex.c) | 0 | ||||
| -rw-r--r-- | src/ot_hex.h (renamed from ot_hex.h) | 0 | ||||
| -rw-r--r-- | src/ot_http.c (renamed from ot_http.c) | 0 | ||||
| -rw-r--r-- | src/ot_http.h (renamed from ot_http.h) | 0 | ||||
| -rw-r--r-- | src/ot_iovec.c (renamed from ot_iovec.c) | 0 | ||||
| -rw-r--r-- | src/ot_iovec.h (renamed from ot_iovec.h) | 0 | ||||
| -rw-r--r-- | src/ot_ip.c (renamed from ot_ip.c) | 0 | ||||
| -rw-r--r-- | src/ot_ip.h (renamed from ot_ip.h) | 0 | ||||
| -rw-r--r-- | src/ot_livesync.c (renamed from ot_livesync.c) | 0 | ||||
| -rw-r--r-- | src/ot_livesync.h (renamed from ot_livesync.h) | 0 | ||||
| -rw-r--r-- | src/ot_mutex.c (renamed from ot_mutex.c) | 0 | ||||
| -rw-r--r-- | src/ot_mutex.h (renamed from ot_mutex.h) | 0 | ||||
| -rw-r--r-- | src/ot_random.c (renamed from ot_random.c) | 0 | ||||
| -rw-r--r-- | src/ot_random.h (renamed from ot_random.h) | 0 | ||||
| -rw-r--r-- | src/ot_rijndael.c (renamed from ot_rijndael.c) | 0 | ||||
| -rw-r--r-- | src/ot_rijndael.h (renamed from ot_rijndael.h) | 0 | ||||
| -rw-r--r-- | src/ot_scan.c (renamed from ot_scan.c) | 0 | ||||
| -rw-r--r-- | src/ot_scan.h (renamed from ot_scan.h) | 0 | ||||
| -rw-r--r-- | src/ot_socket.c (renamed from ot_socket.c) | 0 | ||||
| -rw-r--r-- | src/ot_socket.h (renamed from ot_socket.h) | 0 | ||||
| -rw-r--r-- | src/ot_stats.c (renamed from ot_stats.c) | 0 | ||||
| -rw-r--r-- | src/ot_stats.h (renamed from ot_stats.h) | 0 | ||||
| -rw-r--r-- | src/ot_tcp.c (renamed from ot_tcp.c) | 0 | ||||
| -rw-r--r-- | src/ot_tcp.h (renamed from ot_tcp.h) | 0 | ||||
| -rw-r--r-- | src/ot_udp.c (renamed from ot_udp.c) | 0 | ||||
| -rw-r--r-- | src/ot_udp.h (renamed from ot_udp.h) | 0 | ||||
| -rw-r--r-- | src/ot_urlencoded.c (renamed from ot_urlencoded.c) | 0 | ||||
| -rw-r--r-- | src/ot_urlencoded.h (renamed from ot_urlencoded.h) | 0 | ||||
| -rw-r--r-- | src/ot_vector.c (renamed from ot_vector.c) | 0 | ||||
| -rw-r--r-- | src/ot_vector.h (renamed from ot_vector.h) | 0 | ||||
| -rw-r--r-- | src/ot_worker.c (renamed from ot_worker.c) | 0 | ||||
| -rw-r--r-- | src/ot_worker.h (renamed from ot_worker.h) | 0 | ||||
| -rw-r--r-- | src/ot_workqueue.c (renamed from ot_workqueue.c) | 0 | ||||
| -rw-r--r-- | src/ot_workqueue.h (renamed from ot_workqueue.h) | 0 | ||||
| -rw-r--r-- | src/proxy.c (renamed from proxy.c) | 0 | ||||
| -rw-r--r-- | src/trackerlogic.c (renamed from trackerlogic.c) | 0 | ||||
| -rw-r--r-- | src/trackerlogic.h (renamed from trackerlogic.h) | 0 |
60 files changed, 6 insertions, 8 deletions
| @@ -114,8 +114,6 @@ A directory for object files. bmake has no pattern rules and the Makefile | |||
| 114 | builds under FreeBSD's make today. Building each binary in one invocation | 114 | builds under FreeBSD's make today. Building each binary in one invocation |
| 115 | clears the objects out of the tree without giving that up. | 115 | clears the objects out of the tree without giving that up. |
| 116 | 116 | ||
| 117 | A src/ directory. 52 files sharing an ot_ prefix are a module list rather | ||
| 118 | than clutter, and build output was most of what made the tree look crowded. | ||
| 119 | 117 | ||
| 120 | 118 | ||
| 121 | Platform differences that cost us code | 119 | Platform differences that cost us code |
| @@ -49,8 +49,8 @@ COMPILE=$(CPPFLAGS) $(OT_CFLAGS) $(FEATURES) | |||
| 49 | LINK=$(LDFLAGS) $(OT_LDFLAGS) $(LDLIBS) $(OT_LDLIBS) | 49 | LINK=$(LDFLAGS) $(OT_LDFLAGS) $(LDLIBS) $(OT_LDLIBS) |
| 50 | 50 | ||
| 51 | BINARY=opentracker | 51 | BINARY=opentracker |
| 52 | HEADERS=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 | 52 | HEADERS=src/trackerlogic.h src/ot_urlencoded.h src/ot_batch.h src/ot_buf.h src/ot_event.h src/ot_fdstate.h src/ot_fmt.h src/ot_hex.h src/ot_ip.h src/ot_config.h src/ot_scan.h src/ot_socket.h src/ot_tcp.h src/ot_worker.h src/ot_workqueue.h src/ot_mutex.h src/ot_random.h src/ot_stats.h src/ot_vector.h src/ot_clean.h src/ot_udp.h src/ot_iovec.h src/ot_fullscrape.h src/ot_accesslist.h src/ot_http.h src/ot_livesync.h src/ot_rijndael.h |
| 53 | SOURCES=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 | 53 | SOURCES=src/opentracker.c src/trackerlogic.c src/ot_urlencoded.c src/ot_batch.c src/ot_buf.c src/ot_event.c src/ot_fdstate.c src/ot_fmt.c src/ot_hex.c src/ot_ip.c src/ot_config.c src/ot_scan.c src/ot_socket.c src/ot_tcp.c src/ot_worker.c src/ot_workqueue.c src/ot_mutex.c src/ot_random.c src/ot_stats.c src/ot_vector.c src/ot_clean.c src/ot_udp.c src/ot_iovec.c src/ot_fullscrape.c src/ot_accesslist.c src/ot_http.c src/ot_livesync.c src/ot_rijndael.c |
| 54 | BINARIES=$(BINARY) $(BINARY).debug | 54 | BINARIES=$(BINARY) $(BINARY).debug |
| 55 | 55 | ||
| 56 | # Everything is built in one go from sources, so there are no object files to | 56 | # Everything is built in one go from sources, so there are no object files to |
| @@ -73,7 +73,7 @@ $(BUILDSTAMP): FORCE | |||
| 73 | @echo "$(CFLAGS) $(COMPILE) $(LINK)" | cmp -s - $@ 2>/dev/null || echo "$(CFLAGS) $(COMPILE) $(LINK)" > $@ | 73 | @echo "$(CFLAGS) $(COMPILE) $(LINK)" | cmp -s - $@ 2>/dev/null || echo "$(CFLAGS) $(COMPILE) $(LINK)" > $@ |
| 74 | 74 | ||
| 75 | clean: | 75 | clean: |
| 76 | rm -rf $(BINARIES) $(BINARIES:=.dSYM) $(BUILDSTAMP) *.o *~ | 76 | rm -rf $(BINARIES) $(BINARIES:=.dSYM) $(BUILDSTAMP) *.o *~ src/*.o src/*~ |
| 77 | 77 | ||
| 78 | install: $(BINARY) | 78 | install: $(BINARY) |
| 79 | install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 | 79 | install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 |
diff --git a/Mk/proxy.mk b/Mk/proxy.mk index 2e876e9..64d18dc 100644 --- a/Mk/proxy.mk +++ b/Mk/proxy.mk | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | # CFLAGS_libowfat=-I$(LIBOWFAT_HEADERS) | 7 | # CFLAGS_libowfat=-I$(LIBOWFAT_HEADERS) |
| 8 | # LDFLAGS_libowfat=-L$(LIBOWFAT_LIBRARY) -lowfat | 8 | # LDFLAGS_libowfat=-L$(LIBOWFAT_LIBRARY) -lowfat |
| 9 | # | 9 | # |
| 10 | # 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 | 10 | # SOURCES_proxy=src/proxy.c src/ot_batch.c src/ot_fdstate.c src/ot_vector.c src/ot_mutex.c src/ot_random.c src/ot_scan.c src/ot_ip.c src/ot_socket.c |
| 11 | # CFLAGS_proxy=$(CFLAGS_production) $(CFLAGS_libowfat) -DWANT_SYNC_LIVE | 11 | # CFLAGS_proxy=$(CFLAGS_production) $(CFLAGS_libowfat) -DWANT_SYNC_LIVE |
| 12 | # CFLAGS_proxy_debug=$(CFLAGS_debug) $(CFLAGS_libowfat) -DWANT_SYNC_LIVE | 12 | # CFLAGS_proxy_debug=$(CFLAGS_debug) $(CFLAGS_libowfat) -DWANT_SYNC_LIVE |
| 13 | # | 13 | # |
diff --git a/Mk/tests.mk b/Mk/tests.mk index 8e63839..46f308b 100644 --- a/Mk/tests.mk +++ b/Mk/tests.mk | |||
| @@ -5,13 +5,13 @@ BUILDDEPS+=Mk/tests.mk | |||
| 5 | # the few symbols those modules reference but the tests never reach. | 5 | # the few symbols those modules reference but the tests never reach. |
| 6 | TESTBIN=tests/runner | 6 | TESTBIN=tests/runner |
| 7 | TEST_SOURCES=tests/runner.c tests/test.c tests/stubs.c tests/t_urlencoded.c tests/t_iovec.c tests/t_vector.c tests/t_random.c tests/t_hex.c tests/t_accesslist.c tests/t_scan.c tests/t_buf.c tests/t_ip.c tests/t_socket.c tests/t_mutex.c tests/t_trackerlogic.c tests/t_workqueue.c tests/t_batch.c tests/t_fdstate.c tests/t_event.c tests/t_fmt.c | 7 | TEST_SOURCES=tests/runner.c tests/test.c tests/stubs.c tests/t_urlencoded.c tests/t_iovec.c tests/t_vector.c tests/t_random.c tests/t_hex.c tests/t_accesslist.c tests/t_scan.c tests/t_buf.c tests/t_ip.c tests/t_socket.c tests/t_mutex.c tests/t_trackerlogic.c tests/t_workqueue.c tests/t_batch.c tests/t_fdstate.c tests/t_event.c tests/t_fmt.c |
| 8 | TEST_UNITS=ot_urlencoded.c ot_fmt.c ot_event.c ot_batch.c ot_fdstate.c ot_buf.c ot_ip.c ot_socket.c ot_iovec.c ot_vector.c ot_random.c ot_hex.c ot_scan.c ot_accesslist.c ot_mutex.c ot_workqueue.c trackerlogic.c | 8 | TEST_UNITS=src/ot_urlencoded.c src/ot_fmt.c src/ot_event.c src/ot_batch.c src/ot_fdstate.c src/ot_buf.c src/ot_ip.c src/ot_socket.c src/ot_iovec.c src/ot_vector.c src/ot_random.c src/ot_hex.c src/ot_scan.c src/ot_accesslist.c src/ot_mutex.c src/ot_workqueue.c src/trackerlogic.c |
| 9 | TEST_HEADERS=tests/test.h $(HEADERS) | 9 | TEST_HEADERS=tests/test.h $(HEADERS) |
| 10 | 10 | ||
| 11 | # A test binary is not a production binary, so it is built with the features | 11 | # A test binary is not a production binary, so it is built with the features |
| 12 | # the tests need to reach. | 12 | # the tests need to reach. |
| 13 | FEATURES_test=$(FEATURES) -DWANT_ACCESSLIST_BLACK -DWANT_SYNC_LIVE | 13 | FEATURES_test=$(FEATURES) -DWANT_ACCESSLIST_BLACK -DWANT_SYNC_LIVE |
| 14 | CFLAGS_test=-I. -g -O1 $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_test) | 14 | CFLAGS_test=-Isrc -g -O1 $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_test) |
| 15 | 15 | ||
| 16 | # clang over $(CC) because the two toolchains do not check the same things. | 16 | # clang over $(CC) because the two toolchains do not check the same things. |
| 17 | CC_sanitize?=clang | 17 | CC_sanitize?=clang |
diff --git a/opentracker.c b/src/opentracker.c index 14b817e..14b817e 100644 --- a/opentracker.c +++ b/src/opentracker.c | |||
diff --git a/ot_accesslist.c b/src/ot_accesslist.c index 86f9a7d..86f9a7d 100644 --- a/ot_accesslist.c +++ b/src/ot_accesslist.c | |||
diff --git a/ot_accesslist.h b/src/ot_accesslist.h index 68c88dc..68c88dc 100644 --- a/ot_accesslist.h +++ b/src/ot_accesslist.h | |||
diff --git a/ot_batch.c b/src/ot_batch.c index e4dda0b..e4dda0b 100644 --- a/ot_batch.c +++ b/src/ot_batch.c | |||
diff --git a/ot_batch.h b/src/ot_batch.h index 910bea7..910bea7 100644 --- a/ot_batch.h +++ b/src/ot_batch.h | |||
diff --git a/ot_clean.c b/src/ot_clean.c index f181e83..f181e83 100644 --- a/ot_clean.c +++ b/src/ot_clean.c | |||
diff --git a/ot_clean.h b/src/ot_clean.h index 0592791..0592791 100644 --- a/ot_clean.h +++ b/src/ot_clean.h | |||
diff --git a/ot_config.c b/src/ot_config.c index 95136b5..95136b5 100644 --- a/ot_config.c +++ b/src/ot_config.c | |||
diff --git a/ot_config.h b/src/ot_config.h index 79187ee..79187ee 100644 --- a/ot_config.h +++ b/src/ot_config.h | |||
diff --git a/ot_event.c b/src/ot_event.c index 6062f70..6062f70 100644 --- a/ot_event.c +++ b/src/ot_event.c | |||
diff --git a/ot_event.h b/src/ot_event.h index cb84ca8..cb84ca8 100644 --- a/ot_event.h +++ b/src/ot_event.h | |||
diff --git a/ot_fdstate.c b/src/ot_fdstate.c index 8e4bd89..8e4bd89 100644 --- a/ot_fdstate.c +++ b/src/ot_fdstate.c | |||
diff --git a/ot_fdstate.h b/src/ot_fdstate.h index 60fe070..60fe070 100644 --- a/ot_fdstate.h +++ b/src/ot_fdstate.h | |||
diff --git a/ot_fullscrape.c b/src/ot_fullscrape.c index 9afad92..9afad92 100644 --- a/ot_fullscrape.c +++ b/src/ot_fullscrape.c | |||
diff --git a/ot_fullscrape.h b/src/ot_fullscrape.h index 8d11cd3..8d11cd3 100644 --- a/ot_fullscrape.h +++ b/src/ot_fullscrape.h | |||
diff --git a/ot_http.c b/src/ot_http.c index 96b8f4e..96b8f4e 100644 --- a/ot_http.c +++ b/src/ot_http.c | |||
diff --git a/ot_http.h b/src/ot_http.h index fb56c64..fb56c64 100644 --- a/ot_http.h +++ b/src/ot_http.h | |||
diff --git a/ot_iovec.c b/src/ot_iovec.c index 328f160..328f160 100644 --- a/ot_iovec.c +++ b/src/ot_iovec.c | |||
diff --git a/ot_iovec.h b/src/ot_iovec.h index 4a8abbb..4a8abbb 100644 --- a/ot_iovec.h +++ b/src/ot_iovec.h | |||
diff --git a/ot_livesync.c b/src/ot_livesync.c index 083fe1a..083fe1a 100644 --- a/ot_livesync.c +++ b/src/ot_livesync.c | |||
diff --git a/ot_livesync.h b/src/ot_livesync.h index 4bd3af0..4bd3af0 100644 --- a/ot_livesync.h +++ b/src/ot_livesync.h | |||
diff --git a/ot_mutex.c b/src/ot_mutex.c index 884b74c..884b74c 100644 --- a/ot_mutex.c +++ b/src/ot_mutex.c | |||
diff --git a/ot_mutex.h b/src/ot_mutex.h index d7ded92..d7ded92 100644 --- a/ot_mutex.h +++ b/src/ot_mutex.h | |||
diff --git a/ot_random.c b/src/ot_random.c index 43f91bb..43f91bb 100644 --- a/ot_random.c +++ b/src/ot_random.c | |||
diff --git a/ot_random.h b/src/ot_random.h index c2d0387..c2d0387 100644 --- a/ot_random.h +++ b/src/ot_random.h | |||
diff --git a/ot_rijndael.c b/src/ot_rijndael.c index 3f36bde..3f36bde 100644 --- a/ot_rijndael.c +++ b/src/ot_rijndael.c | |||
diff --git a/ot_rijndael.h b/src/ot_rijndael.h index 1235215..1235215 100644 --- a/ot_rijndael.h +++ b/src/ot_rijndael.h | |||
diff --git a/ot_scan.c b/src/ot_scan.c index 3b8e87c..3b8e87c 100644 --- a/ot_scan.c +++ b/src/ot_scan.c | |||
diff --git a/ot_scan.h b/src/ot_scan.h index a79ec13..a79ec13 100644 --- a/ot_scan.h +++ b/src/ot_scan.h | |||
diff --git a/ot_socket.c b/src/ot_socket.c index 79bb01a..79bb01a 100644 --- a/ot_socket.c +++ b/src/ot_socket.c | |||
diff --git a/ot_socket.h b/src/ot_socket.h index 5c1d840..5c1d840 100644 --- a/ot_socket.h +++ b/src/ot_socket.h | |||
diff --git a/ot_stats.c b/src/ot_stats.c index 2d6335b..2d6335b 100644 --- a/ot_stats.c +++ b/src/ot_stats.c | |||
diff --git a/ot_stats.h b/src/ot_stats.h index 45a547e..45a547e 100644 --- a/ot_stats.h +++ b/src/ot_stats.h | |||
diff --git a/ot_urlencoded.c b/src/ot_urlencoded.c index 4109bb5..4109bb5 100644 --- a/ot_urlencoded.c +++ b/src/ot_urlencoded.c | |||
diff --git a/ot_urlencoded.h b/src/ot_urlencoded.h index 9882468..9882468 100644 --- a/ot_urlencoded.h +++ b/src/ot_urlencoded.h | |||
diff --git a/ot_vector.c b/src/ot_vector.c index ab0566c..ab0566c 100644 --- a/ot_vector.c +++ b/src/ot_vector.c | |||
diff --git a/ot_vector.h b/src/ot_vector.h index 8a5ba86..8a5ba86 100644 --- a/ot_vector.h +++ b/src/ot_vector.h | |||
diff --git a/ot_worker.c b/src/ot_worker.c index 432d272..432d272 100644 --- a/ot_worker.c +++ b/src/ot_worker.c | |||
diff --git a/ot_worker.h b/src/ot_worker.h index 4954773..4954773 100644 --- a/ot_worker.h +++ b/src/ot_worker.h | |||
diff --git a/ot_workqueue.c b/src/ot_workqueue.c index 56a7cd2..56a7cd2 100644 --- a/ot_workqueue.c +++ b/src/ot_workqueue.c | |||
diff --git a/ot_workqueue.h b/src/ot_workqueue.h index 82ae29b..82ae29b 100644 --- a/ot_workqueue.h +++ b/src/ot_workqueue.h | |||
diff --git a/trackerlogic.c b/src/trackerlogic.c index 9565090..9565090 100644 --- a/trackerlogic.c +++ b/src/trackerlogic.c | |||
diff --git a/trackerlogic.h b/src/trackerlogic.h index 7292d36..7292d36 100644 --- a/trackerlogic.h +++ b/src/trackerlogic.h | |||
