mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-04-08 18:30:28 -05:00
added check for existing copy to bin2o rule
This commit is contained in:
parent
d2578871ad
commit
6830b8c9af
|
|
@ -44,7 +44,7 @@ export OBJCOPY := $(PREFIX)objcopy
|
|||
# canned command sequence for binary data
|
||||
#---------------------------------------------------------------------------------
|
||||
define bin2o
|
||||
cp $(<) $(<F)
|
||||
[ -s $(<F) ] || cp $(<) $(<F)
|
||||
padbin 4 $(<F)
|
||||
$(OBJCOPY) -I binary -O elf32-littlearm -B arm \
|
||||
--rename-section .data=.rodata,readonly,data,contents,alloc \
|
||||
|
|
@ -55,6 +55,5 @@ define bin2o
|
|||
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
|
||||
rm $(<F)
|
||||
endef
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user