aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-05-20 10:34:32 +0200
committerBad Diode <bd@badd10de.dev>2021-05-20 10:34:32 +0200
commit3daf0d136cf0074cc371591892db179567e971eb (patch)
tree4a6936e1414ec0a08b10f0d6e9a5894a8f2bf465 /Makefile
parent9911609e8fff312c406e3407a519b39db79bdb97 (diff)
downloaduxngba-3daf0d136cf0074cc371591892db179567e971eb.tar.gz
uxngba-3daf0d136cf0074cc371591892db179567e971eb.zip
Update build system to build the boot data on the fly
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6d7a5ec..07b662b 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,8 @@ LIBGBA += $(LIBGBA_DIR)/lib/libmm.a
14# Source code location and files to watch for changes. 14# Source code location and files to watch for changes.
15SRC_DIR := src 15SRC_DIR := src
16SRC_MAIN := $(SRC_DIR)/main.c 16SRC_MAIN := $(SRC_DIR)/main.c
17ROM := $(SRC_DIR)/uxn/roms/boot.c
18ROM_SRC := $(SRC_DIR)/uxn/roms/dvd.rom
17ASM_FILES := $(wildcard $(SRC_DIR)/*.s) 19ASM_FILES := $(wildcard $(SRC_DIR)/*.s)
18WATCH_SRC := $(wildcard $(SRC_DIR)/*.c) 20WATCH_SRC := $(wildcard $(SRC_DIR)/*.c)
19WATCH_SRC += $(wildcard $(SRC_DIR)/*.h) 21WATCH_SRC += $(wildcard $(SRC_DIR)/*.h)
@@ -50,7 +52,13 @@ else
50 CFLAGS += $(RELEASE_CFLAGS) 52 CFLAGS += $(RELEASE_CFLAGS)
51endif 53endif
52 54
53main: $(BUILD_DIR) $(BIN) 55main: $(BUILD_DIR) $(ROM) $(BIN)
56
57$(ROM):
58 ../tools/bin2carr/build/bin2carr $(ROM_SRC) \
59 -n uxn_rom \
60 -e u16 \
61 -o $(ROM)
54 62
55# Strip and fix header to create final .gba file. 63# Strip and fix header to create final .gba file.
56$(BIN): $(ELF) 64$(BIN): $(ELF)
@@ -71,4 +79,5 @@ run: main
71 79
72# Remove build directory. 80# Remove build directory.
73clean: 81clean:
82 rm $(ROM)
74 rm -r $(BUILD_DIR) 83 rm -r $(BUILD_DIR)