forked from steeve/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 19
/
platform_target.mk
29 lines (27 loc) · 884 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
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)),)
TARGET_ARCH = arm
endif