# Copyright 2008 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
#     * Redistributions of source code must retain the above copyright
#       notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
#       copyright notice, this list of conditions and the following
#       disclaimer in the documentation and/or other materials provided
#       with the distribution.
#     * Neither the name of Google Inc. nor the names of its
#       contributors may be used to endorse or promote products derived
#       from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import sys
from os.path import join, dirname, abspath
root_dir = dirname(File('SConstruct').rfile().abspath)
sys.path.append(join(root_dir, 'tools'))
Import('context object_files')


SOURCES = {
  'all': [
    'gay-fixed.cc',
    'gay-precision.cc',
    'gay-shortest.cc',
    'test-accessors.cc',
    'test-alloc.cc',
    'test-api.cc',
    'test-ast.cc',
    'test-bignum-dtoa.cc',
    'test-bignum.cc',
    'test-circular-queue.cc',
    'test-compiler.cc',
    'test-conversions.cc',
    'test-cpu-profiler.cc',
    'test-dataflow.cc',
    'test-debug.cc',
    'test-decls.cc',
    'test-deoptimization.cc',
    'test-diy-fp.cc',
    'test-double.cc',
    'test-dtoa.cc',
    'test-fast-dtoa.cc',
    'test-fixed-dtoa.cc',
    'test-flags.cc',
    'test-func-name-inference.cc',
    'test-hashmap.cc',
    'test-heap-profiler.cc',
    'test-heap.cc',
    'test-list.cc',
    'test-liveedit.cc',
    'test-lock.cc',
    'test-log-utils.cc',
    'test-log.cc',
    'test-mark-compact.cc',
    'test-parsing.cc',
    'test-platform-tls.cc',
    'test-profile-generator.cc',
    'test-regexp.cc',
    'test-reloc-info.cc',
    'test-serialize.cc',
    'test-sockets.cc',
    'test-spaces.cc',
    'test-strings.cc',
    'test-strtod.cc',
    'test-thread-termination.cc',
    'test-threads.cc',
    'test-type-info.cc',
    'test-unbound-queue.cc',
    'test-utils.cc',
    'test-version.cc'
  ],
  'arch:arm':  [
    'test-assembler-arm.cc',
    'test-disasm-arm.cc'
  ],
  'arch:ia32': [
    'test-assembler-ia32.cc',
    'test-disasm-ia32.cc',
    'test-log-stack-tracer.cc'
  ],
  'arch:x64': ['test-assembler-x64.cc',
               'test-macro-assembler-x64.cc',
               'test-log-stack-tracer.cc'],
  'arch:mips': ['test-assembler-mips.cc'],
  'os:linux':  ['test-platform-linux.cc'],
  'os:macos':  ['test-platform-macos.cc'],
  'os:nullos': ['test-platform-nullos.cc'],
  'os:win32':  ['test-platform-win32.cc']
}


def Build():
  cctest_files = context.GetRelevantSources(SOURCES)
  env = Environment()
  env.Replace(**context.flags['cctest'])
  context.ApplyEnvOverrides(env)
  # There seems to be a glitch in the way scons decides where to put
  # PDB files when compiling using MSVC so we specify it manually.
  # This should not affect any other platforms.
  return env.Program('cctest', ['cctest.cc', cctest_files, object_files],
      PDB='cctest.exe.pdb')


program = Build()
Return('program')
