2018-05-06 07:15:17 +02:00
|
|
|
include ../Makefile.tests_common
|
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|
2018-05-14 22:31:53 +02:00
|
|
|
|
2021-02-22 18:02:42 +01:00
|
|
|
# BUILD_IN_DOCKER needs special handling to keep target order
|
|
|
|
ifeq ($(BUILD_IN_DOCKER),1)
|
|
|
|
all: ..in-docker-container
|
|
|
|
else
|
2018-05-14 22:31:53 +02:00
|
|
|
all: static-test
|
2021-02-22 18:02:42 +01:00
|
|
|
endif
|
|
|
|
|
2018-05-14 22:31:53 +02:00
|
|
|
static-test: $(ELFFILE)
|
2018-06-04 12:43:15 +02:00
|
|
|
$(Q)TEST_STARTADDR=$$($(OBJDUMP) -t $< | grep -E '\sxfatest_const$$' | awk '{ printf "0x%s", $$1}'); \
|
|
|
|
TEST_ENDADDR=$$($(OBJDUMP) -t $< | grep -E '\sxfatest_const_end$$' | awk '{ printf "0x%s", $$1}'); \
|
2018-05-14 22:31:53 +02:00
|
|
|
if test ! $$((TEST_STARTADDR)) -lt $$((TEST_ENDADDR)); then \
|
|
|
|
echo "Error: Static check of XFA linked const array failed, verify linker flags and try again" >&2; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|