Make sure __u64 is defined.
[AROS.git] / test / cplusplus / mmakefile.src
blob4d97ea9ca8be5fd92ede84c0b816386e3e92f797
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
8 ifeq ($(TARGET_CXX),)
9   TARGET_CXX := $(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros-g++
10 else
11   TARGET_CXX := $(TARGET_CXX) -specs=$(GENDIR)/config/specs
12 endif
14 # Remove C-only flags
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))))
30 #MM
31 test-cxx :: $(EXEDIR) $(EXES)
33 $(EXEDIR):
34         @$(MKDIR) $@
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)"
42 $(OBJDIR)/%.d : %.cpp
43         %mkdepend_q cc=$(TARGET_CXX) flags="$(CXX_FLAGS) $(TARGET_CFLAGS)"
45 %include_deps depstargets="test-cxx-quick" deps=$(DEPS)
47 %common