Makefile: Drop recursive invocation

We were running into issues when two targets are specified in
combination with multi-core builds (`-jX`), which led to race conditions
sometimes attempting to build the same file more than once at the same
time.

As we are only supporting POSIX builds now, the PLATFORM condition is not
necessary anymore. When introducing another platform in the future, we
should just pass the platform as variable to `make` to prevent us from
needing to invoke `make` recursively.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This commit is contained in:
Felix Walter 2026-04-21 10:48:21 +02:00
parent 3349040b3a
commit 6ca8b66a77

View file

@ -210,33 +210,7 @@ endif
.PHONY: posix posix-lib posix-all data-decoder aap2sendfile aap2recvfile unittest-posix ccmds-posix
ifndef PLATFORM
posix:
@$(MAKE) PLATFORM=posix posix
posix-lib:
@$(MAKE) PLATFORM=posix posix-lib
posix-all:
@$(MAKE) PLATFORM=posix posix posix-lib
data-decoder:
@$(MAKE) PLATFORM=posix data-decoder
aap2recvfile:
@$(MAKE) PLATFORM=posix aap2recvfile
aap2sendfile:
@$(MAKE) PLATFORM=posix aap2sendfile
unittest-posix:
@$(MAKE) PLATFORM=posix unittest-posix
ccmds-posix:
@$(MAKE) PLATFORM=posix build/posix/compile_commands.json
else # ifndef PLATFORM
PLATFORM ?= posix
include mk/$(PLATFORM).mk
include mk/build.mk
@ -249,5 +223,3 @@ aap2sendfile: build/posix/aap2sendfile
aap2recvfile: build/posix/aap2recvfile
unittest-posix: build/posix/testud3tn
ccmds-posix: build/posix/compile_commands.json
endif # ifndef PLATFORM