forked from gildor2/UEViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.project
137 lines (107 loc) · 3.99 KB
/
common.project
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# perl highlighting
LIBC = shared
#MAPFILES = 1
CONSOLE = 1
OPTIMIZE = size
PDB = 2 # keep enabled, executable is almost the same, except embedded link to pdb file
OLDCRT = 1
#------------------------------------------------
# Compiler-specific options
#------------------------------------------------
WARNINGS = # warnings for our source code (i.e. excluding thirs-parties), empty by default
!if "$COMPILER" eq "VisualC"
CPP_EXCEPT = 0 # used with WIN32_USE_SEH in Core.h
OPTIONS = -GS- -GR- #?? VC8+
# -Wp64 enables 64-bit portability warnings. Note: this option is deprecated, it will display a command line warning.
# More information here:
# https://connect.microsoft.com/VisualStudio/feedback/details/806763/warnings-c4311-and-c4312-require-wp64-which-is-documented-as-deprecated
# http:https://blogs.msdn.com/b/vcblog/archive/2014/06/13/compiler-switch-deprecation-removal-changes-in-visual-studio-14.aspx
# OPTIONS += -Wp64 # 64-bit portability warnings; note: deprecated option, will display a command line warning
# OPTIONS += -FS # VS2013+, required for parallel build to work (jom.exe)
# WARNINGS += -W4 # maximal warning level for Visual C++
DEFINES += _USING_V110_SDK71_ # avoid some warnings, perhaps affects something else
# see http:https://tedwvc.wordpress.com/2014/01/01/how-to-target-xp-with-vc2012-or-vc2013-and-continue-to-use-the-windows-8-x-sdk/
# it looks like VS2013 requires _USING_V120_SDK71_
!if "$OLDCRT" eq "1"
DEFINES += OLDCRT
WDKCRT = $R/../Libs/msvcrt
!include $WDKCRT/msvcrt.project
!endif
!endif
!if "$COMPILER" eq "GnuC"
# linux/cygwin + GCC
STDLIBS = stdc++ m GL # libm for math.h functions
!if "$PLATFORM" ne "cygwin"
STDLIBS += dl # dlopen() and friends
!endif
LIBC = shared
OPTIONS = -msse2 # enable SSE instructions
OPTIONS += -std=c++0x # allow C++11 features
OPTIONS += -fno-strict-aliasing # required for our uint_cast()-based FP hacks
OPTIONS += -fno-stack-protector # this will remove GLIBC_2.4 dependency
OPTIONS += {
# disable some warnings
-Wno-invalid-offsetof #?? this flag is for C++ only, not for C
}
!endif
# GCC debug build
!if ("$COMPILER" eq "GnuC") && 0
#!! should disable "-s" option from linker command
OPTIONS += -g3 -fno-omit-frame-pointer -funwind-tables -fstack-protector -fno-optimize-sibling-calls
LINKFLAGS += -rdynamic
!endif
#OPTIONS += -analyze
#------------------------------------------------
# Third-party libraries
#------------------------------------------------
LIBINCLUDES = $R/libs/include
OBJDIR = $R/obj/libs-$PLATFORM
push(INCLUDES)
INCLUDES = $R/libs/nvtt
LIBINCLUDES += $R/libs/nvtt
sources(NV_LIBS) = {
# $R/libs/nvtt/nvcore/*.cpp
$R/libs/nvtt/nvimage/*.cpp
# $R/libs/nvtt/nvmath/*.cpp
# $R/libs/nvtt/nvtt/bc6h/*.cpp
# $R/libs/nvtt/nvtt/bc7/*.cpp
}
pop(INCLUDES)
# defines for smaller zlib
push(DEFINES)
push(INCLUDES)
DEFINES = DYNAMIC_CRC_TABLE BUILDFIXED NO_GZIP
INCLUDES = $R/libs/include
sources(UE3_LIBS) = {
# ... lzo for compressed UE3 packages
$R/libs/lzo/lzo_init.c
$R/libs/lzo/lzo1x_d2.c
# ... zlib for compressed UE3 packages
$R/libs/zlib/*.c
# ... lzx for compresses XBox360 UE3 packages
$R/libs/mspack/lzxd.c
}
pop(INCLUDES)
pop(DEFINES)
sources(IOS_LIBS) = {
$R/libs/PowerVR/*.cpp
}
LIBINCLUDES += $R/libs/PowerVR
LIBINCLUDES += $R/libs/detex
sources(UE3_LIBS) = {
$R/libs/detex/*.cpp
}
#------------------------------------------------
# Project-specific options
#------------------------------------------------
OBJDIR = $R/obj/$PRJ-$PLATFORM
STDLIBS += SDL2 SDL2main
INCLUDES += . $R/Core $R/Unreal $LIBINCLUDES
OPTIONS += $WARNINGS
!if "$PLATFORM" eq "win32"
INCLUDES += $R/libs/includewin32
LIBRARIES = $R/libs/SDL2/x86
!elif "$PLATFORM" eq "win64"
INCLUDES += $R/libs/includewin32
LIBRARIES = $R/libs/SDL2/x64
!endif