From 7af4107235e6c178d5740782fe510d2df1c825b1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 11 Nov 2021 15:21:59 -0500 Subject: Fix Makefile issues with OSX 11.6 --- arm7/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arm7') diff --git a/arm7/Makefile b/arm7/Makefile index 67a07f26..9b660322 100644 --- a/arm7/Makefile +++ b/arm7/Makefile @@ -107,7 +107,7 @@ GFX = $(TOOLS_DIR)/nitrogfx/nitrogfx SCANINC = $(TOOLS_DIR)/scaninc/scaninc$(EXE) MWASMARM_PATCHER = $(TOOLS_DIR)/mwasmarm_patcher/mwasmarm_patcher$(EXE) -q -TOOLDIRS = $(filter-out $(TOOLS_DIR)/asm_processor $(TOOLS_DIR)/mwccarm $(TOOLS_DIR)/bin,$(wildcard $(TOOLS_DIR)/*)) +TOOLDIRS = $(dir $(wildcard $(TOOLS_DIR)/*/Makefile)) TOOLBASE = $(TOOLDIRS:$(TOOLS_DIR)/%=%) TOOLS = $(foreach tool,$(TOOLBASE),$(TOOLS_DIR)/$(tool)/$(tool)$(EXE)) -- cgit v1.2.3 From c619240caca34b085918f948da2aac55d1e76691 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 24 Nov 2021 09:38:34 -0500 Subject: Fix build system for macOS --- arm7/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arm7') diff --git a/arm7/Makefile b/arm7/Makefile index 9b660322..4f99c50b 100644 --- a/arm7/Makefile +++ b/arm7/Makefile @@ -185,7 +185,7 @@ $(ROM): $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BIN_FILES) $(OBJCOPY) --update-section arm7=$@ -j arm7 $(foreach ov,$(OVERLAYS),--update-section $(ov)=$(BUILD_DIR)/$(ov).sbin -j $(ov)) $(ELF) 2>/dev/null # Make sure build directory exists before compiling anything -DUMMY != mkdir -p $(ALL_DIRS) +DUMMY := $(shell mkdir -p $(ALL_DIRS)) %.4bpp: %.png $(GFX) $< $@ -- cgit v1.2.3 From df849f9676df54dafc97284cec8c00949e5571a6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 24 Nov 2021 10:30:45 -0500 Subject: Fix some more the building on macOS --- arm7/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'arm7') diff --git a/arm7/Makefile b/arm7/Makefile index 4f99c50b..882ab41c 100644 --- a/arm7/Makefile +++ b/arm7/Makefile @@ -3,12 +3,19 @@ .PHONY: clean tidy all default patch_mwasmarm # Try to include devkitarm if installed +ifdef DEVKITARM TOOLCHAIN := $(DEVKITARM) +endif -ifneq (,$(wildcard $(TOOLCHAIN)/base_tools)) -include $(TOOLCHAIN)/base_tools +ifdef TOOLCHAIN +export PATH := $(TOOLCHAIN)/bin:$(PATH) endif +PREFIX := arm-none-eabi- + +OBJCOPY := $(PREFIX)objcopy +AR := $(PREFIX)ar + ### Default target ### default: all @@ -111,17 +118,20 @@ TOOLDIRS = $(dir $(wildcard $(TOOLS_DIR)/*/Makefile)) TOOLBASE = $(TOOLDIRS:$(TOOLS_DIR)/%=%) TOOLS = $(foreach tool,$(TOOLBASE),$(TOOLS_DIR)/$(tool)/$(tool)$(EXE)) +TOOLS: tools + export LM_LICENSE_FILE := $(TOOLS_DIR)/mwccarm/license.dat export MWCIncludes := lib/include ######################### Targets ########################### +######################## Targets ########################### infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line)))) # Build tools when building the rom # Disable dependency scanning for clean/tidy/tools ifeq (,$(filter-out all,$(MAKECMDGOALS))) -$(call infoshell, $(MAKE) tools patch_mwasmarm) +$(call infoshell,$(MAKE) tools patch_mwasmarm) else NODEP := 1 endif @@ -131,6 +141,8 @@ endif MAKEFLAGS += --no-print-directory +all: tools patch_mwasmarm + all: $(ROM) ifeq ($(COMPARE),1) @$(SHA1SUM) -c $(TARGET).sha1 -- cgit v1.2.3 From ec3b2ac58135c2e97fc708487bbcdd47c9ac427b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 17 Dec 2021 12:33:51 -0500 Subject: Compatibility fixes for macOS 12.x --- arm7/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'arm7') diff --git a/arm7/Makefile b/arm7/Makefile index 882ab41c..0197c490 100644 --- a/arm7/Makefile +++ b/arm7/Makefile @@ -96,9 +96,9 @@ OBJDUMP := $(CROSS)objdump OBJCOPY := $(CROSS)objcopy # ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm7_thumb.s -o arm7.o -ASFLAGS = -proc arm4t -i .. -CFLAGS = -O4,s -proc arm7tdmi -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all -LDFLAGS = -map -nodead -w off -proc v4t -interworking -map -symtab -m _start +MWASFLAGS = -proc arm4t -i .. +MWCFLAGS = -O4,s -proc arm7tdmi -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/include -interworking -DFS_IMPLEMENT -enum int -W all +MWLDFLAGS = -map -nodead -w off -proc v4t -interworking -map -symtab -m _start ####################### Other Tools ######################### @@ -183,17 +183,17 @@ $(BUILD_DIR)/%.o: dep := endif $(C_OBJS): $(BUILD_DIR)/%.o: %.c $$(dep) - $(CC) -c $(CFLAGS) -o $@ $< + $(CC) -c $(MWCFLAGS) -o $@ $< $(S_OBJS): $(BUILD_DIR)/%.o: %.s $$(dep) - $(AS) $(ASFLAGS) -o $@ $< + $(AS) $(MWASFLAGS) -o $@ $< $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SPEC) $(LD_TEMPLATE) $(MAKELSF) $< $(LD_TEMPLATE) $@ $(ROM): $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BIN_FILES) echo "$(O_FILES) $(BIN_FILES)" > $(ELF).objlist - $(LD) $(LDFLAGS) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) @$(ELF).objlist + $(LD) $(MWLDFLAGS) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) @$(ELF).objlist $(OBJCOPY) --update-section arm7=$@ -j arm7 $(foreach ov,$(OVERLAYS),--update-section $(ov)=$(BUILD_DIR)/$(ov).sbin -j $(ov)) $(ELF) 2>/dev/null # Make sure build directory exists before compiling anything -- cgit v1.2.3