mirror of https://github.com/zeldaret/mm.git
Fix several issues with the makefile (#30)
* Fix several issues with the makefile * Make ROM_NAME conditionally set to allow custom names
This commit is contained in:
parent
a241f57e60
commit
10f9460b3b
19
Makefile
19
Makefile
|
@ -49,10 +49,11 @@ CFLAGS += -G 0 -non_shared -Xfullwarn -Xcpluscomm -Iinclude -Isrc -Wab,-r4300_mu
|
||||||
#### Files ####
|
#### Files ####
|
||||||
|
|
||||||
# ROM image
|
# ROM image
|
||||||
ROM_NAME := rom
|
MM_BASEROM ?= baserom.z64
|
||||||
ROM := $(ROM_NAME).z64
|
MM_ROM_NAME ?= rom
|
||||||
UNCOMPRESSED_ROM := $(ROM_NAME)_uncompressed.z64
|
ROM := $(MM_ROM_NAME).z64
|
||||||
ELF := $(ROM_NAME).elf
|
UNCOMPRESSED_ROM := $(MM_ROM_NAME)_uncompressed.z64
|
||||||
|
ELF := $(MM_ROM_NAME).elf
|
||||||
|
|
||||||
BASEROM_FILES := $(wildcard baserom/*)
|
BASEROM_FILES := $(wildcard baserom/*)
|
||||||
# Exclude dmadata, it will be generated right before packing the rom
|
# Exclude dmadata, it will be generated right before packing the rom
|
||||||
|
@ -104,7 +105,9 @@ CC := ./tools/preprocess.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||||
# disasm is not a file so we must tell make not to check it when evaluating timestamps
|
# disasm is not a file so we must tell make not to check it when evaluating timestamps
|
||||||
.INTERMEDIATE: disasm
|
.INTERMEDIATE: disasm
|
||||||
|
|
||||||
all: $(ROM) $(UNCOMPRESSED_ROM)
|
all:
|
||||||
|
make $(UNCOMPRESSED_ROM)
|
||||||
|
make $(ROM)
|
||||||
|
|
||||||
$(ROM): $(ROM_FILES)
|
$(ROM): $(ROM_FILES)
|
||||||
./tools/makerom.py ./tables/dmadata_table.txt $@ -c
|
./tools/makerom.py ./tables/dmadata_table.txt $@ -c
|
||||||
|
@ -159,6 +162,7 @@ setup:
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
make -C tools
|
make -C tools
|
||||||
|
./tools/extract_rom.py $(MM_BASEROM)
|
||||||
|
|
||||||
diff-init: all
|
diff-init: all
|
||||||
rm -rf expected/
|
rm -rf expected/
|
||||||
|
@ -167,7 +171,10 @@ diff-init: all
|
||||||
cp $(UNCOMPRESSED_ROM) expected/$(UNCOMPRESSED_ROM)
|
cp $(UNCOMPRESSED_ROM) expected/$(UNCOMPRESSED_ROM)
|
||||||
cp $(ROM) expected/$(ROM)
|
cp $(ROM) expected/$(ROM)
|
||||||
|
|
||||||
init: setup all diff-init
|
init:
|
||||||
|
make setup
|
||||||
|
make all
|
||||||
|
make diff-init
|
||||||
|
|
||||||
# Recipes
|
# Recipes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue