# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'gcc_cflags': [ '-ggdb', '-W', '-Wall', '-Werror', '-Wno-unused-parameter', '-fPIE', '-fstack-protector', ], 'gcc_ldflags': [ '-ggdb', '-fpie', '-Wl,-z,relro', '-Wl,-z,now', ], }, 'includes': [ 'ots-common.gypi', ], 'target_defaults': { 'conditions': [ ['OS=="linux"', { 'cflags': [ '<@(gcc_cflags)', ], 'ldflags': [ '<@(gcc_ldflags)', ], 'defines': [ '_FORTIFY_SOURCE=2', ], 'link_settings': { 'libraries': ['-lz'], }, }], ['OS=="mac"', { 'xcode_settings': { 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden 'OTHER_CFLAGS': [ '<@(gcc_cflags)', ], }, 'link_settings': { 'libraries': [ '/System/Library/Frameworks/ApplicationServices.framework', '/usr/lib/libz.dylib' ], }, }], ['OS=="win"', { 'link_settings': { 'libraries': [ '-lzdll.lib', ], }, 'msvs_settings': { 'VCLinkerTool': { 'AdditionalLibraryDirectories': ['third_party/zlib'], 'DelayLoadDLLs': ['zlib1.dll'], }, }, 'include_dirs': [ 'third_party/zlib' ], 'defines': [ 'NOMINMAX', # To suppress max/min macro definition. 'WIN32', ], }], ], }, 'targets': [ { 'target_name': 'ots', 'type': 'static_library', 'sources': [ '<@(ots_sources)', ], 'defines': [ 'OTS_DEBUG', ], 'dependencies': [ 'third_party/lzma_sdk/lzma_sdk.gyp:ots_lzma_sdk', ], 'include_dirs': [ '<@(ots_include_dirs)', ], 'direct_dependent_settings': { 'include_dirs': [ '<@(ots_include_dirs)', ], }, }, { 'target_name': 'freetype2', 'type': 'none', 'conditions': [ ['OS=="linux"', { 'direct_dependent_settings': { 'cflags': [ '