From a63259cecf381cba777d722c95277bdc33d210a2 Mon Sep 17 00:00:00 2001 From: EmeraldLoc <86802223+EmeraldLoc@users.noreply.github.com> Date: Sun, 5 Jun 2022 21:11:58 -0500 Subject: [PATCH] Add .app support and fixed warning (#126) --- Makefile | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d4c5df47..240b9725 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,8 @@ PROFILE ?= 0 HEADLESS ?= 0 # Enable Game ICON ICON ?= 1 +# Use .app (mac only) +USE_APP ?= 1 # Various workarounds for weird toolchains NO_BZERO_BCOPY ?= 0 @@ -380,12 +382,21 @@ endif COMPARE ?= 1 $(eval $(call validate-option,COMPARE,0 1)) +ifeq ($(OSX_BUILD),0) + USE_APP := 0 +endif + +ifeq ($(USE_APP),0) TARGET_STRING := sm64.$(VERSION).$(GRUCODE) +else +TARGET_STRING := sm64.$(VERSION).$(GRUCODE).app +endif # If non-default settings were chosen, disable COMPARE ifeq ($(filter $(TARGET_STRING), sm64.jp.f3d_old sm64.us.f3d_old sm64.eu.f3d_new sm64.sh.f3d_new),) COMPARE := 0 endif + # Whether to hide commands or not VERBOSE ?= 0 ifeq ($(VERBOSE),0) @@ -673,7 +684,11 @@ ifeq ($(WINDOWS_AUTO_BUILDER),1) else ifeq ($(COMPILER),gcc) CC := $(CROSS)gcc CXX := $(CROSS)g++ - EXTRA_CFLAGS += -Wno-unused-result -Wno-format-truncation + ifeq ($(OSX_BUILD),0) + EXTRA_CFLAGS += -Wno-unused-result -Wno-format-truncation + else + EXTRA_CFLAGS += -Wno-unused-result + endif else ifeq ($(COMPILER),clang) CC := clang CXX := clang++ @@ -1166,14 +1181,13 @@ endif clean: $(RM) -r $(BUILD_DIR_BASE) - + cleantools: $(MAKE) -s -C $(TOOLS_DIR) clean distclean: clean $(PYTHON) extract_assets.py --clean - cleantools - + test: $(ROM) $(EMULATOR) $(EMU_FLAGS) $<