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
parent 39c304f882
commit 0d81ada619

View File

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