Fix platform detection in makefile (#6751)

This commit is contained in:
Sergey Avseyev 2017-11-16 04:36:36 +03:00 • committed by Andreas Rumpf
commit 0d81ada619

View file

@ -17,7 +17,6 @@ endif
ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"') ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"')
uos := $(shell sh -c 'uname | tr "[:upper:]" "[:lower:]"') uos := $(shell sh -c 'uname | tr "[:upper:]" "[:lower:]"')
uosname := $(shell sh -c 'uname -o | tr "[:upper:]" "[:lower:]"')
ifeq ($(uos),linux) ifeq ($(uos),linux)
myos = linux myos = linux
@ -65,15 +64,10 @@ endif
ifeq ($(uos),haiku) ifeq ($(uos),haiku)
myos = haiku myos = haiku
endif endif
ifndef uos ifndef myos
$(error unknown operating system: $(uos)) $(error unknown operating system: $(uos))
endif endif
ifeq ($(uosname),android)
myos = android
LINK_FLAGS += -landroid-glob
endif
ifeq ($(ucpu),i386) ifeq ($(ucpu),i386)
mycpu = i386 mycpu = i386
endif endif
@ -141,7 +135,16 @@ endif
ifeq ($(ucpu),armv6l) ifeq ($(ucpu),armv6l)
mycpu = arm mycpu = arm
endif endif
ifndef ucpu ifeq ($(ucpu),armv7l)
mycpu = arm
endif
ifeq ($(ucpu),armv7hl)
mycpu = arm
endif
ifeq ($(ucpu),aarch64)
mycpu = arm64
endif
ifndef mycpu
$(error unknown processor: $(ucpu)) $(error unknown processor: $(ucpu))
endif endif