summaryrefslogtreecommitdiffstats
path: root/o3d/build
diff options
context:
space:
mode:
authorpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 01:53:36 +0000
committerpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 01:53:36 +0000
commitdaefca3e87d6d36f0e6a58e3b0ff60917f285acb (patch)
treebbb7a69c597c2d57b6427391ebbee4bf075c8025 /o3d/build
parent75f9c5ec2b230df2fae6dd6f372eb1eb8562ff01 (diff)
downloadchromium_src-daefca3e87d6d36f0e6a58e3b0ff60917f285acb.zip
chromium_src-daefca3e87d6d36f0e6a58e3b0ff60917f285acb.tar.gz
chromium_src-daefca3e87d6d36f0e6a58e3b0ff60917f285acb.tar.bz2
linux: 64-bit
This CL enables a 64-bit of linux. Set target_arch='x64' in the gyp defines to enable. - fixes a few 64-bit issues - fixes some linux build issues on scons vs make - add rules to build 64-bit version Review URL: http://codereview.chromium.org/376010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/build')
-rw-r--r--o3d/build/common_global.gypi25
-rwxr-xr-xo3d/build/gyp_o3d2
-rw-r--r--o3d/build/libs.gyp48
3 files changed, 63 insertions, 12 deletions
diff --git a/o3d/build/common_global.gypi b/o3d/build/common_global.gypi
new file mode 100644
index 0000000..e3b5429
--- /dev/null
+++ b/o3d/build/common_global.gypi
@@ -0,0 +1,25 @@
+# Copyright (c) 2009 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.
+
+# This file contains flags that are specific to o3d, but affect the build as a
+# whole (e.g. build flags that change the ABI).
+# For example, on linux amd64, all the libraries that will be linked into the
+# plugin (skia, v8, ...) need to be compiled with -fPIC but we don't want to do
+# that generally in Chrome (so it can't be lumped into the top-level
+# build/common.gypi).
+{
+ 'target_defaults': {
+ 'conditions': [
+ [ 'OS == "linux" and target_arch=="x64"', {
+ 'cflags': [
+ '-m64',
+ '-fPIC',
+ ],
+ 'ldflags': [
+ '-m64',
+ ],
+ }],
+ ],
+ },
+}
diff --git a/o3d/build/gyp_o3d b/o3d/build/gyp_o3d
index 598dd70..229b4bc 100755
--- a/o3d/build/gyp_o3d
+++ b/o3d/build/gyp_o3d
@@ -11,6 +11,7 @@ import os
import sys
chrome_src = os.path.join(os.path.dirname(sys.argv[0]), os.pardir, os.pardir)
+o3d_src = os.path.join(os.path.dirname(sys.argv[0]), os.pardir)
try:
import gyp
@@ -24,6 +25,7 @@ if __name__ == '__main__':
# Always include common.gypi
args += ['--depth', '.',
'-I', os.path.join(chrome_src, 'build', 'common.gypi'),
+ '-I', os.path.join(o3d_src, 'build', 'common_global.gypi'),
'-D', 'mac_deployment_target=10.4']
# Off we go...
diff --git a/o3d/build/libs.gyp b/o3d/build/libs.gyp
index 122c6d6..0695316 100644
--- a/o3d/build/libs.gyp
+++ b/o3d/build/libs.gyp
@@ -27,11 +27,9 @@
'defines': [
'GL_GLEXT_PROTOTYPES',
],
- 'scons_variable_settings': {
- 'LIBPATH': [
- '../../<(glewdir)/lib',
- ],
- },
+ 'ldflags': [
+ '-L<(PRODUCT_DIR)',
+ ],
'libraries': [
'-lGL',
'-lGLEW',
@@ -82,11 +80,9 @@
[ 'OS=="linux"',
{
'all_dependent_settings': {
- 'scons_variable_settings': {
- 'LIBPATH': [
- '<(PRODUCT_DIR)',
- ],
- },
+ 'ldflags': [
+ '-L<(PRODUCT_DIR)',
+ ],
'libraries': [
"-lCg",
"-lCgGL",
@@ -125,9 +121,21 @@
[ 'OS=="linux"',
{
'destination': '<(PRODUCT_DIR)',
+ 'conditions': [
+ [ 'target_arch=="x64"',
+ {
+ 'variables': { 'libdir': 'lib64' }
+ }, {
+ 'variables': { 'libdir': 'lib' }
+ }
+ ],
+ ],
'files': [
- "../../<(cgdir)/lib/libCg.so",
- "../../<(cgdir)/lib/libCgGL.so",
+ '../../<(glewdir)/<(libdir)/libGLEW.so',
+ '../../<(glewdir)/<(libdir)/libGLEW.so.1.5',
+ '../../<(glewdir)/<(libdir)/libGLEW.so.1.5.1',
+ "../../<(cgdir)/<(libdir)/libCg.so",
+ "../../<(cgdir)/<(libdir)/libCgGL.so",
"../../<(cgdir)/bin/cgc",
],
},
@@ -154,6 +162,22 @@
],
],
},
+ {
+ 'conditions' : [
+ [ 'OS=="linux"',
+ {
+ 'destination': '<(SHARED_LIB_DIR)',
+ 'files': [
+ '<(PRODUCT_DIR)/libGLEW.so',
+ '<(PRODUCT_DIR)/libGLEW.so.1.5',
+ '<(PRODUCT_DIR)/libGLEW.so.1.5.1',
+ "<(PRODUCT_DIR)/libCg.so",
+ "<(PRODUCT_DIR)/libCgGL.so",
+ ],
+ },
+ ],
+ ]
+ }
],
},
],