X-Git-Url: https://rtime.felk.cvut.cz/gitweb/omk.git/blobdiff_plain/a2a8d9e39639ecead5a5275c680ddef0fd177b2e..a03596bfb557526c2caa9fcde77a81dfbd1fa49e:/snippets/rtems.omk diff --git a/snippets/rtems.omk b/snippets/rtems.omk index 7854470..c5ea7d6 100644 --- a/snippets/rtems.omk +++ b/snippets/rtems.omk @@ -220,7 +220,18 @@ $(2)/$(1): $$($(1)_OBJS) # FIXME: Why the map file was commented out? endef +# Rules for other output formats (can be specified by OUTPUT_FORMATS) +%.bin: % + @$(QUIET_CMD_ECHO) " OBJCOPY $@" + $(Q) $(OBJCOPY) --output-target=binary -S $< $@ +%.hex: % + @$(QUIET_CMD_ECHO) " OBJCOPY $@" + $(Q) $(OBJCOPY) --output-target=ihex -S $< $@ + +%.srec: % + @$(QUIET_CMD_ECHO) " OBJCOPY $@" + $(Q) $(OBJCOPY) --output-target=srec -S $< $@ # Syntax: $(call LIBRARY_template,) define LIBRARY_template @@ -282,7 +293,8 @@ endef library-pass-local: $(lib_LIBRARIES:%=$(USER_LIB_DIR)/lib%.a) $(shared_LIBRARIES:%=$(USER_LIB_DIR)/lib%.so) -binary-pass-local: $(bin_PROGRAMS:%=$(USER_BIN_DIR)/%) $(utils_PROGRAMS:%=$(USER_UTILS_DIR)/%) $(test_PROGRAMS:%=$(USER_TESTS_DIR)/%) +binary-pass-local: $(bin_PROGRAMS:%=$(USER_BIN_DIR)/%) $(utils_PROGRAMS:%=$(USER_UTILS_DIR)/%) $(test_PROGRAMS:%=$(USER_TESTS_DIR)/%) \ + $(foreach of,$(OUTPUT_FORMATS),$(bin_PROGRAMS:%=$(USER_BIN_DIR)/%.$(of)) $(test_PROGRAMS:%=$(USER_TESTS_DIR)/%.$(of))) GEN_HEADERS+=$(filter %.h,$(USER_IDLS:%.idl=%.h))