From 00e6eb63036fabdc1d891d4ee4f9e3845b6f8ec2 Mon Sep 17 00:00:00 2001 From: Yamagi Date: Tue, 21 Apr 2020 13:57:09 +0200 Subject: [PATCH] Remove unnecessary OSX_ARCH setting, replace it with YQ2_ARCH. --- Makefile | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index c6ffd22b..be727417 100755 --- a/Makefile +++ b/Makefile @@ -50,12 +50,6 @@ WITH_SYSTEMWIDE:=no # MUST NOT be surrounded by quotation marks! 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. # The app-bundle itself will not be created, but the runtime paths # will be set to expect the game-data in *.app/ @@ -142,7 +136,7 @@ endif # OS X architecture. ifeq ($(YQ2_OSTYPE), Darwin) -override CFLAGS += $(OSX_ARCH) +override CFLAGS += -arch $(YQ2_ARCH) 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/ ifdef SOURCE_DATE_EPOCH 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) LDFLAGS ?= -L/usr/lib else ifeq ($(YQ2_OSTYPE),FreeBSD) @@ -282,7 +276,7 @@ override LDFLAGS += -lm else ifeq ($(YQ2_OSTYPE),Windows) override LDFLAGS += -lws2_32 -lwinmm -static-libgcc else ifeq ($(YQ2_OSTYPE), Darwin) -override LDFLAGS += $(OSX_ARCH) +override LDFLAGS += -arch $(YQ2_ARCH) endif # Keep symbols hidden. @@ -402,7 +396,7 @@ ifeq ($(YQ2_OSTYPE), Darwin) build/client/%.o : %.c @echo "===> CC $<" ${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 build/client/%.o: %.c @echo "===> CC $<"