fixed-obj.mk 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. # $(iter-labels) and $(iter-from) and $(iter-to) are also advanced.
  4. o := $(firstword $(iter-items))
  5. iter-items := $(filter-out $o,$(iter-items))
  6. $o-label := $(firstword $(iter-labels))
  7. iter-labels := $(wordlist 2,$(words $(iter-labels)),$(iter-labels))
  8. $o-from := $(firstword $(iter-from))
  9. iter-from := $(wordlist 2,$(words $(iter-from)),$(iter-from))
  10. $o-to := $(firstword $(iter-to))
  11. iter-to := $(wordlist 2,$(words $(iter-to)),$(iter-to))
  12. ifeq ($($o-from),$($o-to))
  13. $o-opt := -D$($o-from)_MODE
  14. else
  15. $o-opt := -DFROM_$($o-from) -DTO_$($o-to)
  16. endif
  17. #$(info $o$(objext): -DL$($o-label) $($o-opt))
  18. ifneq ($o,$(filter $o,$(LIB2FUNCS_EXCLUDE)))
  19. $o$(objext): %$(objext): $(srcdir)/fixed-bit.c
  20. $(gcc_compile) -DL$($*-label) $($*-opt) -c $(srcdir)/fixed-bit.c $(vis_hide)
  21. ifeq ($(enable_shared),yes)
  22. $(o)_s$(objext): %_s$(objext): $(srcdir)/fixed-bit.c
  23. $(gcc_s_compile) -DL$($*-label) $($*-opt) -c $(srcdir)/fixed-bit.c
  24. endif
  25. endif