From 27a8be87d19bfc78c2bf59d62478d1ac776a0fb4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 12 Dec 2014 03:03:55 +0100 Subject: Make compiling in with the 32bit dynarec optional - also include a switch to hardforce this --- Makefile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6971e88..6e84070 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ DEBUG=0 HAVE_GRIFFIN=0 FRONTEND_SUPPORTS_RGB565=1 +FORCE_32BIT_ARCH=0 ifneq ($(EMSCRIPTEN),) platform = emscripten @@ -23,6 +24,23 @@ ifeq ($(platform),) endif endif + +ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64) + +else ifeq ($(firstword $(filter amd64,$(UNAME))),amd64) + +else ifeq ($(firstword $(filter x86,$(UNAME))),x86) + FORCE_32BIT_ARCH := 1 +endif + +FORCE_32BIT := + +ifeq ($(FORCE_32BIT_ARCH),1) + HAVE_DYNAREC := 1 + FORCE_32BIT := -m32 + CPU_ARCH := x86_32 +endif + # system platform system_platform = unix ifeq ($(shell uname -a),) @@ -47,9 +65,6 @@ LDFLAGS := ifeq ($(platform), unix) TARGET := $(TARGET_NAME)_libretro.so fpic := -fPIC - FORCE_32BIT := -m32 - CPU_ARCH := x86_32 - HAVE_DYNAREC := 1 SHARED := -shared $(FORCE_32BIT) -Wl,--version-script=link.T ifneq ($(findstring Haiku,$(shell uname -a)),) LIBM := -- cgit v1.2.3