d068332b88
Code is from cxx.uclibc.org, modified by catty to implement c++17 features
48 lines
1.5 KiB
Makefile
48 lines
1.5 KiB
Makefile
TESTS_DIR := $(top_srcdir)tests/
|
|
TESTS_OUT := $(top_builddir)tests/
|
|
|
|
WR_CXX := WRAPPER_INCLUDEDIR=-I$(top_srcdir)include WRAPPER_LIBDIR=-L$(top_builddir)src $(WRAPPER)
|
|
|
|
LIBS-y := $(call link.asneeded,-lgcc_eh)
|
|
|
|
TESTS_SRCS := $(wildcard *test.cpp)
|
|
TESTS_SRCS-y := $(TESTS_SRCS)
|
|
UTILITY_SRCS := testframework.cpp
|
|
|
|
TESTS_OMIT-$(UCLIBCXX_HAS_WCHAR) := wchartest.cpp
|
|
TESTS_OMIT-$(UCLIBCXX_EXCEPTION_SUPPORT) := excepttest.cpp
|
|
|
|
TESTS_SRCS-y := $(filter-out $(TESTS_OMIT-),$(TESTS_SRCS-y))
|
|
|
|
EXOBJS := $(patsubst %.cpp,%.o, $(TESTS_SRCS-y))
|
|
UTILITY_OBJS := $(patsubst %.cpp,%.o, $(UTILITY_SRCS))
|
|
ALLBIN := $(patsubst %.cpp,%, $(TESTS_SRCS-y))
|
|
HOST_OBJS := $(patsubst %.cpp,%-old.o, $(TESTS_SRCS-y))
|
|
HOST_UTILITY_OBJS := $(patsubst %.cpp,%-old.o, $(UTILITY_SRCS))
|
|
HOST_BIN := $(patsubst %.cpp,%-old, $(TESTS_SRCS-y))
|
|
|
|
all: $(ALLBIN) $(if $(DODEBUG),$(HOST_BIN))
|
|
include $(TESTS_DIR)testoutput/Makefile.in
|
|
|
|
LIBS-valarraytest := -lm
|
|
CXXFLAGS-vectortest.o += $(CXXFLAG_-Wno-tautological-compare)
|
|
|
|
$(EXOBJS) $(UTILITY_OBJS): $(WRAPPER)
|
|
%.o: %.cpp ; $(compile.oxx)
|
|
%: %.o ; $(compile.uxx)
|
|
|
|
%-old.o: %.cpp ; $(hcompile.oxx)
|
|
%-old: %-old.o ; $(hcompile.uxx)
|
|
|
|
$(ALLBIN): % : %.o $(UTILITY_OBJS)
|
|
$(HOST_BIN): % : %.o $(HOST_UTILITY_OBJS)
|
|
|
|
CLEAN_tests:
|
|
$(do_rm) $(addprefix $(TESTS_OUT),$(patsubst %.cpp,%, $(TESTS_SRCS)) $(patsubst %.cpp,%-old, $(TESTS_SRCS)) *.o core)
|
|
|
|
distclean: clean
|
|
$(Q)$(RM) $(addprefix $(TESTS_OUT), .*.dep)
|
|
|
|
clean: CLEAN_tests/testoutput CLEAN_tests
|
|
|