mirror of
https://github.com/farisawan-2000/kirby64.git
synced 2024-11-26 22:50:43 +00:00
add matching switch to assets makefile (easier modding)
This commit is contained in:
parent
76afbb1d4c
commit
c7709f3934
@ -1,3 +1,5 @@
|
||||
MATCHING ?= 1
|
||||
|
||||
BUILD_DIR := ../build/us/assets
|
||||
DUMMY != mkdir -p $(BUILD_DIR)
|
||||
TARGET = $(BUILD_DIR)/assets.marker
|
||||
@ -78,7 +80,11 @@ _BG_IMGS := $(wildcard image/**/**/*background*.png) $(wildcard image/**/*backgr
|
||||
BG_OBJECTS := $(foreach file, $(_BG_IMGS), $(BUILD_DIR)/$(file:.png=.o))
|
||||
$(BG_OBJECTS): $(BUILD_DIR)/%.o: %.png
|
||||
$(V)mkdir -p $(@D)
|
||||
ifeq ($(MATCHING), 1)
|
||||
$(V)../tools/rgb2c -G $(lastword $(subst ., ,$*)) -B $(shell ../tools/img_getprop $<) -o RAW $< > $(@:.o=.bin)
|
||||
else
|
||||
$(V)../tools/rgb2c -G $(lastword $(subst ., ,$*)) -B -o RAW $< > $(@:.o=.bin)
|
||||
endif
|
||||
$(V)$(CROSS)ld -r -b binary -o $@ $(@:.o=.bin)
|
||||
|
||||
$(BUILD_DIR)/%.o: %.png
|
||||
|
Loading…
Reference in New Issue
Block a user