Skip to content

Commit

Permalink
Basic underpinnings of the gyp equivalent of the Linux SHARED=1 build:
Browse files Browse the repository at this point in the history
parameterize the 'type' setting of the various library targets, with a
default of 'static_library'.
(Hat tip to Craig Schlenter.)
Review URL: http://codereview.chromium.org/62127

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13345 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
sgk@google.com committed Apr 8, 2009
1 parent b2f9ff7 commit 0cde7e2
Show file tree
Hide file tree
Showing 30 changed files with 57 additions and 49 deletions.
6 changes: 3 additions & 3 deletions base/base.gyp
Expand Up @@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'base',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'../third_party/icu38/icu38.gyp:icui18n',
'../third_party/icu38/icu38.gyp:icuuc',
Expand Down Expand Up @@ -452,7 +452,7 @@
},
{
'target_name': 'base_gfx',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': 'A508ADD3-CECE-4E0F-8448-2F5E454DF551',
'sources': [
'gfx/gdi_util.cc',
Expand Down Expand Up @@ -646,7 +646,7 @@
},
{
'target_name': 'test_support_base',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'base',
'../testing/gtest.gyp:gtest',
Expand Down
8 changes: 8 additions & 0 deletions build/common.gypi
Expand Up @@ -31,6 +31,14 @@
# project file called "coverage".
# Currently ignored on Windows.
'coverage%': 0,

# To do a shared build on linux we need to be able to choose between type
# static_library and shared_library. We default to doing a static build
# but you can override this with "gyp -Dlibrary=shared_library" or you
# can add the following line (without the #) to ~/.gyp/include.gypi
# {'variables': {'library': 'shared_library'}}
# to compile as shared by default
'library%': 'static_library',
},
'target_defaults': {
'conditions': [
Expand Down
4 changes: 2 additions & 2 deletions build/temp_gyp/breakpad.gyp
Expand Up @@ -11,7 +11,7 @@
'targets': [
{
'target_name': 'breakpad_handler',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': 'B55CA863-B374-4BAF-95AC-539E4FA4C90C',
'sources': [
'../../breakpad/src/client/windows/crash_generation/client_info.cc',
Expand Down Expand Up @@ -45,7 +45,7 @@
},
{
'target_name': 'breakpad_sender',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': '9946A048-043B-4F8F-9E07-9297B204714C',
'sources': [
'../../breakpad/src/client/windows/sender/crash_report_sender.cc',
Expand Down
2 changes: 1 addition & 1 deletion build/temp_gyp/googleurl.gyp
Expand Up @@ -13,7 +13,7 @@
'targets': [
{
'target_name': 'googleurl',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': 'EF5E94AB-B646-4E5B-A058-52EF07B8351C',
'dependencies': [
'../../base/base.gyp:base',
Expand Down
8 changes: 4 additions & 4 deletions build/temp_gyp/v8.gyp
Expand Up @@ -368,7 +368,7 @@
# Targets to build v8 for the native architecture (ia32).
{
'target_name': 'v8_base',
'type': 'static_library',
'type': '<(library)',
'include_dirs': [
'../../v8/src',
],
Expand Down Expand Up @@ -422,7 +422,7 @@
},
{
'target_name': 'v8_nosnapshot',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'js2c',
'v8_base',
Expand Down Expand Up @@ -451,7 +451,7 @@
},
{
'target_name': 'v8',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'js2c',
'mksnapshot',
Expand Down Expand Up @@ -546,7 +546,7 @@
# (src/simulator-arm.cc). The ARM targets are not snapshot-enabled.
{
'target_name': 'v8_arm',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'js2c',
],
Expand Down
18 changes: 9 additions & 9 deletions chrome/chrome.gyp
Expand Up @@ -77,7 +77,7 @@
},
{
'target_name': 'common',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'resources',
'../base/base.gyp:base',
Expand Down Expand Up @@ -357,7 +357,7 @@
},
{
'target_name': 'browser',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'common',
'resources',
Expand Down Expand Up @@ -1382,7 +1382,7 @@
},
{
'target_name': 'renderer',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'common',
'resources',
Expand Down Expand Up @@ -1736,7 +1736,7 @@
# This target contains mocks and test utilities that don't belong in
# production libraries but are used by more than one test executable.
'target_name': 'test_support_common',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'browser',
'common',
Expand Down Expand Up @@ -1799,7 +1799,7 @@
},
{
'target_name': 'test_support_ui',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'test_support_common',
'resources',
Expand Down Expand Up @@ -1834,7 +1834,7 @@
},
{
'target_name': 'test_support_unit',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'test_support_common',
'resources',
Expand Down Expand Up @@ -2468,7 +2468,7 @@
{ 'targets': [
{
'target_name': 'views',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'common',
'resources',
Expand Down Expand Up @@ -2736,7 +2736,7 @@
{ 'targets': [
{
'target_name': 'plugin',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'common',
'resources',
Expand Down Expand Up @@ -2792,7 +2792,7 @@
},
{
'target_name': 'worker',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'../base/base.gyp:base',
'../webkit/webkit.gyp:webkit',
Expand Down
2 changes: 1 addition & 1 deletion chrome/installer/util/util.gyp
Expand Up @@ -5,7 +5,7 @@
'targets': [
{
'target_name': 'installer_util',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'prebuild/util_prebuild.gyp:installer_util_prebuild',
'../../chrome.gyp:common',
Expand Down
2 changes: 1 addition & 1 deletion chrome/third_party/hunspell/hunspell.gyp
Expand Up @@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'hunspell',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'../../../base/base.gyp:base',
'../../../third_party/icu38/icu38.gyp:icuuc',
Expand Down
2 changes: 1 addition & 1 deletion google_update/google_update.gyp
Expand Up @@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'google_update',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': '4052059A-D72B-4183-B5C2-9D1B099E9E35',
'sources': [
'google_update_idl.idl',
Expand Down
2 changes: 1 addition & 1 deletion media/media.gyp
Expand Up @@ -19,7 +19,7 @@
'targets': [
{
'target_name': 'media',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'../base/base.gyp:base',
'../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
Expand Down
4 changes: 2 additions & 2 deletions net/net.gyp
Expand Up @@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'net',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'../base/base.gyp:base',
'../build/temp_gyp/googleurl.gyp:googleurl',
Expand Down Expand Up @@ -537,7 +537,7 @@
},
{
'target_name': 'net_test_support',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'net',
'../base/base.gyp:base',
Expand Down
2 changes: 1 addition & 1 deletion printing/printing.gyp
Expand Up @@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'printing',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'../base/base.gyp:base',
],
Expand Down
2 changes: 1 addition & 1 deletion sandbox/sandbox.gyp
Expand Up @@ -11,7 +11,7 @@
'targets': [
{
'target_name': 'sandbox',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'../testing/gtest.gyp:gtest',
'../base/base.gyp:base',
Expand Down
2 changes: 1 addition & 1 deletion sdch/sdch.gyp
Expand Up @@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'sdch',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': 'F54ABC59-5C00-414A-A9BA-BAF26D1699F0',
'sources': [
'open-vcdiff/src/addrcache.cc',
Expand Down
2 changes: 1 addition & 1 deletion skia/skia.gyp
Expand Up @@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'skia',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': 'CD9CA56E-4E94-444C-87D4-58CA1E6F300D',
'sources': [
'precompiled.cc',
Expand Down
2 changes: 1 addition & 1 deletion testing/gtest.gyp
Expand Up @@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'gtest',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': 'BFE8E2A7-3B3B-43B0-A994-3058B852DB8B',
'sources': [
'gtest/include/gtest/internal/gtest-death-test-internal.h',
Expand Down
2 changes: 1 addition & 1 deletion third_party/bzip2/bzip2.gyp
Expand Up @@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'bzip2',
'type': 'static_library',
'type': '<(library)',
'defines': ['BZ_NO_STDIO'],
'msvs_guid': '2A70CBF0-847E-4E3A-B926-542A656DC7FE',
'sources': [
Expand Down
4 changes: 2 additions & 2 deletions third_party/harfbuzz/harfbuzz.gyp
Expand Up @@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'harfbuzz',
'type': 'static_library',
'type': '<(library)',
'sources': [
'src/harfbuzz-buffer.c',
'src/harfbuzz-stream.c',
Expand Down Expand Up @@ -46,7 +46,7 @@
},
{
'target_name': 'harfbuzz_interface',
'type': 'static_library',
'type': '<(library)',
'sources': [
'contrib/harfbuzz-freetype.c',
'contrib/harfbuzz-unicode.c',
Expand Down
2 changes: 1 addition & 1 deletion third_party/libevent/libevent.gyp
Expand Up @@ -13,7 +13,7 @@
{
'target_name': 'libevent',
'product_name': 'event',
'type': 'static_library',
'type': '<(library)',
'sources': [
'buffer.c',
'evbuffer.c',
Expand Down
2 changes: 1 addition & 1 deletion third_party/libjpeg/libjpeg.gyp
Expand Up @@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'libjpeg',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': '238CE175-76CE-4A25-A676-69D115885601',
'sources': [
'jcapimin.c',
Expand Down
2 changes: 1 addition & 1 deletion third_party/libpng/libpng.gyp
Expand Up @@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'libpng',
'type': 'static_library',
'type': '<(library)',
'dependencies': [
'../zlib/zlib.gyp:zlib',
],
Expand Down
2 changes: 1 addition & 1 deletion third_party/libxml/libxml.gyp
Expand Up @@ -31,7 +31,7 @@
],
},
}, { # else: OS != "linux" or ! use_system_libxml
'type': 'static_library',
'type': '<(library)',
'msvs_guid': 'F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7',
'sources': [
'include/libxml/c14n.h',
Expand Down
2 changes: 1 addition & 1 deletion third_party/libxslt/libxslt.gyp
Expand Up @@ -31,7 +31,7 @@
],
},
}, { # else: OS != "linux" or ! use_system_libxslt
'type': 'static_library',
'type': '<(library)',
'msvs_guid': 'FC0E1FD0-5DD7-4041-A1C9-CD3C376E4EED',
'sources': [
'libxslt/attributes.c',
Expand Down
2 changes: 1 addition & 1 deletion third_party/modp_b64/modp_b64.gyp
Expand Up @@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'modp_b64',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': '7100F41F-868D-4E99-80A2-AF8E6574749D',
'sources': [
'modp_b64.cc',
Expand Down
2 changes: 1 addition & 1 deletion third_party/sqlite/sqlite.gyp
Expand Up @@ -37,7 +37,7 @@
},
}, { # else: OS != "linux" or ! use_system_sqlite
'product_name': 'sqlite3',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': '6EAD4A4B-2BBC-4974-8E45-BB5C16CC2AC9',
'sources': [
# This list contains all .h, .c, and .cc files in the directories
Expand Down
2 changes: 1 addition & 1 deletion third_party/zlib/zlib.gyp
Expand Up @@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'zlib',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': '8423AF0D-4B88-4EBF-94E1-E4D00D00E21C',
'sources': [
'contrib/minizip/ioapi.c',
Expand Down
2 changes: 1 addition & 1 deletion webkit/activex_shim/activex_shim.gyp
Expand Up @@ -14,7 +14,7 @@
'targets': [
{
'target_name': 'activex_shim',
'type': 'static_library',
'type': '<(library)',
'msvs_guid': 'F4F4BCAA-EA59-445C-A119-3E6C29647A51',
'dependencies': [
'../../base/base.gyp:base',
Expand Down

0 comments on commit 0cde7e2

Please sign in to comment.