mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-08-22 02:14:13 -05:00
corrected bin2o rule
This commit is contained in:
@@ -40,19 +40,19 @@ export OBJCOPY := $(PREFIX)objcopy
|
||||
@echo $(notdir $<)
|
||||
@$(CC) -MMD -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# canned command sequence for binary data
|
||||
#---------------------------------------------------------------------------------
|
||||
define bin2o
|
||||
padbin 4 $(<)
|
||||
#---------------------------------------------------------------------------------
|
||||
# canned command sequence for binary data
|
||||
#---------------------------------------------------------------------------------
|
||||
define bin2o
|
||||
padbin 4 $(<)
|
||||
$(OBJCOPY) -I binary -O elf32-littlearm -B arm \
|
||||
--rename-section .data=.rodata,readonly,data,contents,alloc \
|
||||
--redefine-sym _binary_`(echo $(<) | sed -e 's/^\(\/[a-zA-Z]\/\)/\1_/' | tr . _)`_start=`(echo $(<F) | tr . _)`\
|
||||
--redefine-sym _binary_`(echo $(<) | sed -e 's/^\(\/[a-zA-Z]\/\)/\1_/' | tr . _)`_end=`(echo $(<F) | tr . _)`_end\
|
||||
--redefine-sym _binary_`(echo $(<) | sed -e 's/^\(\/[a-zA-Z]\/\)/\1_/' | tr . _)`_size=`(echo $(<F) | tr . _)`_size\
|
||||
--redefine-sym _binary_`(echo $(<) | sed -e 's/^\(\/[a-zA-Z]\/\)/\1_/' | tr . _ | tr / _)`_start=`(echo $(<F) | tr . _)`\
|
||||
--redefine-sym _binary_`(echo $(<) | sed -e 's/^\(\/[a-zA-Z]\/\)/\1_/' | tr . _ | tr / _)`_end=`(echo $(<F) | tr . _)`_end\
|
||||
--redefine-sym _binary_`(echo $(<) | sed -e 's/^\(\/[a-zA-Z]\/\)/\1_/' | tr . _ | tr / _)`_size=`(echo $(<F) | tr . _)`_size\
|
||||
$(<) $(@)
|
||||
echo "extern const u32" `(echo $(<F) | tr . _)`"_end[];" > `(echo $(<F) | tr . _)`.h
|
||||
echo "extern const u8" `(echo $(<F) | tr . _)`"[];" >> `(echo $(<F) | tr . _)`.h
|
||||
echo "extern const u32" `(echo $(<F) | tr . _)`_size[]";" >> `(echo $(<F) | tr . _)`.h
|
||||
endef
|
||||
endef
|
||||
|
||||
|
||||
Reference in New Issue
Block a user