1 # This mmakefile relies on existing and working C++ compiler. Additionally the build fails on ARM CPU.
2 # Because of this I did not add it to the build by default.
3 # This target needs to be built manually.
5 include $(TOP)/config/make.cfg
7 # Select target C++ compiler
9 TARGET_CXX := $(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros-g++
11 TARGET_CXX := $(TARGET_CXX) -specs=$(GENDIR)/config/specs
15 CXX_FLAGS := $(CFLAGS) -isystem $(AROS_DEVELOPMENT)/include
16 CXX_FLAGS := $(subst -Wno-pointer-sign,, $(subst -Werror-implicit-function-declaration,, $(CXX_FLAGS)))
17 CXX_FLAGS := $(subst -fno-exceptions,, $(CXX_FLAGS))
19 USER_LDFLAGS := -L$(AROS_DEVELOPMENT)/lib
21 EXEDIR := $(AROS_TESTS)/cplusplus
22 OBJDIR := $(GENDIR)/$(CURDIR)
24 FILES := exception headertest
26 EXES := $(addprefix $(EXEDIR)/,$(notdir $(FILES)))
27 OBJS := $(addsuffix .o,$(addprefix $(OBJDIR)/,$(notdir $(FILES))))
28 DEPS := $(addsuffix .d,$(addprefix $(OBJDIR)/,$(notdir $(FILES))))
31 test-cxx :: $(EXEDIR) $(EXES)
36 $(EXES) : $(EXEDIR)/% : $(OBJDIR)/%.o
37 %link_q cmd=$(TARGET_CXX)
39 $(OBJDIR$)/%.o : %.cpp
40 %compile_q cmd=$(TARGET_CXX) opt="$(CXX_FLAGS) $(TARGET_CFLAGS)"
43 %mkdepend_q cc=$(TARGET_CXX) flags="$(CXX_FLAGS) $(TARGET_CFLAGS)"
45 %include_deps depstargets="test-cxx-quick" deps=$(DEPS)