#--------------------------------------------------------------------------------- .SUFFIXES: #--------------------------------------------------------------------------------- ifeq ($(strip $(DEVKITARM)),) $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") endif TOPDIR ?= $(CURDIR) AMS := $(TOPDIR)/../../../ include $(DEVKITARM)/base_rules AMSBRANCH := $(shell git symbolic-ref --short HEAD) AMSREV := $(AMSBRANCH)-$(shell git rev-parse --short HEAD) ifneq (, $(strip $(shell git status --porcelain 2>/dev/null))) AMSREV := $(AMSREV)-dirty endif define _bin2o bin2s $< | $(AS) -o $(@) echo "extern const u8" `(echo $( `(echo $(> `(echo $(> `(echo $( $(notdir $*.lst) utils.o: CFLAGS += -fno-builtin $(OFILES_SRC) : $(HFILES_BIN) #--------------------------------------------------------------------------------- # you need a rule like this for each extension you use as binary data #--------------------------------------------------------------------------------- %.bin.o %_bin.h: %.bin #--------------------------------------------------------------------------------- @echo $(notdir $<) @$(bin2o) #--------------------------------------------------------------------------------- # you need a rule like this for each extension you use as binary data #--------------------------------------------------------------------------------- fusee_primary_main.lz4.o fusee_primary_main_lz4.h: fusee-primary-main.lz4 #--------------------------------------------------------------------------------- @echo $(notdir $<) @$(_bin2o) -include $(DEPENDS) #--------------------------------------------------------------------------------------- endif #---------------------------------------------------------------------------------------