# Copyright 2015 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.
#
# Fake build.ninja file used by ../chromium.ycm_extra_conf_unittest.py

cxx = ../../fake-clang++
cxx2 = echo ../../fake-clang++
link = echo Link
default_cc_file = ../../base/logging.cc
default_test_file = ../../base/logging_unittest.cc

rule cxx
  command = $cxx -Ia -isysroot /mac.sdk -Itag-$tag $in -o $out

rule cxx_sysroot_abs
  command = $cxx -Ia --sysroot=/usr/lib/sysroot-image $in -o $out

rule cxx_sysroot_rel
  command = $cxx -Ia --sysroot=../../build/sysroot-image $in -o $out

rule link
  command = $link $in $out

build obj/one.o: cxx ../../one.cpp
  tag = one

build extra: phony obj/extra.o

build obj/linker-output.o: link ../../three.cc | ../../four.cc $default_cc_file

build obj/extra.o: cxx ../../extra.cpp
  tag = extra

build obj/two.o: cxx ../../two.cpp | extra
  tag = two

build obj/three.o: cxx ../../three.cc
  tag = three

build obj/four.o: cxx ../../four.cc
  tag = four

build obj/base.logging.o: cxx $default_cc_file
  tag = default

build obj/base_unittests.logging_unittest.o: cxx $default_test_file
  tag = default-test

build obj/five.o: link ../../five.cc

build obj/six.o: cxx_sysroot_abs ../../six.cc

build obj/seven.o: cxx_sysroot_rel ../../seven.cc
