Merge branch 'bugfix/eclipse_cxx_include_paths' into 'master'
Eclipse: Fix bug with C++ include paths (Github PR) See merge request !1756
This commit is contained in:
commit
76b936e98e
1 changed files with 7 additions and 7 deletions
|
@ -47,7 +47,7 @@ COMPONENT_ADD_INCLUDEDIRS = include
|
||||||
COMPONENT_ADD_LDFLAGS = -l$(COMPONENT_NAME)
|
COMPONENT_ADD_LDFLAGS = -l$(COMPONENT_NAME)
|
||||||
|
|
||||||
# Define optional compiling macros
|
# Define optional compiling macros
|
||||||
define compile_exclude
|
define compile_exclude
|
||||||
COMPONENT_OBJEXCLUDE += $(1)
|
COMPONENT_OBJEXCLUDE += $(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ define compile_only_if
|
||||||
$(eval $(if $(1), $(call compile_include, $(2)), $(call compile_exclude, $(2))))
|
$(eval $(if $(1), $(call compile_include, $(2)), $(call compile_exclude, $(2))))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define compile_only_if_not
|
define compile_only_if_not
|
||||||
$(eval $(if $(1), $(call compile_exclude, $(2)), $(call compile_include, $(2))))
|
$(eval $(if $(1), $(call compile_exclude, $(2)), $(call compile_include, $(2))))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ COMPONENT_SUBMODULES ?=
|
||||||
# configuration at the global component level
|
# configuration at the global component level
|
||||||
|
|
||||||
# Save component_path; we pass it to the called Makefile.componentbuild
|
# Save component_path; we pass it to the called Makefile.componentbuild
|
||||||
# as COMPILING_COMPONENT_PATH, and we use it to restore the current
|
# as COMPILING_COMPONENT_PATH, and we use it to restore the current
|
||||||
# COMPONENT_PATH later.
|
# COMPONENT_PATH later.
|
||||||
COMPILING_COMPONENT_PATH := $(COMPONENT_PATH)
|
COMPILING_COMPONENT_PATH := $(COMPONENT_PATH)
|
||||||
|
|
||||||
|
@ -239,22 +239,22 @@ define GenerateCompileTargets
|
||||||
#
|
#
|
||||||
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.c $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
|
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.c $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
|
||||||
$$(summary) CC $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
|
$$(summary) CC $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
|
||||||
$$(CC) $$(CFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
$$(CC) $$(CFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I $(1) -c $$< -o $$@
|
||||||
$(call AppendSourceToDependencies,$$<,$$@)
|
$(call AppendSourceToDependencies,$$<,$$@)
|
||||||
|
|
||||||
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cpp $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
|
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cpp $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
|
||||||
$$(summary) CXX $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
|
$$(summary) CXX $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
|
||||||
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I $(1) -c $$< -o $$@
|
||||||
$(call AppendSourceToDependencies,$$<,$$@)
|
$(call AppendSourceToDependencies,$$<,$$@)
|
||||||
|
|
||||||
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cc $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
|
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cc $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
|
||||||
$$(summary) CXX $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
|
$$(summary) CXX $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
|
||||||
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I $(1) -c $$< -o $$@
|
||||||
$(call AppendSourceToDependencies,$$<,$$@)
|
$(call AppendSourceToDependencies,$$<,$$@)
|
||||||
|
|
||||||
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.S $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
|
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.S $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
|
||||||
$$(summary) AS $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
|
$$(summary) AS $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
|
||||||
$$(CC) $$(CPPFLAGS) $$(DEBUG_FLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
$$(CC) $$(CPPFLAGS) $$(DEBUG_FLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I $(1) -c $$< -o $$@
|
||||||
$(call AppendSourceToDependencies,$$<,$$@)
|
$(call AppendSourceToDependencies,$$<,$$@)
|
||||||
|
|
||||||
# CWD is build dir, create the build subdirectory if it doesn't exist
|
# CWD is build dir, create the build subdirectory if it doesn't exist
|
||||||
|
|
Loading…
Reference in a new issue