X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/blobdiff_plain/b78484206372f7ab6e6da763f7b4ea07ad84b048..7b398af59d53a891b64621027ae0e820e3e7321c:/snippets/sdcc diff --git a/snippets/sdcc b/snippets/sdcc index 6bf44f3..952817c 100644 --- a/snippets/sdcc +++ b/snippets/sdcc @@ -34,9 +34,6 @@ TARGETLOADER = ul_sendhex ARFLAGS = -a A51TOASX = $(MAKERULES_DIR)/a51toasx.sh -# Include possible target configuration --include $(MAKERULES_DIR)/config.target - BUILD_DIR_NAME = _build COMPILED_DIR_NAME = _compiled GROUP_DIR_NAME = @@ -73,6 +70,7 @@ library-pass: include-pass binary-pass utils-pass: library-pass override OMK_SERIALIZE_INCLUDED = y +MAKEOVERRIDES := $(filter-out OMK_SERIALIZE_INCLUDED=n,$(MAKEOVERRIDES)) endif CPPFLAGS += -I $(USER_INCLUDE_DIR) @@ -90,6 +88,14 @@ INCLUDE_DIR := $(USER_INCLUDE_DIR) LIB_DIR := $(USER_LIB_DIR) OBJS_DIR := $(USER_OBJS_DIR) +# Checks for OMK tester +ifdef OMK_TESTSROOT +default-config-pass-check include-pass-check: +library-pass-check binary-pass-check: + @[ -x "$(shell which $(CC))" ] || $(call canttest,Cannot find compiler: $(CC)) + @[ -z "$(wildcard $(USER_LIB_DIR)/$(LD_SCRIPT).ld*)" ] && $(call canttest,LD_SCRIPT $(LD_SCRIPT).ld* not found) +endif + #===================================================================== # User-space rules and templates to compile programs, libraries etc. @@ -314,23 +320,23 @@ run: run-$(firstword $(link_VARIANTS)) #===================================================================== # Generate pass rules from generic templates -OTHER_PASSES = dep clean install $(eval $(call omk_pass_template, include-pass, $(LOCAL_BUILD_DIR),,$(include_HEADERS)$(nobase_include_HEADERS)$(renamed_include_HEADERS)$(lib_LDSCRIPTS)$(config_include_HEADERS)$(LOCAL_CONFIG_H))) $(eval $(call omk_pass_template, library-pass, $(LOCAL_BUILD_DIR),USER_RULE_TEMPLATES=y,$(lib_LIBRARIES)$(shared_LIBRARIES)$(lib_obj_SOURCES))) $(eval $(call omk_pass_template, binary-pass, $(LOCAL_BUILD_DIR),USER_RULE_TEMPLATES=y,$(bin_PROGRAMS)$(test_PROGRAMS))) $(eval $(call omk_pass_template, utils-pass, $(LOCAL_BUILD_DIR),USER_RULE_TEMPLATES=y,$(utils_PROGRAMS))) - - -$(eval $(call omk_pass_template,$(OTHER_PASSES),$(LOCAL_BUILD_DIR),,always)) +$(eval $(call omk_pass_template, dep, $(LOCAL_BUILD_DIR),,always)) +$(eval $(call omk_pass_template, clean, $(LOCAL_BUILD_DIR),,always)) +$(eval $(call omk_pass_template, install,$(LOCAL_BUILD_DIR),,always)) dep-local: install-local: +$(eval $(call include-pass-template,$(USER_INCLUDE_DIR),include)) + include-pass-local: - $(call include-pass-template,$(USER_INCLUDE_DIR),include) @$(foreach f, $(lib_LDSCRIPTS), cmp --quiet $(SOURCES_DIR)/$(f) $(USER_LIB_DIR)/$(notdir $(f)) \ || $(call cp_cmd,$(SOURCES_DIR)/$(f),$(USER_LIB_DIR)/$(notdir $(f))) || exit 1 ; ) @$(foreach f, $(asm_build_HEADERS), \ @@ -352,7 +358,7 @@ clean-local: clean-custom if [ -e $(confh) ] ; then touch -t 200001010101 $(confh) ; fi ; \ ) -check-dir: +check-dir:: @$(call mkdir_def,$(USER_OBJS_DIR)) @$(call mkdir_def,$(USER_INCLUDE_DIR)) @$(call mkdir_def,$(USER_LIB_DIR)) @@ -360,6 +366,7 @@ check-dir: @$(call mkdir_def,$(USER_UTILS_DIR)) @$(call mkdir_def,$(USER_TESTS_DIR)) +include-pass-submakes: extra-rules-subdirs # Which passes to pass default: include-pass library-pass binary-pass utils-pass