local.mk 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ## See sim/Makefile.am
  2. ##
  3. ## Copyright (C) 2017-2022 Free Software Foundation, Inc.
  4. ##
  5. ## This program is free software; you can redistribute it and/or modify
  6. ## it under the terms of the GNU General Public License as published by
  7. ## the Free Software Foundation; either version 3 of the License, or
  8. ## (at your option) any later version.
  9. ##
  10. ## This program is distributed in the hope that it will be useful,
  11. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ## GNU General Public License for more details.
  14. ##
  15. ## You should have received a copy of the GNU General Public License
  16. ## along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %C%docdir = $(docdir)/%C%
  18. %C%doc_DATA = %D%/README
  19. %C%_BUILD_OUTPUTS = \
  20. %D%/eng.h \
  21. %D%/mloop.c \
  22. %D%/stamp-mloop
  23. ## This makes sure build tools are available before building the arch-subdirs.
  24. SIM_ALL_RECURSIVE_DEPS += $(%C%_BUILD_OUTPUTS)
  25. ## FIXME: Use of `mono' is wip.
  26. %D%/mloop.c %D%/eng.h: %D%/stamp-mloop ; @true
  27. %D%/stamp-mloop: $(srccom)/genmloop.sh %D%/mloop.in
  28. $(AM_V_GEN)$(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
  29. -mono -fast -pbb -switch sem-switch.c \
  30. -cpu or1k32bf \
  31. -infile $(srcdir)/%D%/mloop.in -outfile-prefix %D%/
  32. $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/eng.hin %D%/eng.h
  33. $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/mloop.cin %D%/mloop.c
  34. $(AM_V_at)touch $@
  35. MOSTLYCLEANFILES += $(%C%_BUILD_OUTPUTS)