include $(APPDIR)/Make.defs
X86_64_ABI_COMMIT ?= ab2062ad5653913c39124548943b1177330e34c8
ifeq ($(wildcard x86-64-ABI/.git),)
x86-64-ABI.zip:
$(call DOWNLOAD,https://gitlab.com/x86-psABIs/x86-64-ABI/-/archive/$(X86_64_ABI_COMMIT),x86-64-ABI-$(X86_64_ABI_COMMIT).zip,x86-64-ABI.zip)
$(Q) unzip -o x86-64-ABI.zip
mv x86-64-ABI-$(X86_64_ABI_COMMIT) x86-64-ABI
$(Q) patch -p1 -d x86-64-ABI < 0001-app-testing-Resolve-the-issue-of-compilation-failure.patch
context:: x86-64-ABI.zip
endif
distclean::
ifeq ($(wildcard x86-64-ABI/.git),)
$(call DELDIR, x86-64-ABI)
$(call DELFILE, x86-64-ABI.zip)
endif
SUBDIR = x86-64-ABI/abitest
$(SUBDIR)/test_3_element_struct_and_unions.c: $(SUBDIR)/make_3esau.c $(SUBDIR)/typelist.h \
$(SUBDIR)/typelist.c $(SUBDIR)/defines.h $(SUBDIR)/args.h
cd $(SUBDIR) && \
gcc -o make_3esau make_3esau.c typelist.c && \
./make_3esau > test_3_element_struct_and_unions.c
$(SUBDIR)/test_passing_integers.c $(SUBDIR)/test_passing_floats.c: $(SUBDIR)/make_passing_tests.c \
$(SUBDIR)/typelist.h $(SUBDIR)/typelist.c $(SUBDIR)/defines.h $(SUBDIR)/args.h
cd $(SUBDIR) && \
gcc -o make_passing_tests make_passing_tests.c typelist.c && \
./make_passing_tests
$(SUBDIR)/test_basic_returning.c: $(SUBDIR)/make_returning.c $(SUBDIR)/typelist.h $(SUBDIR)/typelist.c \
$(SUBDIR)/defines.h $(SUBDIR)/args.h
cd $(SUBDIR) && \
gcc -o make_returning make_returning.c typelist.c && \
./make_returning > test_basic_returning.c
CSRCS += $(SUBDIR)/test_basic_returning.c $(SUBDIR)/test_passing_integers.c $(SUBDIR)/test_passing_floats.c \
$(SUBDIR)/test_3_element_struct_and_unions.c
ASRCS = $(SUBDIR)/asm-support.S
define add_benchmark
PROGNAME += $1
MAINSRC += $(SUBDIR)/$1.c
PRIORITY += 100
STACKSIZE += $(CONFIG_DEFAULT_TASK_STACKSIZE)
endef
EXCLUDE = make_3esau make_passing_tests make_returning medium-test typelist
ALL_CASES := $(wildcard x86-64-ABI/abitest/*.c)
BENCHMARKS := $(filter-out $(EXCLUDE), $(patsubst %.c,%,$(notdir $(ALL_CASES))))
$(foreach benchmark,$(BENCHMARKS),$(eval $(call add_benchmark,$(benchmark))))
include $(APPDIR)/Application.mk