diff options
author | Bad Diode <bd@badd10de.dev> | 2021-05-20 10:34:32 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-05-20 10:34:32 +0200 |
commit | 3daf0d136cf0074cc371591892db179567e971eb (patch) | |
tree | 4a6936e1414ec0a08b10f0d6e9a5894a8f2bf465 /Makefile | |
parent | 9911609e8fff312c406e3407a519b39db79bdb97 (diff) | |
download | uxngba-3daf0d136cf0074cc371591892db179567e971eb.tar.gz uxngba-3daf0d136cf0074cc371591892db179567e971eb.zip |
Update build system to build the boot data on the fly
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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. |
15 | SRC_DIR := src | 15 | SRC_DIR := src |
16 | SRC_MAIN := $(SRC_DIR)/main.c | 16 | SRC_MAIN := $(SRC_DIR)/main.c |
17 | ROM := $(SRC_DIR)/uxn/roms/boot.c | ||
18 | ROM_SRC := $(SRC_DIR)/uxn/roms/dvd.rom | ||
17 | ASM_FILES := $(wildcard $(SRC_DIR)/*.s) | 19 | ASM_FILES := $(wildcard $(SRC_DIR)/*.s) |
18 | WATCH_SRC := $(wildcard $(SRC_DIR)/*.c) | 20 | WATCH_SRC := $(wildcard $(SRC_DIR)/*.c) |
19 | WATCH_SRC += $(wildcard $(SRC_DIR)/*.h) | 21 | WATCH_SRC += $(wildcard $(SRC_DIR)/*.h) |
@@ -50,7 +52,13 @@ else | |||
50 | CFLAGS += $(RELEASE_CFLAGS) | 52 | CFLAGS += $(RELEASE_CFLAGS) |
51 | endif | 53 | endif |
52 | 54 | ||
53 | main: $(BUILD_DIR) $(BIN) | 55 | main: $(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. |
73 | clean: | 81 | clean: |
82 | rm $(ROM) | ||
74 | rm -r $(BUILD_DIR) | 83 | rm -r $(BUILD_DIR) |