cosmopolitan/test/libc/mem/test.mk
Justine Tunney 868af3f950 Import C++ Standard Template Library
You can now use the hardest fastest and most dangerous language there is
with Cosmopolitan. So far about 75% of LLVM libcxx has been added. A few
breaking changes needed to be made to help this go smoothly.

- Rename nothrow to dontthrow
- Rename nodiscard to dontdiscard
- Add some libm functions, e.g. lgamma, nan, etc.
- Change intmax_t from int128 to int64 like everything else
- Introduce %jjd formatting directive for int128_t
- Introduce strtoi128(), strtou128(), etc.
- Rename bsrmax() to bsr128()

Some of the templates that should be working currently are std::vector,
std::string, std::map, std::set, std::deque, etc.
2022-03-22 06:41:54 -07:00

70 lines
1.9 KiB
Makefile

#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
PKGS += TEST_LIBC_MEM
TEST_LIBC_MEM_FILES := $(wildcard test/libc/mem/*)
TEST_LIBC_MEM_SRCS_C = $(filter %_test.c,$(TEST_LIBC_MEM_FILES))
TEST_LIBC_MEM_SRCS_CC = $(filter %_test.cc,$(TEST_LIBC_MEM_FILES))
TEST_LIBC_MEM_OBJS = \
$(TEST_LIBC_MEM_SRCS_C:%.c=o/$(MODE)/%.o) \
$(TEST_LIBC_MEM_SRCS_CC:%.cc=o/$(MODE)/%.o)
TEST_LIBC_MEM_COMS = \
$(TEST_LIBC_MEM_SRCS_C:%.c=o/$(MODE)/%.com) \
$(TEST_LIBC_MEM_SRCS_CC:%.cc=o/$(MODE)/%.com)
TEST_LIBC_MEM_BINS = \
$(TEST_LIBC_MEM_COMS) \
$(TEST_LIBC_MEM_COMS:%=%.dbg)
TEST_LIBC_MEM_TESTS = \
$(TEST_LIBC_MEM_SRCS_C:%.c=o/$(MODE)/%.com.ok) \
$(TEST_LIBC_MEM_SRCS_CC:%.cc=o/$(MODE)/%.com.ok)
TEST_LIBC_MEM_CHECKS = \
$(TEST_LIBC_MEM_SRCS_C:%.c=o/$(MODE)/%.com.runs) \
$(TEST_LIBC_MEM_SRCS_CC:%.cc=o/$(MODE)/%.com.runs)
TEST_LIBC_MEM_DIRECTDEPS = \
LIBC_CALLS \
LIBC_FMT \
LIBC_INTRIN \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_TESTLIB \
THIRD_PARTY_DLMALLOC \
THIRD_PARTY_LIBCXX
TEST_LIBC_MEM_DEPS := \
$(call uniq,$(foreach x,$(TEST_LIBC_MEM_DIRECTDEPS),$($(x))))
o/$(MODE)/test/libc/mem/mem.pkg: \
$(TEST_LIBC_MEM_OBJS) \
$(foreach x,$(TEST_LIBC_MEM_DIRECTDEPS),$($(x)_A).pkg)
o/$(MODE)/test/libc/mem/%.com.dbg: \
$(TEST_LIBC_MEM_DEPS) \
o/$(MODE)/test/libc/mem/%.o \
o/$(MODE)/test/libc/mem/mem.pkg \
$(LIBC_TESTMAIN) \
$(CRT) \
$(APE)
@$(APELINK)
$(TEST_LIBC_MEM_OBJS): \
DEFAULT_CCFLAGS += \
-fno-builtin
.PHONY: o/$(MODE)/test/libc/mem
o/$(MODE)/test/libc/mem: \
$(TEST_LIBC_MEM_BINS) \
$(TEST_LIBC_MEM_CHECKS)