blob: d1f23d57585e878b3f4dbe78573c8d6bb0e3c721 [file] [log] [blame]
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +00001# Copyright (C) 2011 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14{
epoger@google.com5351b372011-07-01 17:16:26 +000015 'target_defaults': {
16
17 # Define variables, and allow for override in GYP_DEFINES environment var.
18 'variables': {
19 'skia_scalar%': 'float',
20 },
21 'skia_scalar%': '<(skia_scalar)',
22
23 'configurations': {
24 'Debug': {
25 'defines': [
26 'SK_DEBUG',
27 'GR_DEBUG=1',
28 ],
29 },
30 'Release': {
31 'defines': [
32 'SK_RELEASE',
33 'GR_RELEASE=1',
34 ],
35 },
36 },
37
38 'conditions' : [
39
40 [ 'skia_scalar == "float"',
41 {
42 'defines': [
43 'SK_SCALAR_IS_FLOAT',
44 'SK_CAN_USE_FLOAT',
45 ],
46 }, { # else, skia_scalar != "float"
47 'defines': [
48 'SK_SCALAR_IS_FIXED',
49 'SK_CAN_USE_FLOAT', # we can still use floats along the way
50 ],
51 }
52 ],
53
54 ['OS == "win"',
55 {
56 'defines': [
57 'SK_BUILD_FOR_WIN32',
58 'SK_IGNORE_STDINT_DOT_H',
59 ],
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +000060 'msvs_cygwin_shell': 0,
61 'msvs_settings': {
62 'VCCLCompilerTool': {
63 'WarningLevel': '1',
64 'WarnAsError': 'false',
65 'DebugInformationFormat': '3',
66 'AdditionalOptions': '/MP',
67 },
epoger@google.com5351b372011-07-01 17:16:26 +000068 'VCLinkerTool': {
69 'AdditionalDependencies': [
70 'OpenGL32.lib',
71 'usp10.lib',
72 ],
73 },
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +000074 },
75 'configurations': {
76 'Debug': {
77 'msvs_settings': {
78 'VCCLCompilerTool': {
79 'Optimization': '0', # 0 = /Od
80 'PreprocessorDefinitions': ['_DEBUG'],
81 'RuntimeLibrary': '3', # 3 = /MDd (debug DLL)
82 },
83 'VCLinkerTool': {
84 'GenerateDebugInformation': 'true',
85 },
86 },
87 },
88 'Release': {
89 'msvs_settings': {
90 'VCCLCompilerTool': {
91 'Optimization': '2', # 2 = /Os
92 'PreprocessorDefinitions': ['NDEBUG'],
93 'RuntimeLibrary': '2', # 2 = /MD (nondebug DLL)
94 },
95 'VCLinkerTool': {
96 'GenerateDebugInformation': 'false',
97 },
98 },
99 },
100 },
101 },
epoger@google.com5351b372011-07-01 17:16:26 +0000102 ],
103
104 ['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"',
105 {
106 'defines': [
107 'SK_SAMPLES_FOR_X',
108 'SK_BUILD_FOR_UNIX',
109 ],
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +0000110 'configurations': {
111 'Debug': {
112 'cflags': ['-g']
113 },
114 'Release': {
115 'cflags': ['-O2']
116 },
117 },
epoger@google.com5351b372011-07-01 17:16:26 +0000118 'cflags': [ '-Wall', '-Wextra', '-Wno-unused' ],
119 'include_dirs' : [
120 '/usr/include/freetype2',
121 ],
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +0000122 },
epoger@google.com5351b372011-07-01 17:16:26 +0000123 ],
124
125 ['OS == "mac"',
126 {
127 'defines': [
128 'SK_BUILD_FOR_MAC',
129 ],
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +0000130 'configurations': {
131 'Debug': {
132 'cflags': ['-g']
133 },
134 'Release': {
135 'cflags': ['-O2']
136 },
137 },
epoger@google.com5351b372011-07-01 17:16:26 +0000138 'xcode_settings': {
139 'SYMROOT': '<(DEPTH)/xcodebuild',
140 },
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +0000141 },
epoger@google.com5351b372011-07-01 17:16:26 +0000142 ],
143
144 ], # end 'conditions'
145 }, # end 'target_defaults'
senorblanco@chromium.orgafac8882011-04-11 15:59:47 +0000146}
147# Local Variables:
148# tab-width:2
149# indent-tabs-mode:nil
150# End:
151# vim: set expandtab tabstop=2 shiftwidth=2: