Browse Source

make: Place C++ includes before C includes when compiling C++

Fixes some errors when specifying system C++ include directories where
the C++ headers need to #include_next related C headers.
pr/spi.typo
Joakim Nohlgård 6 years ago
parent
commit
e2dc99f464
  1. 2
      Makefile.base

2
Makefile.base

@ -70,7 +70,7 @@ $(OBJCXX): $(BINDIR)/$(MODULE)/%.o: %.cpp $(RIOTBUILD_CONFIG_HEADER_C)
$(AD)$(CCACHE) $(CXX) \
-DRIOT_FILE_RELATIVE=\"$(patsubst $(RIOTBASE)/%,%,$(abspath $<))\" \
-DRIOT_FILE_NOPATH=\"$(notdir $<)\" \
$(CXXFLAGS) $(INCLUDES) $(CXXINCLUDES) -MD -MP -c -o $@ $(abspath $<)
$(CXXFLAGS) $(CXXINCLUDES) $(INCLUDES) -MD -MP -c -o $@ $(abspath $<)
$(ASMOBJ): $(BINDIR)/$(MODULE)/%.o: %.s
$(AD)$(AS) $(ASFLAGS) -o $@ $(abspath $<)

Loading…
Cancel
Save