diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 17:04:36 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 17:04:36 +0100 |
| commit | 82a97066f842f34db2556673d421aa9290ffe757 (patch) | |
| tree | 656ee9a78e605504fe089ee294b88e264e2246ab /Mk | |
| parent | 3f3114921d643d347c8c9ad1e85de07d101c3e9f (diff) | |
Keep the build's own flags out of CFLAGS, CPPFLAGS, LDFLAGS and LDLIBS
Diffstat (limited to 'Mk')
| -rw-r--r-- | Mk/gzip.mk | 2 | ||||
| -rw-r--r-- | Mk/release.mk | 2 | ||||
| -rw-r--r-- | Mk/tests.mk | 12 | ||||
| -rw-r--r-- | Mk/zstd.mk | 2 |
4 files changed, 9 insertions, 9 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | FEATURES+=-DWANT_COMPRESSION_GZIP | 1 | FEATURES+=-DWANT_COMPRESSION_GZIP |
| 2 | #FEATURES+=-DWANT_COMPRESSION_GZIP_ALWAYS | 2 | #FEATURES+=-DWANT_COMPRESSION_GZIP_ALWAYS |
| 3 | 3 | ||
| 4 | LDFLAGS+=-lz | 4 | OT_LDLIBS+=-lz |
diff --git a/Mk/release.mk b/Mk/release.mk index 63429ad..5c4afe9 100644 --- a/Mk/release.mk +++ b/Mk/release.mk | |||
| @@ -9,7 +9,7 @@ HAVE_GIT=command -v git >/dev/null && test -d .git | |||
| 9 | GIT_VERSION=`sh -c '$(TARBALL_VERSION) || { $(HAVE_GIT) && git describe --tags --match "v*" --always --dirty 2>/dev/null; }'` | 9 | GIT_VERSION=`sh -c '$(TARBALL_VERSION) || { $(HAVE_GIT) && git describe --tags --match "v*" --always --dirty 2>/dev/null; }'` |
| 10 | OT_TAG=`sh -c '$(TARBALL_VERSION) || { $(HAVE_GIT) && git describe --tags --match "v*" --exact-match 2>/dev/null; }'` | 10 | OT_TAG=`sh -c '$(TARBALL_VERSION) || { $(HAVE_GIT) && git describe --tags --match "v*" --exact-match 2>/dev/null; }'` |
| 11 | 11 | ||
| 12 | CFLAGS+=-DOT_VERSION=\"$(VERSION)\" -DGIT_VERSION=\"$(GIT_VERSION)\" -DOT_TAG=\"$(OT_TAG)\" | 12 | OT_CFLAGS+=-DOT_VERSION=\"$(VERSION)\" -DGIT_VERSION=\"$(GIT_VERSION)\" -DOT_TAG=\"$(OT_TAG)\" |
| 13 | 13 | ||
| 14 | # Roll a release: tag it v$(VERSION), then make dist. The tarball is HEAD by | 14 | # Roll a release: tag it v$(VERSION), then make dist. The tarball is HEAD by |
| 15 | # construction, so the working tree it was rolled from does not enter into it. | 15 | # construction, so the working tree it was rolled from does not enter into it. |
diff --git a/Mk/tests.mk b/Mk/tests.mk index d542044..8e63839 100644 --- a/Mk/tests.mk +++ b/Mk/tests.mk | |||
| @@ -11,12 +11,12 @@ TEST_HEADERS=tests/test.h $(HEADERS) | |||
| 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=$(CFLAGS) -I. -g -O1 $(FEATURES_test) | 14 | CFLAGS_test=-I. -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 |
| 18 | CFLAGS_sanitize=$(CFLAGS_test) -fsanitize=address,undefined -fno-omit-frame-pointer | 18 | CFLAGS_sanitize=$(CFLAGS_test) -fsanitize=address,undefined -fno-omit-frame-pointer |
| 19 | LDFLAGS_sanitize=$(LDFLAGS) -fsanitize=address,undefined | 19 | LDFLAGS_sanitize=$(LINK) -fsanitize=address,undefined |
| 20 | 20 | ||
| 21 | # Black box tests drive the real binary over the wire, so they cover the event | 21 | # Black box tests drive the real binary over the wire, so they cover the event |
| 22 | # loop and the parsers working together. The client timeout is cut right down | 22 | # loop and the parsers working together. The client timeout is cut right down |
| @@ -24,10 +24,10 @@ LDFLAGS_sanitize=$(LDFLAGS) -fsanitize=address,undefined | |||
| 24 | # mirrors these two numbers. | 24 | # mirrors these two numbers. |
| 25 | PYTHON?=python3 | 25 | PYTHON?=python3 |
| 26 | FEATURES_integration=$(FEATURES) -DWANT_IP_FROM_QUERY_STRING -DWANT_ACCESSLIST_BLACK -DWANT_DYNAMIC_ACCESSLIST -DWANT_KEEPALIVE -DOT_CLIENT_TIMEOUT=5 -DOT_CLIENT_TIMEOUT_CHECKINTERVAL=1 | 26 | FEATURES_integration=$(FEATURES) -DWANT_IP_FROM_QUERY_STRING -DWANT_ACCESSLIST_BLACK -DWANT_DYNAMIC_ACCESSLIST -DWANT_KEEPALIVE -DOT_CLIENT_TIMEOUT=5 -DOT_CLIENT_TIMEOUT_CHECKINTERVAL=1 |
| 27 | CFLAGS_integration=$(CFLAGS) $(OPTS_debug) $(FEATURES_integration) -fsanitize=address,undefined -fno-omit-frame-pointer | 27 | CFLAGS_integration=$(OPTS_debug) $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_integration) -fsanitize=address,undefined -fno-omit-frame-pointer |
| 28 | LDFLAGS_integration=$(LDFLAGS) -fsanitize=address,undefined | 28 | LDFLAGS_integration=$(LINK) -fsanitize=address,undefined |
| 29 | CFLAGS_tsan=$(CFLAGS) $(OPTS_debug) $(FEATURES_integration) -fsanitize=thread -fno-omit-frame-pointer | 29 | CFLAGS_tsan=$(OPTS_debug) $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_integration) -fsanitize=thread -fno-omit-frame-pointer |
| 30 | LDFLAGS_tsan=$(LDFLAGS) -fsanitize=thread | 30 | LDFLAGS_tsan=$(LINK) -fsanitize=thread |
| 31 | 31 | ||
| 32 | BINARIES+=$(TESTBIN) $(TESTBIN).poll $(TESTBIN).sanitize opentracker.integration opentracker.tsan | 32 | BINARIES+=$(TESTBIN) $(TESTBIN).poll $(TESTBIN).sanitize opentracker.integration opentracker.tsan |
| 33 | 33 | ||
| @@ -1,3 +1,3 @@ | |||
| 1 | FEATURES+=-DWANT_COMPRESSION_ZSTD | 1 | FEATURES+=-DWANT_COMPRESSION_ZSTD |
| 2 | #FEATURES+=-DWANT_COMPRESSION_ZSTD_ALWAYS | 2 | #FEATURES+=-DWANT_COMPRESSION_ZSTD_ALWAYS |
| 3 | LDFLAGS+=-lzstd | 3 | OT_LDLIBS+=-lzstd |
