forked from scakemyer/quasar
-
Notifications
You must be signed in to change notification settings - Fork 43
/
platform_target.mk
33 lines (31 loc) · 967 Bytes
/
platform_target.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
GCC_TARGET = $(CC)
ifneq ($(findstring darwin, $(GCC_TARGET)),)
TARGET_OS = darwin
else ifneq ($(findstring mingw, $(GCC_TARGET)),)
TARGET_OS = windows
else ifneq ($(findstring android, $(GCC_TARGET)),)
TARGET_OS = android
else ifneq ($(findstring linux, $(GCC_TARGET)),)
TARGET_OS = linux
endif
ifneq ($(findstring x86_64, $(GCC_TARGET)),)
TARGET_ARCH = x64
else ifneq ($(findstring i386, $(GCC_TARGET)),)
TARGET_ARCH = x86
else ifneq ($(findstring i486, $(GCC_TARGET)),)
TARGET_ARCH = x86
else ifneq ($(findstring i586, $(GCC_TARGET)),)
TARGET_ARCH = x86
else ifneq ($(findstring i686, $(GCC_TARGET)),)
TARGET_ARCH = x86
else ifneq ($(findstring aarch64, $(GCC_TARGET)),)
TARGET_ARCH = arm64
else ifneq ($(findstring armv7, $(GCC_TARGET)),)
TARGET_ARCH = armv7
else ifneq ($(findstring arm, $(GCC_TARGET)),)
ifeq ($(TARGET_OS), linux)
TARGET_ARCH = armv6
else
TARGET_ARCH = arm
endif
endif