diff --git a/core/config.mk b/core/config.mk index d488de2..628f6e9 100644 --- a/core/config.mk +++ b/core/config.mk @@ -12,7 +12,6 @@ CONF := KCONFIG_NOTIMESTAMP=1 $(call fullpath,$(BUILD_SYSTEM)/conf) QCONF := KCONFIG_NOTIMESTAMP=1 $(call fullpath,$(BUILD_SYSTEM)/qconf) - ############################################################################### ## Begin conf/qconf by copying configuration file to a temp .config file. ## $1 : configuration file. diff --git a/core/defs.mk b/core/defs.mk index 67583a4..d9f0870 100644 --- a/core/defs.mk +++ b/core/defs.mk @@ -516,6 +516,7 @@ $(Q)$(CCACHE) $(TARGET_CXX) \ $(TARGET_GLOBAL_CFLAGS_$(PRIVATE_ARM_MODE)) \ $(TARGET_GLOBAL_CFLAGS) $(TARGET_GLOBAL_CPPFLAGS) $(CXX_FLAGS_WARNINGS) \ $(PRIVATE_CFLAGS) $(PRIVATE_CPPFLAGS) \ + -D__EWOL_APPL_NAME__="$(CONFIG___EWOL_APPL_NAME__)" \ -c -MMD -MP -g \ $(call path-from-top,$<) endef @@ -535,6 +536,7 @@ $(Q)$(CCACHE) $(TARGET_CC) \ $(TARGET_GLOBAL_CFLAGS_$(PRIVATE_ARM_MODE)) \ $(TARGET_GLOBAL_CFLAGS) $(CC_FLAGS_WARNINGS) \ $(PRIVATE_CFLAGS) \ + -D__EWOL_APPL_NAME__="$(CONFIG___EWOL_APPL_NAME__)" \ -c -MMD -MP -g \ $(call path-from-top,$<) endef @@ -555,6 +557,7 @@ $(Q)$(CCACHE) $(TARGET_CC) \ $(TARGET_GLOBAL_CFLAGS) $(CC_FLAGS_WARNINGS) \ $(PRIVATE_CFLAGS) \ -c -MMD -MP -g \ + -D__EWOL_APPL_NAME__="$(CONFIG___EWOL_APPL_NAME__)" \ $(call path-from-top,$<) endef @@ -627,12 +630,6 @@ $(Q)$(TARGET_CXX) \ $(TARGET_GLOBAL_LDLIBS) endef -# --start-group \ -# $(PRIVATE_ALL_STATIC_LIBRARIES) \ -# $(PRIVATE_ALL_SHARED_LIBRARIES) \ -# --end-group \ -# -o $@ \ - ############################################################################### ## Commands for copying files. ############################################################################### diff --git a/core/module.mk b/core/module.mk index 63540b2..da360bc 100644 --- a/core/module.mk +++ b/core/module.mk @@ -133,6 +133,19 @@ $(foreach __pair,$(LOCAL_COPY_FILES), \ $(eval $(call copy-one-file,$(__src),$(__dst))) \ ) +# Generate a rule to copy all files +$(foreach __pair,$(LOCAL_COPY_FOLDERS), \ + $(eval __pair2 := $(subst :,$(space),$(__pair))) \ + $(eval __folder_src := $(addprefix $(LOCAL_PATH)/,$(word 1,$(__pair2)))) \ + $(eval __folder_dest := $(addprefix $(TARGET_OUT_STAGING)/,$(word 2,$(__pair2)))) \ + $(eval __list_file_src := $(wildcard $(__folder_src))) \ + $(foreach __file_src,$(__list_file_src), \ + $(eval __file_dest := $(__folder_dest)/$(notdir $(__file_src))) \ + $(eval all_copy_files += $(__file_dest)) \ + $(eval $(call copy-one-file,$(__file_src),$(__file_dest))) \ + ) \ +) + # Add files to be copied as pre-requisites $(LOCAL_BUILD_MODULE): $(all_copy_files)