]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/static-object.mk
[Ada] Fix documentation for GNAT.Command_Line.Exit_From_Command_Line
[thirdparty/gcc.git] / libgcc / static-object.mk
CommitLineData
894a47b4 1# This file is included several times in a row, once for each element of
2# $(iter-items). On each inclusion, we advance $o to the next element.
3
4o := $(firstword $(iter-items))
5iter-items := $(filter-out $o,$(iter-items))
6
7base := $(basename $(notdir $o))
8
a504f092 9# Copy c_flags to a rule-specific copy and use the copy, to avoid the
10# following rules being affected by later changes to c_flags in the
11# including file.
12c_flags-$o := $(c_flags)
13
894a47b4 14ifeq ($(suffix $o),.c)
15
16$(base)$(objext): $o
a504f092 17 $(gcc_compile) $(c_flags-$<) -c $< $(vis_hide)
894a47b4 18
19else
20
21ifneq ($(suffix $o),.S)
22ifneq ($(suffix $o),.asm)
23$(error Unsupported file type: $o)
24endif
25endif
26
8ce80784 27as_flags-$o := -xassembler$(if $(filter .S,$(suffix $o)),-with-cpp)
28
b78f422e 29$(base)$(objext): $o $(base).vis
8ce80784 30 $(gcc_compile) -c $(as_flags-$<) -include $*.vis $<
b78f422e 31
32$(base).vis: $(base)_s$(objext)
33 $(gen-hide-list)
34
35$(base)_s$(objext): $o
8ce80784 36 $(gcc_s_compile) -c $(as_flags-$<) $<
894a47b4 37
38endif