2 # Copyright (C) 2015 Google, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
21 depfile = "{{output}}.d"
22 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
24 description = "CC {{output}}"
26 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
31 depfile = "{{output}}.d"
32 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}"
34 description = "CXX {{output}}"
36 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
41 rspfile = "{{output}}.rsp"
42 command = "rm -f {{output}} && ar rcs {{output}} @$rspfile"
43 description = "AR {{target_output_name}}{{output_extension}}"
44 rspfile_content = "{{inputs}}"
46 "{{target_out_dir}}/{{target_output_name}}{{output_extension}}",
48 default_output_extension = ".a"
54 soname = "{{target_output_name}}{{output_extension}}" # e.g. "libfoo.so".
55 rspfile = soname + ".rsp"
57 command = "$cxx -shared {{ldflags}} -o $soname -Wl,-soname=$soname @$rspfile"
58 rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive {{libs}}"
60 description = "SOLINK $soname"
62 # Use this for {{output_extension}} expansions unless a target manually
63 # overrides it (in which case {{output_extension}} will be what the target
65 default_output_extension = ".so"
71 depend_output = soname
77 outfile = "{{target_output_name}}{{output_extension}}"
78 rspfile = "$outfile.rsp"
79 command = "$cxx {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group {{libs}}"
80 description = "LINK $outfile"
81 rspfile_content = "{{inputs}}"
88 command = "touch {{output}}"
89 description = "STAMP {{output}}"
93 command = "cp -af {{source}} {{output}}"
94 description = "COPY {{source}} {{output}}"