aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgcc/config/avr/lib2-object.mk
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libgcc/config/avr/lib2-object.mk')
-rw-r--r--gcc-4.9/libgcc/config/avr/lib2-object.mk23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/libgcc/config/avr/lib2-object.mk b/gcc-4.9/libgcc/config/avr/lib2-object.mk
new file mode 100644
index 000000000..6a9e04de0
--- /dev/null
+++ b/gcc-4.9/libgcc/config/avr/lib2-object.mk
@@ -0,0 +1,23 @@
+# This file is included several times in a row, once for each element of
+# $(iter-items). On each inclusion, we advance $o to the next element.
+# $(iter-labels) and $(iter-flags) are also advanced.
+# This works similar to $(srcdir)/siditi-object.mk.
+
+o := $(firstword $(iter-items))
+iter-items := $(filter-out $o,$(iter-items))
+
+$o-label := $(firstword $(iter-labels))
+iter-labels := $(wordlist 2,$(words $(iter-labels)),$(iter-labels))
+
+$o-flag := $(firstword $(iter-flags))
+iter-flags := $(wordlist 2,$(words $(iter-flags)),$(iter-flags))
+
+$o$(objext): %$(objext): $(srcdir)/config/avr/lib2funcs.c
+ $(gcc_compile) -DL_$($*-label) -DL_LABEL=$($*-label) $($*-flag) \
+ -c $< $(vis_hide)
+
+ifeq ($(enable_shared),yes)
+$(o)_s$(objext): %_s$(objext): $(srcdir)/config/avr/lib2funcs.c
+ $(gcc_s_compile) -DL_$($*-label) -DL_LABEL=$($*-label) $($*-flag) \
+ -c $<
+endif