-
Notifications
You must be signed in to change notification settings - Fork 13
/
platform.mk
61 lines (48 loc) · 1.08 KB
/
platform.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Platform Setup
#
PLATFORM_FLAGS = -DPOSIX
ifeq ($(TARGET),$(HOST_MAC))
FWKS=/System/Library/Frameworks
FWKCFLAGS=-I/Developer/Headers/FlatCarbon \
-I$(FWKS)/IOKit.framework/Versions/Current/Headers
PLATFORM_FLAGS += $(FWKCFLAGS)
PLATFORM_LDFLAGS += -framework Carbon -framework IOKit
ifeq ($(STRIP_DEAD),yes)
PLATFORM_LDFLAGS += -dead_strip
endif
# Building for 32-bit
ifeq ($(PROC),$(PROC_PPC))
PLATFORM_FLAGS += -arch ppc
PLATFORM_LDFLAGS += -arch ppc
else
ifeq ($(ARCH), $(ARCH_x86_64))
PLATFORM_FLAGS += -arch x86_64
PLATFORM_LDFLAGS += -arch x86_64
else
PLATFORM_FLAGS += -arch i386
PLATFORM_LDFLAGS += -arch i386
endif
endif
ifeq ($(CC), "")
CC=/usr/bin/gcc
endif
ifeq ($(CXX), "")
CXX=/usr/bin/g++
endif
STRIP=/usr/bin/strip -x
endif
ifeq ($(TARGET),$(HOST_LINUX))
# -lrt is for clock_gettime() - see its man page
PLATFORM_FLAGS += -DLINUX
endif
ifeq ($(TARGET),$(HOST_CYGWIN))
PLATFORM_FLAGS += -DCYGWIN
endif
ifeq ($(TARGET),$(HOST_FREEBSD))
PLATFORM_FLAGS += -DFREEBSD
endif
ifeq ($(TARGET),$(TARGET_ANDROID))
PLATFORM_FLAGS += -DLINUX
PLATFORM_FLAGS += -DANDROID
endif