$NetBSD: patch-Makefile,v 1.1 2019/05/18 10:34:33 nia Exp $

Do not make guesses based on uname.

--- Makefile.orig	2019-04-26 23:01:28.000000000 +0000
+++ Makefile
@@ -9,62 +9,10 @@ COREFLAGS :=
 CPUFLAGS  :=
 GLFLAGS   :=
 
-UNAME=$(shell uname -a)
-
 # Dirs
 ROOT_DIR := .
 LIBRETRO_DIR := $(ROOT_DIR)/libretro
 
-ifeq ($(platform),)
-   platform = unix
-   ifeq ($(UNAME),)
-      platform = win
-   else ifneq ($(findstring MINGW,$(UNAME)),)
-      platform = win
-   else ifneq ($(findstring Darwin,$(UNAME)),)
-      platform = osx
-   else ifneq ($(findstring win,$(UNAME)),)
-      platform = win
-   endif
-else ifneq (,$(findstring armv,$(platform)))
-    ifeq (,$(findstring classic_,$(platform)))
-        override platform += unix
-    endif
-endif
-
-# system platform
-system_platform = unix
-ifeq ($(shell uname -a),)
-   EXE_EXT = .exe
-   system_platform = win
-else ifneq ($(findstring Darwin,$(shell uname -a)),)
-   system_platform = osx
-   arch = intel
-ifeq ($(shell uname -p),powerpc)
-   arch = ppc
-endif
-else ifneq ($(findstring MINGW,$(shell uname -a)),)
-   system_platform = win
-endif
-
-# Cross compile?
-ifeq (,$(ARCH))
-   ARCH = $(shell uname -m)
-endif
-
-# Target Dynarec
-WITH_DYNAREC = $(ARCH)
-
-PIC = 1
-ifeq ($(ARCH), $(filter $(ARCH), i386 i686))
-   WITH_DYNAREC = x86
-   PIC = 0
-else ifeq ($(ARCH), $(filter $(ARCH), arm))
-   WITH_DYNAREC = arm
-else ifeq ($(ARCH), $(filter $(ARCH), aarch64))
-   WITH_DYNAREC = aarch64
-endif
-
 TARGET_NAME := mupen64plus
 CC_AS ?= $(CC)
 
