| senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 1 | # 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.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame^] | 15 | '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.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 60 | 'msvs_cygwin_shell': 0, |
| 61 | 'msvs_settings': { |
| 62 | 'VCCLCompilerTool': { |
| 63 | 'WarningLevel': '1', |
| 64 | 'WarnAsError': 'false', |
| 65 | 'DebugInformationFormat': '3', |
| 66 | 'AdditionalOptions': '/MP', |
| 67 | }, |
| epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame^] | 68 | 'VCLinkerTool': { |
| 69 | 'AdditionalDependencies': [ |
| 70 | 'OpenGL32.lib', |
| 71 | 'usp10.lib', |
| 72 | ], |
| 73 | }, |
| senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 74 | }, |
| 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.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame^] | 102 | ], |
| 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.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 110 | 'configurations': { |
| 111 | 'Debug': { |
| 112 | 'cflags': ['-g'] |
| 113 | }, |
| 114 | 'Release': { |
| 115 | 'cflags': ['-O2'] |
| 116 | }, |
| 117 | }, |
| epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame^] | 118 | 'cflags': [ '-Wall', '-Wextra', '-Wno-unused' ], |
| 119 | 'include_dirs' : [ |
| 120 | '/usr/include/freetype2', |
| 121 | ], |
| senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 122 | }, |
| epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame^] | 123 | ], |
| 124 | |
| 125 | ['OS == "mac"', |
| 126 | { |
| 127 | 'defines': [ |
| 128 | 'SK_BUILD_FOR_MAC', |
| 129 | ], |
| senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 130 | 'configurations': { |
| 131 | 'Debug': { |
| 132 | 'cflags': ['-g'] |
| 133 | }, |
| 134 | 'Release': { |
| 135 | 'cflags': ['-O2'] |
| 136 | }, |
| 137 | }, |
| epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame^] | 138 | 'xcode_settings': { |
| 139 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 140 | }, |
| senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 141 | }, |
| epoger@google.com | 5351b37 | 2011-07-01 17:16:26 +0000 | [diff] [blame^] | 142 | ], |
| 143 | |
| 144 | ], # end 'conditions' |
| 145 | }, # end 'target_defaults' |
| senorblanco@chromium.org | afac888 | 2011-04-11 15:59:47 +0000 | [diff] [blame] | 146 | } |
| 147 | # Local Variables: |
| 148 | # tab-width:2 |
| 149 | # indent-tabs-mode:nil |
| 150 | # End: |
| 151 | # vim: set expandtab tabstop=2 shiftwidth=2: |