mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
5c6877b02b
The feenableexcept() and fedisableexcept() APIs are now provided which let you detect when NaNs appear the moment it happens from anywhere in your program. Tests have also been added for the mission critical math functions expf() and erff(), whose perfect operation has been assured. See examples/trapping.c to see how to use this powerful functionality.
42 lines
1.3 KiB
Makefile
42 lines
1.3 KiB
Makefile
#-*-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)
|
|
TEST_MATH_COMS = $(TEST_MATH_SRCS_TEST:%.c=o/$(MODE)/%)
|
|
TEST_MATH_BINS = $(TEST_MATH_COMS) $(TEST_MATH_COMS:%=%.dbg)
|
|
TEST_MATH_TESTS = $(TEST_MATH_SRCS_TEST:%.c=o/$(MODE)/%.ok)
|
|
TEST_MATH_CHECKS = $(TEST_MATH_SRCS_TEST:%.c=o/$(MODE)/%.runs)
|
|
|
|
TEST_MATH_DIRECTDEPS = \
|
|
LIBC_INTRIN \
|
|
LIBC_RUNTIME \
|
|
LIBC_SYSV \
|
|
LIBC_TINYMATH \
|
|
THIRD_PARTY_COMPILER_RT \
|
|
THIRD_PARTY_OPENMP
|
|
|
|
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)
|
|
|
|
o/$(MODE)/test/math/%.dbg: \
|
|
$(TEST_MATH_DEPS) \
|
|
o/$(MODE)/test/math/%.o \
|
|
o/$(MODE)/test/math/math.pkg \
|
|
$(CRT) \
|
|
$(APE_NO_MODIFY_SELF)
|
|
@$(APELINK)
|
|
|
|
$(TEST_MATH_OBJS): private CFLAGS += -fno-builtin -fopenmp
|
|
|
|
.PHONY: o/$(MODE)/test/math
|
|
o/$(MODE)/test/math: \
|
|
$(TEST_MATH_BINS) \
|
|
$(TEST_MATH_CHECKS)
|