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