# should be used for linking (e.g. ram flash). If this is not
# specified, then the value of DEFAULT_LD_SCRIPT_VARIANT from config.target is used.
# PREFIX_DIR .. Prefix to directories in _compiled and _build. Used in config.omk.
+# TARGET_STDSTARTFILES .. if left unset or set to `n', startup file provided
+# by compiler is supressed
BUILD_DIR_NAME = _build$(addprefix /,$(PREFIX_DIR))
COMPILED_DIR_NAME = _compiled$(addprefix /,$(PREFIX_DIR))
# Rules for compilation for target
ifdef TARGET_RULE_TEMPLATES
+ifeq ($(TARGET_STDSTARTFILES),)
+TARGET_STDSTARTFILES=n
+endif
+
+ifneq ($(TARGET_STDSTARTFILES),y)
LDFLAGS += -nostartfiles
+ifneq ($(TARGET_STDSTARTFILES),n)
+LDFLAGS += $(TARGET_STDSTARTFILES)
+endif
+endif
- # FIXME: These are not used. What they are good for?
+# FIXME: These are not used. What they are good for?
LIB_CPPFLAGS += $(CPPFLAGS)
LIB_CFLAGS += $(CFLAGS)
endif # HOST_RULE_TEMPLATES
-# 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))
-endif
-
#=====================================================================
# Automatic loading of compiled program by issuing "make load"
|| $(call cp_cmd,$(SOURCES_DIR)/$(f),$(USER_LIB_DIR)/$(notdir $(f))) || exit 1 ; )
-.PHONY: clean-custom
-clean-local: clean-custom
+clean-local::
$(Q)rm -f $(USER_OBJS_DIR)/*.o $(USER_OBJS_DIR)/*.lo \
$(USER_OBJS_DIR)/*.d \
$(USER_OBJS_DIR)/*.map \