2009-09-02 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / libgcc / shared-object.mk
blob65171b6aa320ea59dd8f5461541815617f54bda3
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.
4 o := $(firstword $(iter-items))
5 iter-items := $(filter-out $o,$(iter-items))
7 base := $(basename $(notdir $o))
9 ifeq ($(suffix $o),.c)
11 $(base)$(objext): $o
12 $(gcc_compile) $(c_flags) -c $< $(vis_hide)
14 $(base)_s$(objext): $o
15 $(gcc_s_compile) $(c_flags) -c $<
17 else
19 ifneq ($(suffix $o),.S)
20 ifneq ($(suffix $o),.asm)
21 $(error Unsupported file type: $o)
22 endif
23 endif
25 $(base)$(objext): $o $(base).vis
26 $(gcc_compile) -c -xassembler-with-cpp -include $*.vis $<
28 $(base).vis: $(base)_s$(objext)
29 $(gen-hide-list)
31 $(base)_s$(objext): $o
32 $(gcc_s_compile) -c -xassembler-with-cpp $<
34 endif