blob: 2086fe00377dd95b59172c41867ae8f18ef67fd8 [file] [log] [blame]
ifeq ($(strip $(arch)),)
arch := $(shell uname -m)
endif
ifeq ($(strip $(os)),)
os := $(shell uname)
endif
ifeq ($(os),Linux)
# Linux
ifeq ($(arch),i686)
target := x86
subdir_ub := i386-linux-gnu
else ifeq ($(arch),x86_64)
target := x86
subdir_ub := x86_64-linux-gnu
else ifeq ($(arch),ppc64)
target := ppc64
subdir_ub :=
else ifeq ($(arch),ppc64le)
target := ppc64
subdir_ub := powerpc64le-linux-gnu
else ifeq ($(arch),aarch64)
target := arm64
subdir_ub := aarch64-linux-gnu
else ifneq (,$(findstring arm,$(arch)))
target := arm
subdir_ub := arm-linux-gnueabihf
else
target :=
subdir_ub :=
endif
os_compat := linux
else ifeq ($(os),QNX)
# QNX
ifeq ($(arch),x86_64)
target := x86
else ifeq ($(arch),aarch64le)
target := arm64
else
target :=
endif
subdir_ub :=
os_compat := qnx
else
# Other OS
target :=
subdir_ub :=
os_compat :=
endif
api_depend_common := $(top)/linux/common.h \
$(top)/api-pthreads/api-pthreads.h \
$(top)/api-pthreads/api-gcc.h
ifeq ($(target),x86)
api_depend := $(top)/arch-x86/arch-x86.h
arch_depend := $(top)/arch-x86/Makefile.arch
else ifeq ($(target),ppc64)
api_depend := $(top)/arch-ppc64/arch-ppc64.h
arch_depend := $(top)/arch-ppc64/Makefile.arch
else ifeq ($(target),arm)
api_depend := $(top)/arch-arm/arch-arm.h
arch_depend := $(top)/arch-arm/Makefile.arch
else ifeq ($(target),arm64)
api_depend := $(top)/arch-arm64/arch-arm64.h
arch_depend := $(top)/arch-arm64/Makefile.arch
else
api_depend :=
arch_depend :=
endif