1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-26 22:02:15 +00:00

boot: fix rebuild-every-time-make-is-invoked

This commit is contained in:
Michael Scire 2020-12-29 13:01:06 -08:00
parent 131c8609c8
commit 6633af769e
2 changed files with 3 additions and 18 deletions

View file

@ -120,7 +120,7 @@ $(OFILES) : $(ATMOSPHERE_LIBRARIES_DIR)/libexosphere/$(ATMOSPHERE_LIBRARY_DIR)/l
program.lz4.o: program_lz4.h program.lz4.o: program_lz4.h
program.lz4.o program_lz4.h: $(TOPDIR)/../program/program$(ATMOSPHERE_BUILD_TARGET_BINARY_SUFFIX).lz4 program_lz4.h: $(TOPDIR)/../program/program$(ATMOSPHERE_BUILD_TARGET_BINARY_SUFFIX).lz4
@echo $(notdir $<) @echo $(notdir $<)
@rm -rf tmp_program_$(ATMOSPHERE_BUILD_TARGET_IDENTIFIER) @rm -rf tmp_program_$(ATMOSPHERE_BUILD_TARGET_IDENTIFIER)
@mkdir -p tmp_program_$(ATMOSPHERE_BUILD_TARGET_IDENTIFIER) @mkdir -p tmp_program_$(ATMOSPHERE_BUILD_TARGET_IDENTIFIER)

View file

@ -24,16 +24,6 @@ SFILES := $(call FIND_SOURCE_FILES,$(SOURCES),s)
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) fusee-primary.bin BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) fusee-primary.bin
#---------------------------------------------------------------------------------
# boot has a custom bin2o rule for fusee-primary -> fusee_primary
#---------------------------------------------------------------------------------
define _bin2o
bin2s $< | $(AS) -o $(@)
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _ | tr - _)`"_end[];" > `(echo $(<F) | tr . _ | tr - _)`.h
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _ | tr - _)`"[];" >> `(echo $(<F) | tr . _ | tr - _)`.h
echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _ | tr - _)`_size";" >> `(echo $(<F) | tr . _ | tr - _)`.h
endef
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C # use CXX for linking C++ projects, CC for standard C
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@ -106,17 +96,12 @@ $(OUTPUT).kip : $(OUTPUT).elf
$(OUTPUT).elf : $(OFILES) $(OUTPUT).elf : $(OFILES)
boot_power_utils.o: fusee_primary.bin.o fusee_primary_bin.h boot_power_utils.o: fusee-primary.bin.o
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# you need a rule like this for each extension you use as binary data # you need a rule like this for each extension you use as binary data
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
fusee_primary.bin.o fusee_primary_bin.h: fusee-primary.bin fusee-primary.bin.o: fusee-primary.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(_bin2o)
%.bin.o : %.bin
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@echo $(notdir $<) @echo $(notdir $<)
@$(bin2o) @$(bin2o)