diff options
author | alokp@chromium.org <alokp@chromium.org@736b8ea6-26fd-11df-bfd4-992fa37f6226> | 2010-04-06 15:42:22 +0000 |
---|---|---|
committer | alokp@chromium.org <alokp@chromium.org@736b8ea6-26fd-11df-bfd4-992fa37f6226> | 2010-04-06 15:42:22 +0000 |
commit | 29d56fbb60c635df7efb5ae6bf426b63870bda03 (patch) | |
tree | 9f32d0737d298d8265dda4bc1132baede5a7e2b3 /build | |
parent | 0e3358a6aae3e3d54e29f17297187f2f078e1ef3 (diff) | |
download | angle-29d56fbb60c635df7efb5ae6bf426b63870bda03.tar.gz |
Added GYP build files. GYP files are needed for integration with chromium and cross-platform build for glsl translator. It would really be nice if we did not have to maintain two build systems. For now I have only moved the GLSL translator to gyp build system. Please note that the gyp files awkwardly have build_ prefix so they do not conflict with the manually-maintained sln files.
Review URL: http://codereview.appspot.com/885043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@98 736b8ea6-26fd-11df-bfd4-992fa37f6226
Diffstat (limited to 'build')
-rw-r--r-- | build/all.gyp | 27 | ||||
-rw-r--r-- | build/common.gypi | 97 | ||||
-rw-r--r-- | build/gyp_angle | 29 |
3 files changed, 153 insertions, 0 deletions
diff --git a/build/all.gyp b/build/all.gyp new file mode 100644 index 00000000..fbc8ecad --- /dev/null +++ b/build/all.gyp @@ -0,0 +1,27 @@ +# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'all', + 'type': 'none', + 'dependencies': [ + # TODO(alokp): build_ prefix should be removed from the gyp files + # as soon as we can get rid of manually-maintained sln files. + # Otherwise auto-generated sln files will overwrite/conflict the + # manually maintained ones. + '../samples/build_samples.gyp:*', + '../src/build_angle.gyp:*', + # '../tests/tests.gyp:*', + ], + }, + ], +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: diff --git a/build/common.gypi b/build/common.gypi new file mode 100644 index 00000000..e98234b4 --- /dev/null +++ b/build/common.gypi @@ -0,0 +1,97 @@ +# Copyright (c) 2010 The ANGLE Project 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': { + 'library%': 'static_library', + }, + 'target_defaults': { + 'default_configuration': 'Debug', + 'configurations': { + 'Common': { + 'abstract': 1, + 'msvs_configuration_attributes': { + 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)', + 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', + }, + 'msvs_configuration_platform': 'Win32', + 'msvs_settings': { + 'VCCLCompilerTool': { + 'BufferSecurityCheck': 'true', + 'DebugInformationFormat': '3', + 'ExceptionHandling': '0', + 'EnableFunctionLevelLinking': 'true', + 'MinimalRebuild': 'false', + 'PreprocessorDefinitions': [ + '_CRT_SECURE_NO_DEPRECATE', + '_HAS_EXCEPTIONS=0', + '_HAS_TR1=0', + '_WIN32_WINNT=0x0600', + '_WINDOWS', + 'NOMINMAX', + 'WIN32', + 'WIN32_LEAN_AND_MEAN', + 'WINVER=0x0600', + ], + 'RuntimeTypeInfo': 'false', + 'WarningLevel': '3', + }, + 'VCLinkerTool': { + 'FixedBaseAddress': '1', + 'GenerateDebugInformation': 'true', + 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', + 'MapFileName': '$(OutDir)\\$(TargetName).map', + # SubSystem values: + # 0 == not set + # 1 == /SUBSYSTEM:CONSOLE + # 2 == /SUBSYSTEM:WINDOWS + # Most of the executables we'll ever create are tests + # and utilities with console output. + 'SubSystem': '1', + }, + }, + }, # Common + 'Debug': { + 'inherit_from': ['Common'], + 'msvs_settings': { + 'VCCLCompilerTool': { + 'Optimization': '0', # /Od + 'PreprocessorDefinitions': ['_DEBUG'], + 'BasicRuntimeChecks': '3', + 'RuntimeLibrary': '1', # /MTd (debug static) + }, + 'VCLinkerTool': { + 'LinkIncremental': '2', + }, + }, + }, # Debug + 'Release': { + 'inherit_from': ['Common'], + 'msvs_settings': { + 'VCCLCompilerTool': { + 'Optimization': '2', # /Os + 'PreprocessorDefinitions': ['NDEBUG'], + 'RuntimeLibrary': '0', # /MT (static) + }, + 'VCLinkerTool': { + 'LinkIncremental': '1', + }, + }, + }, # Release + }, # configurations + }, # target_defaults + 'conditions': [ + ['OS=="win"', { + 'target_defaults': { + 'msvs_cygwin_dirs': ['../third_party/cygwin'], + }, + }] + ], +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: diff --git a/build/gyp_angle b/build/gyp_angle new file mode 100644 index 00000000..6eb3d4e7 --- /dev/null +++ b/build/gyp_angle @@ -0,0 +1,29 @@ +#!/usr/bin/python + +# Copyright (c) 2010 The ANGLE Project 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 script is wrapper for ANGLE that adds some support for how GYP +# is invoked by ANGLE beyond what can be done in the gclient hooks. + +import os +import sys + +script_dir = os.path.dirname(__file__) +angle_dir = os.path.normpath(os.path.join(script_dir, os.pardir)) + +sys.path.append(os.path.join(angle_dir, 'third_party', 'gyp', 'pylib')) +import gyp + +if __name__ == '__main__': + args = sys.argv[1:] + + print 'Updating projects from gyp files...' + sys.stdout.flush() + + # Add common.gypi to the include path. + args.append('-I' + os.path.join(script_dir, 'common.gypi')) + # Add all.gyp as the main gyp file to be generated. + args.append(os.path.join(script_dir, 'all.gyp')) + sys.exit(gyp.main(args)) |