2024-02-25 22:57:28 +00:00
|
|
|
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
|
|
|
|
#── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
|
|
|
|
|
|
|
|
PKGS += TEST_MATH
|
|
|
|
|
|
|
|
TEST_MATH_SRCS := $(wildcard test/math/*.c)
|
|
|
|
TEST_MATH_SRCS_TEST = $(filter %_test.c,$(TEST_MATH_SRCS))
|
|
|
|
TEST_MATH_OBJS = $(TEST_MATH_SRCS:%.c=o/$(MODE)/%.o)
|
2024-03-03 00:57:56 +00:00
|
|
|
TEST_MATH_COMS = $(TEST_MATH_SRCS_TEST:%.c=o/$(MODE)/%)
|
2024-02-25 22:57:28 +00:00
|
|
|
TEST_MATH_BINS = $(TEST_MATH_COMS) $(TEST_MATH_COMS:%=%.dbg)
|
2024-03-03 00:57:56 +00:00
|
|
|
TEST_MATH_TESTS = $(TEST_MATH_SRCS_TEST:%.c=o/$(MODE)/%.ok)
|
|
|
|
TEST_MATH_CHECKS = $(TEST_MATH_SRCS_TEST:%.c=o/$(MODE)/%.runs)
|
2024-02-25 22:57:28 +00:00
|
|
|
|
|
|
|
TEST_MATH_DIRECTDEPS = \
|
|
|
|
LIBC_INTRIN \
|
2024-06-05 08:31:21 +00:00
|
|
|
LIBC_MEM \
|
2024-02-25 22:57:28 +00:00
|
|
|
LIBC_RUNTIME \
|
|
|
|
LIBC_SYSV \
|
|
|
|
LIBC_TINYMATH \
|
2024-04-30 20:32:23 +00:00
|
|
|
THIRD_PARTY_COMPILER_RT \
|
|
|
|
THIRD_PARTY_OPENMP
|
2024-02-25 22:57:28 +00:00
|
|
|
|
|
|
|
TEST_MATH_DEPS := \
|
|
|
|
$(call uniq,$(foreach x,$(TEST_MATH_DIRECTDEPS),$($(x))))
|
|
|
|
|
|
|
|
o/$(MODE)/test/math/math.pkg: \
|
|
|
|
$(TEST_MATH_OBJS) \
|
|
|
|
$(foreach x,$(TEST_MATH_DIRECTDEPS),$($(x)_A).pkg)
|
|
|
|
|
2024-03-03 00:57:56 +00:00
|
|
|
o/$(MODE)/test/math/%.dbg: \
|
2024-02-25 22:57:28 +00:00
|
|
|
$(TEST_MATH_DEPS) \
|
2024-03-03 00:57:56 +00:00
|
|
|
o/$(MODE)/test/math/%.o \
|
2024-02-25 22:57:28 +00:00
|
|
|
o/$(MODE)/test/math/math.pkg \
|
|
|
|
$(CRT) \
|
|
|
|
$(APE_NO_MODIFY_SELF)
|
|
|
|
@$(APELINK)
|
|
|
|
|
2024-04-30 20:32:23 +00:00
|
|
|
$(TEST_MATH_OBJS): private CFLAGS += -fno-builtin -fopenmp
|
2024-02-25 22:57:28 +00:00
|
|
|
|
|
|
|
.PHONY: o/$(MODE)/test/math
|
|
|
|
o/$(MODE)/test/math: \
|
|
|
|
$(TEST_MATH_BINS) \
|
|
|
|
$(TEST_MATH_CHECKS)
|