Remove unnecessary OSX_ARCH setting, replace it with YQ2_ARCH.

This commit is contained in:
Yamagi 2020-04-21 13:57:09 +02:00
parent beadebbdec
commit 00e6eb6303

View file

@ -50,12 +50,6 @@ WITH_SYSTEMWIDE:=no
# MUST NOT be surrounded by quotation marks! # MUST NOT be surrounded by quotation marks!
WITH_SYSTEMDIR:="" WITH_SYSTEMDIR:=""
# This will set the architectures of the OSX-binaries.
# You have to make sure your libs/frameworks supports
# these architectures! To build an universal ppc-compatible
# one would add -arch ppc for example.
OSX_ARCH:=-arch $(shell uname -m | sed -e s/i.86/i386/)
# This will set the build options to create an MacOS .app-bundle. # This will set the build options to create an MacOS .app-bundle.
# The app-bundle itself will not be created, but the runtime paths # The app-bundle itself will not be created, but the runtime paths
# will be set to expect the game-data in *.app/ # will be set to expect the game-data in *.app/
@ -142,7 +136,7 @@ endif
# OS X architecture. # OS X architecture.
ifeq ($(YQ2_OSTYPE), Darwin) ifeq ($(YQ2_OSTYPE), Darwin)
override CFLAGS += $(OSX_ARCH) override CFLAGS += -arch $(YQ2_ARCH)
endif endif
# ---------- # ----------
@ -181,7 +175,7 @@ override CFLAGS += -DYQ2OSTYPE=\"$(YQ2_OSTYPE)\" -DYQ2ARCH=\"$(YQ2_ARCH)\"
# ---------- # ----------
# Fore reproduceable builds, look here for details: # For reproduceable builds, look here for details:
# https://reproducible-builds.org/specs/source-date-epoch/ # https://reproducible-builds.org/specs/source-date-epoch/
ifdef SOURCE_DATE_EPOCH ifdef SOURCE_DATE_EPOCH
override CFLAGS += -DBUILD_DATE=\"$(shell date --utc --date="@${SOURCE_DATE_EPOCH}" +"%b %_d %Y" | sed -e 's/ /\\ /g')\" override CFLAGS += -DBUILD_DATE=\"$(shell date --utc --date="@${SOURCE_DATE_EPOCH}" +"%b %_d %Y" | sed -e 's/ /\\ /g')\"
@ -261,7 +255,7 @@ GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad/include
# ---------- # ----------
# Base LDFLAGS. This is just the include path. # Base LDFLAGS. This is just the library path.
ifeq ($(YQ2_OSTYPE),Linux) ifeq ($(YQ2_OSTYPE),Linux)
LDFLAGS ?= -L/usr/lib LDFLAGS ?= -L/usr/lib
else ifeq ($(YQ2_OSTYPE),FreeBSD) else ifeq ($(YQ2_OSTYPE),FreeBSD)
@ -282,7 +276,7 @@ override LDFLAGS += -lm
else ifeq ($(YQ2_OSTYPE),Windows) else ifeq ($(YQ2_OSTYPE),Windows)
override LDFLAGS += -lws2_32 -lwinmm -static-libgcc override LDFLAGS += -lws2_32 -lwinmm -static-libgcc
else ifeq ($(YQ2_OSTYPE), Darwin) else ifeq ($(YQ2_OSTYPE), Darwin)
override LDFLAGS += $(OSX_ARCH) override LDFLAGS += -arch $(YQ2_ARCH)
endif endif
# Keep symbols hidden. # Keep symbols hidden.
@ -402,7 +396,7 @@ ifeq ($(YQ2_OSTYPE), Darwin)
build/client/%.o : %.c build/client/%.o : %.c
@echo "===> CC $<" @echo "===> CC $<"
${Q}mkdir -p $(@D) ${Q}mkdir -p $(@D)
${Q}$(CC) $(OSX_ARCH) -x objective-c -c $(CFLAGS) $(SDLCFLAGS) $(ZIPCFLAGS) $(INCLUDE) $< -o $@ ${Q}$(CC) -arch $(YQ2_ARCH) -x objective-c -c $(CFLAGS) $(SDLCFLAGS) $(ZIPCFLAGS) $(INCLUDE) $< -o $@
else else
build/client/%.o: %.c build/client/%.o: %.c
@echo "===> CC $<" @echo "===> CC $<"