mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
Basic tidying
This commit is contained in:
parent
51eca76be3
commit
610bc61443
27
.gitignore
vendored
27
.gitignore
vendored
@ -1,16 +1,15 @@
|
||||
*.z64
|
||||
n64split
|
||||
*.bin
|
||||
*.FS
|
||||
*.bgm
|
||||
ctx.c
|
||||
Map_Assets.FS
|
||||
bgm/
|
||||
bin/
|
||||
build/
|
||||
yay0/
|
||||
expected/
|
||||
# Python
|
||||
__pycache__/
|
||||
venv/
|
||||
|
||||
# Misc
|
||||
.idea/
|
||||
.DS_Store
|
||||
venv/
|
||||
__pycache__/
|
||||
ctx.c
|
||||
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
|
||||
INCLUDE_DIRS := include include/PR
|
||||
DATA_DIRS := bin
|
||||
COMPRESSED_DIRS := yay0
|
||||
MAP_DIRS := Map_Assets.FS
|
||||
BGM_DIRS := bgm
|
||||
|
||||
# Source code files
|
||||
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))
|
||||
endif
|
||||
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
|
||||
O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \
|
||||
$(foreach file,$(S_FILES),$(BUILD_DIR)/$(file:.s=.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 #########################
|
||||
@ -62,7 +53,7 @@ LDFLAGS = -T undefined_syms.txt -T $(LD_SCRIPT) -Map $(BUILD_DIR)/papermario.map
|
||||
|
||||
######################## 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
|
||||
|
||||
@ -77,7 +68,7 @@ submodules:
|
||||
git submodule update --init --recursive
|
||||
|
||||
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
|
||||
|
||||
@ -98,15 +89,6 @@ $(BUILD_DIR)/%.o: %.c $(H_FILES)
|
||||
$(BUILD_DIR)/%.o: %.bin
|
||||
$(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
|
||||
$(OBJCOPY) $< $@ -O binary
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user