Add .app support and fixed warning (#126)

This commit is contained in:
EmeraldLoc 2022-06-05 21:11:58 -05:00 committed by GitHub
parent db7b82fc01
commit a63259cecf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) $<