From 3daf0d136cf0074cc371591892db179567e971eb Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Thu, 20 May 2021 10:34:32 +0200 Subject: Update build system to build the boot data on the fly --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6d7a5ec..07b662b 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,8 @@ LIBGBA += $(LIBGBA_DIR)/lib/libmm.a # Source code location and files to watch for changes. SRC_DIR := src SRC_MAIN := $(SRC_DIR)/main.c +ROM := $(SRC_DIR)/uxn/roms/boot.c +ROM_SRC := $(SRC_DIR)/uxn/roms/dvd.rom ASM_FILES := $(wildcard $(SRC_DIR)/*.s) WATCH_SRC := $(wildcard $(SRC_DIR)/*.c) WATCH_SRC += $(wildcard $(SRC_DIR)/*.h) @@ -50,7 +52,13 @@ else CFLAGS += $(RELEASE_CFLAGS) endif -main: $(BUILD_DIR) $(BIN) +main: $(BUILD_DIR) $(ROM) $(BIN) + +$(ROM): + ../tools/bin2carr/build/bin2carr $(ROM_SRC) \ + -n uxn_rom \ + -e u16 \ + -o $(ROM) # Strip and fix header to create final .gba file. $(BIN): $(ELF) @@ -71,4 +79,5 @@ run: main # Remove build directory. clean: + rm $(ROM) rm -r $(BUILD_DIR) -- cgit v1.2.1