blob: 766a04f758f7958e92e11297f22584d870a1f8da [file] [log] [blame]
seanpaul@google.com1134f982011-09-15 14:24:33 +00001# conditions used in both common.gypi and skia.gyp in chromium
2#
3{
4 'conditions' : [
5
6 ['skia_os == "win"',
7 {
8 'defines': [
9 'SK_BUILD_FOR_WIN32',
10 'SK_IGNORE_STDINT_DOT_H',
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000011 '_CRT_SECURE_NO_WARNINGS',
seanpaul@google.com1134f982011-09-15 14:24:33 +000012 ],
13 'msvs_cygwin_shell': 0,
14 'msvs_settings': {
15 'VCCLCompilerTool': {
16 'WarningLevel': '1',
17 'WarnAsError': 'false',
18 'DebugInformationFormat': '3',
seanpaul@google.com8f78fec2011-09-16 15:47:33 +000019 'AdditionalOptions': [ '/MP' ],
seanpaul@google.com1134f982011-09-15 14:24:33 +000020 },
21 'VCLinkerTool': {
22 'AdditionalDependencies': [
23 'OpenGL32.lib',
24 'usp10.lib',
25 ],
26 },
27 },
28 'configurations': {
29 'Debug': {
30 'msvs_settings': {
31 'VCCLCompilerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000032 'DebugInformationFormat': '4', # editAndContiue (/ZI)
bungeman@google.com7deaa3b2011-10-03 20:15:13 +000033 'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
seanpaul@google.com1134f982011-09-15 14:24:33 +000034 'Optimization': '0', # optimizeDisabled (/Od)
35 'PreprocessorDefinitions': ['_DEBUG'],
36 'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd)
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000037 'ExceptionHandling': '0',
38 'RuntimeTypeInfo': 'false', # /GR-
39 'WarningLevel': '3', # level3 (/W3)
seanpaul@google.com1134f982011-09-15 14:24:33 +000040 },
41 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000042 'GenerateDebugInformation': 'true', # /DEBUG
43 'LinkIncremental': '2', # /INCREMENTAL
seanpaul@google.com1134f982011-09-15 14:24:33 +000044 },
45 },
46 },
47 'Release': {
48 'msvs_settings': {
49 'VCCLCompilerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000050 'DebugInformationFormat': '3', # programDatabase (/Zi)
bungeman@google.com7deaa3b2011-10-03 20:15:13 +000051 'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000052 'Optimization': '3', # full (/Ox)
53 'WholeProgramOptimization': 'true', #/GL
54 # Changing the floating point model requires rebaseling gm images
55 #'FloatingPointModel': '2', # fast (/fp:fast)
56 'FavorSizeOrSpeed': '1', # speed (/Ot)
seanpaul@google.com1134f982011-09-15 14:24:33 +000057 'PreprocessorDefinitions': ['NDEBUG'],
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000058 'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD)
59 'ExceptionHandling': '0',
60 'RuntimeTypeInfo': 'false', # /GR-
61 'WarningLevel': '3', # level3 (/W3)
seanpaul@google.com1134f982011-09-15 14:24:33 +000062 },
63 'VCLinkerTool': {
bsalomon@google.com8b5abec2011-09-28 14:32:01 +000064 'GenerateDebugInformation': 'true', # /DEBUG
65 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG
seanpaul@google.com1134f982011-09-15 14:24:33 +000066 },
bungeman@google.com983297e2011-10-03 19:36:51 +000067 'VCLibrarianTool': {
68 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG
69 },
seanpaul@google.com1134f982011-09-15 14:24:33 +000070 },
71 },
72 },
73 },
74 ],
75
76 ['skia_os in ["linux", "freebsd", "openbsd", "solaris"]',
77 {
78 'defines': [
79 'SK_SAMPLES_FOR_X',
80 'SK_BUILD_FOR_UNIX',
81 ],
82 'configurations': {
83 'Debug': {
84 'cflags': ['-g']
85 },
86 'Release': {
87 'cflags': ['-O2']
88 },
89 },
90 'cflags': [ '-Wall', '-Wextra', '-Wno-unused' ],
91 'include_dirs' : [
92 '/usr/include/freetype2',
93 ],
94 },
95 ],
96
97 ['skia_os == "mac"',
98 {
99 'defines': [
100 'SK_BUILD_FOR_MAC',
101 ],
102 'configurations': {
103 'Debug': {
104 'xcode_settings': {
105 'GCC_OPTIMIZATION_LEVEL': '0',
106 },
107 },
reed@google.come05cc8e2011-10-10 14:19:40 +0000108 'Release': {
109 'xcode_settings': {
110 'GCC_OPTIMIZATION_LEVEL': '3',
111 },
112 },
seanpaul@google.com1134f982011-09-15 14:24:33 +0000113 },
114 'xcode_settings': {
115 'SYMROOT': '<(DEPTH)/xcodebuild',
bsalomon@google.com4d5cb452011-10-12 18:12:11 +0000116 'SDKROOT': 'macosx10.6',
seanpaul@google.com1134f982011-09-15 14:24:33 +0000117 },
118 },
119 ],
120
121 ['skia_os == "ios"',
122 {
123 'defines': [
124 'SK_BUILD_FOR_IOS',
125 ],
126 'configurations': {
127 'Debug': {
128 'xcode_settings': {
129 'GCC_OPTIMIZATION_LEVEL': '0',
130 },
131 },
132 },
133 'xcode_settings': {
134 'SYMROOT': '<(DEPTH)/xcodebuild',
135 },
136 },
137 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000138
139 ['skia_os == "android"',
140 {
141 'defines': [
142 'ANDROID', # TODO: change these defines to SK_BUILD_FOR_ANDROID
143 'SK_BUILD_FOR_ANDROID',
144 'SK_BUILD_FOR_ANDROID_NDK',
145 ],
146 'configurations': {
147 'Debug': {
148 'cflags': ['-g']
149 },
150 'Release': {
151 'cflags': ['-O2']
152 },
153 },
154 'libraries': [
155 '-lstdc++',
156 '-lm',
157
158 ],
159 'conditions': [
djsollen@google.com3839ca12011-11-03 17:31:41 +0000160 [ 'skia_target_arch == "arm" and arm_thumb == 1', {
161 'cflags': [
162 '-mthumb',
163 ],
164 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000165 [ 'skia_target_arch == "arm" and armv7 == 1', {
166 'defines': [
167 '__ARM_ARCH__=7',
168 ],
169 'cflags': [
170 '-march=armv7-a',
171 ],
172 'conditions': [
173 [ 'arm_neon == 1', {
174 'defines': [
175 '__ARM_HAVE_NEON',
176 ],
177 'cflags': [
178 '-mfloat-abi=softfp',
179 '-mfpu=neon',
180 ],
181 }],
182 ],
183 }],
184 ],
185 },
186 ],
seanpaul@google.com1134f982011-09-15 14:24:33 +0000187
188 ], # end 'conditions'
189}
190
191# Local Variables:
192# tab-width:2
193# indent-tabs-mode:nil
194# End:
195# vim: set expandtab tabstop=2 shiftwidth=2: