-
Notifications
You must be signed in to change notification settings - Fork 46
/
system.mak
86 lines (79 loc) · 2.41 KB
/
system.mak
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# -----------------------------------------------
# Detect NMAKE version deducing old MSVC versions
# -----------------------------------------------
!IFNDEF _NMAKE_VER
! MESSAGE Macro _NMAKE_VER not defined.
! MESSAGE Use MSVC's NMAKE to process this makefile.
! ERROR See previous message.
!ENDIF
!IF "$(_NMAKE_VER)" == "6.00.8168.0"
CC_VERS_NUM = 60
!ELSEIF "$(_NMAKE_VER)" == "6.00.9782.0"
CC_VERS_NUM = 60
!ELSEIF "$(_NMAKE_VER)" == "7.00.8882"
CC_VERS_NUM = 70
!ELSEIF "$(_NMAKE_VER)" == "7.00.9466"
CC_VERS_NUM = 70
!ELSEIF "$(_NMAKE_VER)" == "7.00.9955"
CC_VERS_NUM = 70
!ELSEIF "$(_NMAKE_VER)" == "14.13.26132.0"
CC_VERS_NUM = 140
!ELSE
# Pick an arbitrary bigger number for all later versions
CC_VERS_NUM = 199
!ENDIF
!IF "$(PLATFORM)"=="x64" || "$(TARGET_CPU)"=="x64" || "$(VSCMD_ARG_HOST_ARCH)"=="x64"
BITS = 64
CFLAGS = $(CFLAGS) -DWIN64 -D_WIN64 -I$(INCD)
!IF "$(CC)" == "cl"
CFLAGS = $(CFLAGS)
!ENDIF
!ELSEIF "$(PLATFORM)"=="x86"
BITS = 32
CFLAGS = $(CFLAGS) -arch:SSE2 -DWIN32 -I$(INCD)
!ELSE
!ERROR Unknown target processor: $(PLATFORM)
!ENDIF
!IF "$(CC)" == "cl"
LT = -ltcg
AR = lib -nologo
LD = link -nologo
CFLAGS = $(CFLAGS) -nologo -GL -Gw -guard:cf
MAVX2 =
!IF "$(BITS)" == "64"
CFLAGS = $(CFLAGS) -favor:blend
!ENDIF
USE_CL = 1
!ELSEIF "$(CC)" == "clang-cl"
LT =
AR = llvm-lib -nologo -llvmlibthin
LD = lld-link -nologo
CXX = clang-cl
CFLAGS = -nologo -Gw -flto=thin -guard:cf $(CFLAGS) -Wno-unused-variable -Wno-unused-function -Wno-parentheses-equality \
-Wno-incompatible-pointer-types -Wno-deprecated-declarations -Wno-unused-value -Wno-empty-body -Wno-unused-but-set-variable
MAVX2 = -mavx2
!IF "$(BITS)" == "32"
CFLAGS = --target=i686-pc-windows-msvc $(CFLAGS)
!ENDIF
USE_CLANG = 1
!ELSE
!ERROR Unknown compiler
!ENDIF
LDFLAGS = -debug -incremental:no -guard:cf -opt:ref,icf $(LT)
DLLFLAGS = -debug -incremental:no -guard:cf -opt:ref,icf $(LT) -dll
!IF "$(BITS)" == "32"
LDFLAGS = $(LDFLAGS) -largeaddressaware
DLLFLAGS = $(DLLFLAGS) -largeaddressaware
!ENDIF
RFLAGS = -nologo -D "_UNICODE" -D "UNICODE"
XPCFLAGS = -D "_USING_V110_SDK71_"
XPLFALGS = -subsystem:console,5.01
RELEASE = -D "NDEBUG" -O2 -MD
DEBUG_L = -D "DEBUG" -D "_DEBUG" -D "APP_DEBUG=1" -Od -MD
HIDE = -subsystem:windows,6.01
NO_HIDE = -subsystem:console
##############################################################################
##
INCD = $(ROOT)\src
BIND = $(ROOT)\Release
OBJD = $(ROOT)\.dep