Skip to content

Commit

Permalink
Unix Makefile: Discard unnecessary architecture checks
Browse files Browse the repository at this point in the history
Unlike the Mupen64Plus Core, which is sensitive to the architecture
it's compiled for due to its just-in-time compilers, this project does
not require architecture-specific glue code, only operating system
checks to load dynamic libraries and the presence of a well-behaving
port of SDL on the platform.

M64P_BIG_ENDIAN is not used for any decisions in this plugin, either.
Delete the big-endian processor checks.
  • Loading branch information
Nebuleon committed Jan 26, 2015
1 parent 611e441 commit 630e4c7
Showing 1 changed file with 3 additions and 30 deletions.
33 changes: 3 additions & 30 deletions projects/unix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ ifeq ("$(OS)","NONE")
$(error OS type "$(UNAME)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
endif

# detect system architecture
# detect system architecture, only if it matters for build flags
HOST_CPU ?= $(shell uname -m)
NO_ASM ?= 1
CPU := NONE
CPU := OTHER
ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
CPU := X86
ifeq ("$(BITS)", "32")
Expand All @@ -88,30 +87,8 @@ ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
ARCH_DETECTED := 32BITS
PIC ?= 0
endif
ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","")
CPU := PPC
ARCH_DETECTED := 32BITS
BIG_ENDIAN := 1
PIC ?= 1
$(warning Architecture "$(HOST_CPU)" not officially supported.')
endif
ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
CPU := PPC
ARCH_DETECTED := 64BITS
BIG_ENDIAN := 1
ifeq ("$(CPU)","OTHER")
PIC ?= 1
$(warning Architecture "$(HOST_CPU)" not officially supported.')
endif
ifneq ("$(filter arm%,$(HOST_CPU))","")
ifeq ("$(filter arm%b,$(HOST_CPU))","")
CPU := ARM
ARCH_DETECTED := 32BITS
PIC ?= 1
$(warning Architecture "$(HOST_CPU)" not officially supported.')
endif
endif
ifeq ("$(CPU)","NONE")
$(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
endif

# base CFLAGS, LDLIBS, and LDFLAGS
Expand All @@ -128,10 +105,6 @@ else
CFLAGS += -fno-PIC
endif

ifeq ($(BIG_ENDIAN), 1)
CFLAGS += -DM64P_BIG_ENDIAN
endif

# tweak flags for 32-bit build on 64-bit system
ifeq ($(ARCH_DETECTED), 64BITS_32)
CFLAGS += -m32
Expand Down

0 comments on commit 630e4c7

Please sign in to comment.