bashi@chromium.org | c2a9375 | 2012-05-02 00:18:22 +0000 | [diff] [blame] | 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
bashi@chromium.org | 54651a6 | 2011-02-18 09:05:42 +0000 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | { |
bashi@chromium.org | c1350f1 | 2011-02-25 08:33:29 +0000 | [diff] [blame] | 6 | 'conditions': [ |
| 7 | ['OS=="win"', { |
| 8 | 'target_defaults': { |
| 9 | 'defines': [ |
| 10 | 'NOMINMAX', # To suppress max/min macro definition. |
| 11 | 'WIN32', |
| 12 | ], |
| 13 | }, |
| 14 | }], |
| 15 | ], |
bashi@chromium.org | 54651a6 | 2011-02-18 09:05:42 +0000 | [diff] [blame] | 16 | 'variables': { |
| 17 | 'gcc_cflags': [ |
| 18 | '-ggdb', |
| 19 | '-W', |
| 20 | '-Wall', |
bashi@chromium.org | 8d71e04 | 2012-05-07 08:45:16 +0000 | [diff] [blame] | 21 | '-Werror', |
bashi@chromium.org | 54651a6 | 2011-02-18 09:05:42 +0000 | [diff] [blame] | 22 | '-Wno-unused-parameter', |
bashi@chromium.org | 54651a6 | 2011-02-18 09:05:42 +0000 | [diff] [blame] | 23 | '-fPIE', |
| 24 | '-fstack-protector', |
| 25 | ], |
| 26 | 'gcc_ldflags': [ |
| 27 | '-ggdb', |
| 28 | '-fpie', |
| 29 | '-Wl,-z,relro', |
| 30 | '-Wl,-z,now', |
| 31 | ], |
| 32 | }, |
| 33 | 'includes': [ |
| 34 | 'ots-common.gypi', |
| 35 | ], |
| 36 | 'target_defaults': { |
bashi@chromium.org | 54651a6 | 2011-02-18 09:05:42 +0000 | [diff] [blame] | 37 | 'conditions': [ |
| 38 | ['OS=="linux"', { |
| 39 | 'cflags': [ |
| 40 | '<@(gcc_cflags)', |
| 41 | ], |
| 42 | 'ldflags': [ |
| 43 | '<@(gcc_ldflags)', |
| 44 | ], |
| 45 | 'defines': [ |
| 46 | '_FORTIFY_SOURCE=2', |
| 47 | ], |
| 48 | 'link_settings': { |
| 49 | 'libraries': ['-lz'], |
| 50 | }, |
| 51 | }], |
| 52 | ['OS=="mac"', { |
| 53 | 'xcode_settings': { |
| 54 | 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 55 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 56 | 'OTHER_CFLAGS': [ |
| 57 | '<@(gcc_cflags)', |
| 58 | ], |
| 59 | }, |
| 60 | 'link_settings': { |
| 61 | 'libraries': [ |
| 62 | '/System/Library/Frameworks/ApplicationServices.framework', |
| 63 | '/usr/lib/libz.dylib' |
| 64 | ], |
| 65 | }, |
| 66 | }], |
| 67 | ['OS=="win"', { |
| 68 | 'link_settings': { |
| 69 | 'libraries': [ |
| 70 | '-lzdll.lib', |
bashi@chromium.org | 54651a6 | 2011-02-18 09:05:42 +0000 | [diff] [blame] | 71 | ], |
| 72 | }, |
| 73 | 'msvs_settings': { |
| 74 | 'VCLinkerTool': { |
| 75 | 'DelayLoadDLLs': ['zlib1.dll'], |
| 76 | }, |
| 77 | }, |
| 78 | }], |
| 79 | ], |
| 80 | }, |
| 81 | 'targets': [ |
| 82 | { |
| 83 | 'target_name': 'ots', |
| 84 | 'type': 'static_library', |
| 85 | 'sources': [ |
| 86 | '<@(ots_sources)', |
| 87 | ], |
bashi@chromium.org | c2a9375 | 2012-05-02 00:18:22 +0000 | [diff] [blame] | 88 | 'dependencies': [ |
| 89 | 'third_party/lzma_sdk/lzma_sdk.gyp:ots_lzma_sdk', |
| 90 | ], |
bashi@chromium.org | 54651a6 | 2011-02-18 09:05:42 +0000 | [diff] [blame] | 91 | 'include_dirs': [ |
| 92 | '<@(ots_include_dirs)', |
| 93 | ], |
| 94 | 'direct_dependent_settings': { |
| 95 | 'include_dirs': [ |
| 96 | '<@(ots_include_dirs)', |
| 97 | ], |
| 98 | }, |
| 99 | }, |
| 100 | { |
bashi@chromium.org | 8d71e04 | 2012-05-07 08:45:16 +0000 | [diff] [blame] | 101 | 'target_name': 'freetype2', |
| 102 | 'type': 'none', |
| 103 | 'conditions': [ |
| 104 | ['OS=="linux"', { |
| 105 | 'direct_dependent_settings': { |
| 106 | 'cflags': [ |
| 107 | '<!(pkg-config freetype2 --cflags)', |
| 108 | ], |
| 109 | 'ldflags': [ |
| 110 | '<!(pkg-config freetype2 --libs)', |
| 111 | ], |
| 112 | }, |
| 113 | }], |
| 114 | ], |
| 115 | }, |
| 116 | { |
bashi@chromium.org | 54651a6 | 2011-02-18 09:05:42 +0000 | [diff] [blame] | 117 | 'target_name': 'idempotent', |
| 118 | 'type': 'executable', |
| 119 | 'sources': [ |
| 120 | 'test/idempotent.cc', |
| 121 | ], |
| 122 | 'dependencies': [ |
| 123 | 'ots', |
| 124 | ], |
| 125 | 'conditions': [ |
| 126 | ['OS=="linux"', { |
| 127 | 'cflags': [ |
| 128 | '<!(pkg-config freetype2 --cflags)', |
| 129 | ], |
| 130 | 'ldflags': [ |
| 131 | '<!(pkg-config freetype2 --libs)', |
| 132 | ], |
| 133 | }], |
| 134 | ], |
| 135 | }, |
bashi@chromium.org | 8d71e04 | 2012-05-07 08:45:16 +0000 | [diff] [blame] | 136 | { |
| 137 | 'target_name': 'ot-sanitise', |
| 138 | 'type': 'executable', |
| 139 | 'sources': [ |
| 140 | 'test/ot-sanitise.cc', |
| 141 | 'test/file-stream.h', |
| 142 | ], |
| 143 | 'dependencies': [ |
| 144 | 'ots', |
| 145 | ], |
| 146 | }, |
| 147 | ], |
| 148 | 'conditions': [ |
| 149 | ['OS=="linux" or OS=="mac"', { |
| 150 | 'targets': [ |
| 151 | { |
| 152 | 'target_name': 'validator_checker', |
| 153 | 'type': 'executable', |
| 154 | 'sources': [ |
| 155 | 'test/validator-checker.cc', |
| 156 | ], |
| 157 | 'dependencies': [ |
| 158 | 'ots', |
| 159 | ], |
| 160 | 'conditions': [ |
| 161 | ['OS=="linux"', { |
| 162 | 'dependencies': [ |
| 163 | 'freetype2', |
| 164 | ] |
| 165 | }], |
| 166 | ], |
| 167 | }, |
| 168 | { |
| 169 | 'target_name': 'perf', |
| 170 | 'type': 'executable', |
| 171 | 'sources': [ |
| 172 | 'test/perf.cc', |
| 173 | ], |
| 174 | 'dependencies': [ |
| 175 | 'ots', |
| 176 | ], |
| 177 | }, |
| 178 | ], |
| 179 | }], |
| 180 | ['OS=="linux"', { |
| 181 | 'targets': [ |
| 182 | { |
| 183 | 'target_name': 'side_by_side', |
| 184 | 'type': 'executable', |
| 185 | 'sources': [ |
| 186 | 'test/side-by-side.cc', |
| 187 | ], |
| 188 | 'dependencies': [ |
| 189 | 'freetype2', |
| 190 | 'ots', |
| 191 | ], |
| 192 | }, |
| 193 | ], |
| 194 | }], |
bashi@chromium.org | 54651a6 | 2011-02-18 09:05:42 +0000 | [diff] [blame] | 195 | ], |
| 196 | } |