summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-08 12:55:49 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-08 12:55:49 +0000
commit653bd5f03ef74274adbec816df10cdfd046b6eea (patch)
treec96f3829422d2fec66cb3a5bc00995bbba914110
parent74484851bb8f9f1954014a08c81305e74f9b0bda (diff)
downloadchromium_src-653bd5f03ef74274adbec816df10cdfd046b6eea.zip
chromium_src-653bd5f03ef74274adbec816df10cdfd046b6eea.tar.gz
chromium_src-653bd5f03ef74274adbec816df10cdfd046b6eea.tar.bz2
Basic underpinnings of the gyp equivalent of the Linux SHARED=1 build:
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
-rw-r--r--base/base.gyp6
-rw-r--r--build/common.gypi8
-rw-r--r--build/temp_gyp/breakpad.gyp4
-rw-r--r--build/temp_gyp/googleurl.gyp2
-rw-r--r--build/temp_gyp/v8.gyp8
-rw-r--r--chrome/chrome.gyp18
-rw-r--r--chrome/installer/util/util.gyp2
-rw-r--r--chrome/third_party/hunspell/hunspell.gyp2
-rw-r--r--google_update/google_update.gyp2
-rw-r--r--media/media.gyp2
-rw-r--r--net/net.gyp4
-rw-r--r--printing/printing.gyp2
-rw-r--r--sandbox/sandbox.gyp2
-rw-r--r--sdch/sdch.gyp2
-rw-r--r--skia/skia.gyp2
-rw-r--r--testing/gtest.gyp2
-rw-r--r--third_party/bzip2/bzip2.gyp2
-rw-r--r--third_party/harfbuzz/harfbuzz.gyp4
-rw-r--r--third_party/libevent/libevent.gyp2
-rw-r--r--third_party/libjpeg/libjpeg.gyp2
-rw-r--r--third_party/libpng/libpng.gyp2
-rw-r--r--third_party/libxml/libxml.gyp2
-rw-r--r--third_party/libxslt/libxslt.gyp2
-rw-r--r--third_party/modp_b64/modp_b64.gyp2
-rw-r--r--third_party/sqlite/sqlite.gyp2
-rw-r--r--third_party/zlib/zlib.gyp2
-rw-r--r--webkit/activex_shim/activex_shim.gyp2
-rw-r--r--webkit/default_plugin/default_plugin.gyp2
-rw-r--r--webkit/tools/test_shell/test_shell.gyp2
-rw-r--r--webkit/webkit.gyp10
30 files changed, 57 insertions, 49 deletions
diff --git a/base/base.gyp b/base/base.gyp
index 325ab65..8ebad3e 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -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',
@@ -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',
@@ -646,7 +646,7 @@
},
{
'target_name': 'test_support_base',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'base',
'../testing/gtest.gyp:gtest',
diff --git a/build/common.gypi b/build/common.gypi
index 8279489..a2d9f2b 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -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': [
diff --git a/build/temp_gyp/breakpad.gyp b/build/temp_gyp/breakpad.gyp
index f032446..c4b41bb 100644
--- a/build/temp_gyp/breakpad.gyp
+++ b/build/temp_gyp/breakpad.gyp
@@ -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',
@@ -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',
diff --git a/build/temp_gyp/googleurl.gyp b/build/temp_gyp/googleurl.gyp
index a5e0038..b518e4c 100644
--- a/build/temp_gyp/googleurl.gyp
+++ b/build/temp_gyp/googleurl.gyp
@@ -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',
diff --git a/build/temp_gyp/v8.gyp b/build/temp_gyp/v8.gyp
index a64a7ca..2a92aeb 100644
--- a/build/temp_gyp/v8.gyp
+++ b/build/temp_gyp/v8.gyp
@@ -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',
],
@@ -422,7 +422,7 @@
},
{
'target_name': 'v8_nosnapshot',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'js2c',
'v8_base',
@@ -451,7 +451,7 @@
},
{
'target_name': 'v8',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'js2c',
'mksnapshot',
@@ -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',
],
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 8fe9522..a77909f 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -77,7 +77,7 @@
},
{
'target_name': 'common',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'resources',
'../base/base.gyp:base',
@@ -357,7 +357,7 @@
},
{
'target_name': 'browser',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'common',
'resources',
@@ -1382,7 +1382,7 @@
},
{
'target_name': 'renderer',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'common',
'resources',
@@ -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',
@@ -1799,7 +1799,7 @@
},
{
'target_name': 'test_support_ui',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'test_support_common',
'resources',
@@ -1834,7 +1834,7 @@
},
{
'target_name': 'test_support_unit',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'test_support_common',
'resources',
@@ -2468,7 +2468,7 @@
{ 'targets': [
{
'target_name': 'views',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'common',
'resources',
@@ -2736,7 +2736,7 @@
{ 'targets': [
{
'target_name': 'plugin',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'common',
'resources',
@@ -2792,7 +2792,7 @@
},
{
'target_name': 'worker',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'../base/base.gyp:base',
'../webkit/webkit.gyp:webkit',
diff --git a/chrome/installer/util/util.gyp b/chrome/installer/util/util.gyp
index 26b1418..f823887 100644
--- a/chrome/installer/util/util.gyp
+++ b/chrome/installer/util/util.gyp
@@ -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',
diff --git a/chrome/third_party/hunspell/hunspell.gyp b/chrome/third_party/hunspell/hunspell.gyp
index 1d86c76..92203a8 100644
--- a/chrome/third_party/hunspell/hunspell.gyp
+++ b/chrome/third_party/hunspell/hunspell.gyp
@@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'hunspell',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'../../../base/base.gyp:base',
'../../../third_party/icu38/icu38.gyp:icuuc',
diff --git a/google_update/google_update.gyp b/google_update/google_update.gyp
index cfe1102..3ad4d06 100644
--- a/google_update/google_update.gyp
+++ b/google_update/google_update.gyp
@@ -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',
diff --git a/media/media.gyp b/media/media.gyp
index a4e9b91..f3e59f9 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -19,7 +19,7 @@
'targets': [
{
'target_name': 'media',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'../base/base.gyp:base',
'../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
diff --git a/net/net.gyp b/net/net.gyp
index cfd17f6..f1a4805 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'net',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'../base/base.gyp:base',
'../build/temp_gyp/googleurl.gyp:googleurl',
@@ -537,7 +537,7 @@
},
{
'target_name': 'net_test_support',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'net',
'../base/base.gyp:base',
diff --git a/printing/printing.gyp b/printing/printing.gyp
index 11fea0c..51768fd 100644
--- a/printing/printing.gyp
+++ b/printing/printing.gyp
@@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'printing',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'../base/base.gyp:base',
],
diff --git a/sandbox/sandbox.gyp b/sandbox/sandbox.gyp
index e1ce9e4..6add0c2 100644
--- a/sandbox/sandbox.gyp
+++ b/sandbox/sandbox.gyp
@@ -11,7 +11,7 @@
'targets': [
{
'target_name': 'sandbox',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'../testing/gtest.gyp:gtest',
'../base/base.gyp:base',
diff --git a/sdch/sdch.gyp b/sdch/sdch.gyp
index d03e392..b8224a3 100644
--- a/sdch/sdch.gyp
+++ b/sdch/sdch.gyp
@@ -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',
diff --git a/skia/skia.gyp b/skia/skia.gyp
index 2957cc1..55071c8 100644
--- a/skia/skia.gyp
+++ b/skia/skia.gyp
@@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'skia',
- 'type': 'static_library',
+ 'type': '<(library)',
'msvs_guid': 'CD9CA56E-4E94-444C-87D4-58CA1E6F300D',
'sources': [
'precompiled.cc',
diff --git a/testing/gtest.gyp b/testing/gtest.gyp
index 110fe14..078ca3c 100644
--- a/testing/gtest.gyp
+++ b/testing/gtest.gyp
@@ -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',
diff --git a/third_party/bzip2/bzip2.gyp b/third_party/bzip2/bzip2.gyp
index 2508bb5..c9f59de 100644
--- a/third_party/bzip2/bzip2.gyp
+++ b/third_party/bzip2/bzip2.gyp
@@ -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': [
diff --git a/third_party/harfbuzz/harfbuzz.gyp b/third_party/harfbuzz/harfbuzz.gyp
index 5e98ddb..9d5b408 100644
--- a/third_party/harfbuzz/harfbuzz.gyp
+++ b/third_party/harfbuzz/harfbuzz.gyp
@@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'harfbuzz',
- 'type': 'static_library',
+ 'type': '<(library)',
'sources': [
'src/harfbuzz-buffer.c',
'src/harfbuzz-stream.c',
@@ -46,7 +46,7 @@
},
{
'target_name': 'harfbuzz_interface',
- 'type': 'static_library',
+ 'type': '<(library)',
'sources': [
'contrib/harfbuzz-freetype.c',
'contrib/harfbuzz-unicode.c',
diff --git a/third_party/libevent/libevent.gyp b/third_party/libevent/libevent.gyp
index 213009a..4230cb4 100644
--- a/third_party/libevent/libevent.gyp
+++ b/third_party/libevent/libevent.gyp
@@ -13,7 +13,7 @@
{
'target_name': 'libevent',
'product_name': 'event',
- 'type': 'static_library',
+ 'type': '<(library)',
'sources': [
'buffer.c',
'evbuffer.c',
diff --git a/third_party/libjpeg/libjpeg.gyp b/third_party/libjpeg/libjpeg.gyp
index e29bd41..87f9937 100644
--- a/third_party/libjpeg/libjpeg.gyp
+++ b/third_party/libjpeg/libjpeg.gyp
@@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'libjpeg',
- 'type': 'static_library',
+ 'type': '<(library)',
'msvs_guid': '238CE175-76CE-4A25-A676-69D115885601',
'sources': [
'jcapimin.c',
diff --git a/third_party/libpng/libpng.gyp b/third_party/libpng/libpng.gyp
index 83bb907..63bd9d7 100644
--- a/third_party/libpng/libpng.gyp
+++ b/third_party/libpng/libpng.gyp
@@ -9,7 +9,7 @@
'targets': [
{
'target_name': 'libpng',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'../zlib/zlib.gyp:zlib',
],
diff --git a/third_party/libxml/libxml.gyp b/third_party/libxml/libxml.gyp
index 3514097..b1b0117 100644
--- a/third_party/libxml/libxml.gyp
+++ b/third_party/libxml/libxml.gyp
@@ -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',
diff --git a/third_party/libxslt/libxslt.gyp b/third_party/libxslt/libxslt.gyp
index 9615e83..f775d4b 100644
--- a/third_party/libxslt/libxslt.gyp
+++ b/third_party/libxslt/libxslt.gyp
@@ -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',
diff --git a/third_party/modp_b64/modp_b64.gyp b/third_party/modp_b64/modp_b64.gyp
index 6b4b75c..18dadd8 100644
--- a/third_party/modp_b64/modp_b64.gyp
+++ b/third_party/modp_b64/modp_b64.gyp
@@ -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',
diff --git a/third_party/sqlite/sqlite.gyp b/third_party/sqlite/sqlite.gyp
index 800cc18..a725754 100644
--- a/third_party/sqlite/sqlite.gyp
+++ b/third_party/sqlite/sqlite.gyp
@@ -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
diff --git a/third_party/zlib/zlib.gyp b/third_party/zlib/zlib.gyp
index f59bd46..a2e592e 100644
--- a/third_party/zlib/zlib.gyp
+++ b/third_party/zlib/zlib.gyp
@@ -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',
diff --git a/webkit/activex_shim/activex_shim.gyp b/webkit/activex_shim/activex_shim.gyp
index 8addf20..7f08aaf 100644
--- a/webkit/activex_shim/activex_shim.gyp
+++ b/webkit/activex_shim/activex_shim.gyp
@@ -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',
diff --git a/webkit/default_plugin/default_plugin.gyp b/webkit/default_plugin/default_plugin.gyp
index 926623c..55142b8 100644
--- a/webkit/default_plugin/default_plugin.gyp
+++ b/webkit/default_plugin/default_plugin.gyp
@@ -13,7 +13,7 @@
'targets': [
{
'target_name': 'default_plugin',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'../../third_party/libxml/libxml.gyp:libxml',
'../../third_party/icu38/icu38.gyp:icui18n',
diff --git a/webkit/tools/test_shell/test_shell.gyp b/webkit/tools/test_shell/test_shell.gyp
index 024512b..a9197e8 100644
--- a/webkit/tools/test_shell/test_shell.gyp
+++ b/webkit/tools/test_shell/test_shell.gyp
@@ -12,7 +12,7 @@
'targets': [
{
'target_name': 'test_shell_common',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'../../../base/base.gyp:base',
'../../../base/base.gyp:base_gfx',
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index 6727436..2f6f12b 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -200,7 +200,7 @@
},
{
'target_name': 'wtf',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'config',
'../third_party/icu38/icu38.gyp:icui18n',
@@ -362,7 +362,7 @@
},
{
'target_name': 'pcre',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'config',
'wtf',
@@ -404,7 +404,7 @@
},
{
'target_name': 'webcore',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'config',
'pcre',
@@ -4090,7 +4090,7 @@
},
{
'target_name': 'webkit',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'webcore',
],
@@ -4216,7 +4216,7 @@
},
{
'target_name': 'glue',
- 'type': 'static_library',
+ 'type': '<(library)',
'dependencies': [
'webcore',
'webkit',