mirror of https://github.com/pmret/papermario.git
Basic tidying
This commit is contained in:
parent
51eca76be3
commit
610bc61443
|
@ -1,16 +1,15 @@
|
||||||
*.z64
|
# Python
|
||||||
n64split
|
__pycache__/
|
||||||
*.bin
|
venv/
|
||||||
*.FS
|
|
||||||
*.bgm
|
# Misc
|
||||||
ctx.c
|
|
||||||
Map_Assets.FS
|
|
||||||
bgm/
|
|
||||||
bin/
|
|
||||||
build/
|
|
||||||
yay0/
|
|
||||||
expected/
|
|
||||||
.idea/
|
.idea/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
venv/
|
ctx.c
|
||||||
__pycache__/
|
expected/
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
*.z64
|
||||||
|
*.bin
|
||||||
|
bin/
|
||||||
|
build/
|
||||||
|
|
22
Makefile
22
Makefile
|
@ -11,9 +11,6 @@ SRC_DIRS := src src/os
|
||||||
ASM_DIRS := asm asm/os
|
ASM_DIRS := asm asm/os
|
||||||
INCLUDE_DIRS := include include/PR
|
INCLUDE_DIRS := include include/PR
|
||||||
DATA_DIRS := bin
|
DATA_DIRS := bin
|
||||||
COMPRESSED_DIRS := yay0
|
|
||||||
MAP_DIRS := Map_Assets.FS
|
|
||||||
BGM_DIRS := bgm
|
|
||||||
|
|
||||||
# Source code files
|
# Source code files
|
||||||
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c))
|
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||||
|
@ -22,17 +19,11 @@ ifdef PM_HEADER_REBUILD
|
||||||
H_FILES := $(foreach dir,$(INCLUDE_DIRS),$(wildcard $(dir)/*.h))
|
H_FILES := $(foreach dir,$(INCLUDE_DIRS),$(wildcard $(dir)/*.h))
|
||||||
endif
|
endif
|
||||||
DATA_FILES := $(foreach dir,$(DATA_DIRS),$(wildcard $(dir)/*.bin))
|
DATA_FILES := $(foreach dir,$(DATA_DIRS),$(wildcard $(dir)/*.bin))
|
||||||
COMPRESSED_FILES := $(foreach dir,$(COMPRESSED_DIRS),$(wildcard $(dir)/*.yay0))
|
|
||||||
MAP_FILES := $(foreach dir,$(MAP_DIRS),$(wildcard $(dir)/*.FS))
|
|
||||||
BGM_FILES := $(foreach dir,$(BGM_DIRS),$(wildcard $(dir)/*.bgm))
|
|
||||||
|
|
||||||
# Object files
|
# Object files
|
||||||
O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \
|
O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \
|
||||||
$(foreach file,$(S_FILES),$(BUILD_DIR)/$(file:.s=.o)) \
|
$(foreach file,$(S_FILES),$(BUILD_DIR)/$(file:.s=.o)) \
|
||||||
$(foreach file,$(DATA_FILES),$(BUILD_DIR)/$(file:.bin=.o)) \
|
$(foreach file,$(DATA_FILES),$(BUILD_DIR)/$(file:.bin=.o)) \
|
||||||
$(foreach file,$(COMPRESSED_FILES),$(BUILD_DIR)/$(file:.yay0=.yay0.o)) \
|
|
||||||
$(foreach file,$(MAP_FILES),$(BUILD_DIR)/$(file:.FS=.FS.o)) \
|
|
||||||
$(foreach file,$(BGM_FILES),$(BUILD_DIR)/$(file:.bgm=.bgm.o))
|
|
||||||
|
|
||||||
|
|
||||||
####################### Other Tools #########################
|
####################### Other Tools #########################
|
||||||
|
@ -62,7 +53,7 @@ LDFLAGS = -T undefined_syms.txt -T $(LD_SCRIPT) -Map $(BUILD_DIR)/papermario.map
|
||||||
|
|
||||||
######################## Targets #############################
|
######################## Targets #############################
|
||||||
|
|
||||||
$(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(DATA_DIRS) $(COMPRESSED_DIRS) $(MAP_DIRS) $(BGM_DIRS),$(shell mkdir -p build/$(dir)))
|
$(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(DATA_DIRS) ,$(shell mkdir -p build/$(dir)))
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
|
@ -77,7 +68,7 @@ submodules:
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
split:
|
split:
|
||||||
rm -rf $(DATA_DIRS) $(BGM_DIRS) && ./tools/n64splat/split.py baserom.z64 tools/splat.yaml .
|
rm -rf $(DATA_DIRS) && ./tools/n64splat/split.py baserom.z64 tools/splat.yaml .
|
||||||
|
|
||||||
setup: clean submodules split
|
setup: clean submodules split
|
||||||
|
|
||||||
|
@ -98,15 +89,6 @@ $(BUILD_DIR)/%.o: %.c $(H_FILES)
|
||||||
$(BUILD_DIR)/%.o: %.bin
|
$(BUILD_DIR)/%.o: %.bin
|
||||||
$(LD) -r -b binary -o $@ $<
|
$(LD) -r -b binary -o $@ $<
|
||||||
|
|
||||||
$(BUILD_DIR)/%.yay0.o: %.yay0
|
|
||||||
$(LD) -r -b binary -o $@ $<
|
|
||||||
|
|
||||||
$(BUILD_DIR)/%.FS.o: %.FS
|
|
||||||
$(LD) -r -b binary -o $@ $<
|
|
||||||
|
|
||||||
$(BUILD_DIR)/%.bgm.o: %.bgm
|
|
||||||
$(LD) -r -b binary -o $@ $<
|
|
||||||
|
|
||||||
$(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf
|
$(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf
|
||||||
$(OBJCOPY) $< $@ -O binary
|
$(OBJCOPY) $< $@ -O binary
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue