From 610bc61443ca4d161296d8ffa70a93e7ad15a260 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 20 Aug 2020 12:37:26 -0400 Subject: [PATCH] Basic tidying --- .gitignore | 27 +++++++++++++-------------- Makefile | 22 ++-------------------- 2 files changed, 15 insertions(+), 34 deletions(-) diff --git a/.gitignore b/.gitignore index 27adff8382..2caa9c0bbd 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/Makefile b/Makefile index c3af3d9437..dfb3a3ed84 100644 --- a/Makefile +++ b/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