]>
Commit | Line | Data |
---|---|---|
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 | ||
4 | o := $(firstword $(iter-items)) | |
5 | iter-items := $(filter-out $o,$(iter-items)) | |
6 | ||
7 | base := $(basename $(notdir $o)) | |
8 | ||
f92b36a5 | 9 | c_flags-$o := $(c_flags) |
10 | ||
894a47b4 | 11 | ifeq ($(suffix $o),.c) |
12 | ||
13 | $(base)$(objext): $o | |
f92b36a5 | 14 | $(gcc_compile) $(c_flags-$<) -c $< $(vis_hide) |
894a47b4 | 15 | |
16 | $(base)_s$(objext): $o | |
f92b36a5 | 17 | $(gcc_s_compile) $(c_flags-$<) -c $< |
894a47b4 | 18 | |
19 | else | |
20 | ||
21 | ifneq ($(suffix $o),.S) | |
22 | ifneq ($(suffix $o),.asm) | |
23 | $(error Unsupported file type: $o) | |
24 | endif | |
25 | endif | |
26 | ||
8ce80784 | 27 | as_flags-$o := -xassembler$(if $(filter .S,$(suffix $o)),-with-cpp) |
28 | ||
894a47b4 | 29 | $(base)$(objext): $o $(base).vis |
8ce80784 | 30 | $(gcc_compile) -c $(as_flags-$<) -include $*.vis $< |
894a47b4 | 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 | |
38 | endif |