Makefile.in 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Makefile for Lattice Mico32 simulator.
  2. # Contributed by Jon Beniston <jon@beniston.com>
  3. ## COMMON_PRE_CONFIG_FRAG
  4. # List of object files, less common parts.
  5. SIM_OBJS = \
  6. $(SIM_NEW_COMMON_OBJS) \
  7. sim-hload.o \
  8. sim-model.o \
  9. sim-reg.o \
  10. sim-signal.o \
  11. cgen-utils.o cgen-trace.o cgen-scache.o \
  12. cgen-run.o sim-reason.o sim-stop.o \
  13. sim-if.o arch.o \
  14. cpu.o decode.o sem.o model.o mloop.o \
  15. lm32.o traps.o user.o
  16. # List of extra dependencies.
  17. # Generally this consists of simulator specific files included by sim-main.h.
  18. SIM_EXTRA_DEPS = $(CGEN_INCLUDE_DEPS) $(srcdir)/../../opcodes/lm32-desc.h
  19. # List of flags to always pass to $(CC).
  20. #SIM_EXTRA_CFLAGS =
  21. SIM_EXTRA_CLEAN = lm32-clean
  22. # This selects the lm32 newlib/libgloss syscall definitions.
  23. NL_TARGET = -DNL_TARGET_lm32
  24. ## COMMON_POST_CONFIG_FRAG
  25. arch = lm32
  26. arch.o: arch.c $(SIM_MAIN_DEPS)
  27. traps.o: traps.c targ-vals.h $(SIM_MAIN_DEPS)
  28. sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(srcdir)/../common/sim-core.h
  29. LM32BF_INCLUDE_DEPS = \
  30. $(CGEN_MAIN_CPU_DEPS) \
  31. cpu.h decode.h eng.h
  32. lm32.o: lm32.c $(LM32BF_INCLUDE_DEPS)
  33. # FIXME: Use of `mono' is wip.
  34. mloop.c eng.h: stamp-mloop
  35. stamp-mloop: $(srcdir)/../common/genmloop.sh mloop.in Makefile
  36. $(SHELL) $(srccom)/genmloop.sh \
  37. -mono -fast -pbb -switch sem-switch.c \
  38. -cpu lm32bf -infile $(srcdir)/mloop.in
  39. $(SHELL) $(srcroot)/move-if-change eng.hin eng.h
  40. $(SHELL) $(srcroot)/move-if-change mloop.cin mloop.c
  41. touch stamp-mloop
  42. mloop.o: mloop.c sem-switch.c
  43. cpu.o: cpu.c $(LM32BF_INCLUDE_DEPS)
  44. decode.o: decode.c $(LM32BF_INCLUDE_DEPS)
  45. sem.o: sem.c $(LM32BF_INCLUDE_DEPS)
  46. model.o: model.c $(LM32BF_INCLUDE_DEPS)
  47. lm32-clean:
  48. rm -f mloop.c eng.h stamp-mloop
  49. rm -f stamp-arch stamp-cpu
  50. rm -f tmp-*
  51. # cgen support, enable with --enable-cgen-maint
  52. CGEN_MAINT = ; @true
  53. # The following line is commented in or out depending upon --enable-cgen-maint.
  54. @CGEN_MAINT@CGEN_MAINT =
  55. stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/lm32.cpu
  56. $(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all \
  57. archfile=$(CPU_DIR)/lm32.cpu \
  58. FLAGS="with-scache with-profile=fn"
  59. touch stamp-arch
  60. arch.h arch.c cpuall.h: $(CGEN_MAINT) stamp-arch
  61. stamp-cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/lm32.cpu
  62. $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
  63. cpu=lm32bf mach=lm32 SUFFIX= \
  64. archfile=$(CPU_DIR)/lm32.cpu \
  65. FLAGS="with-scache with-profile=fn" \
  66. EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
  67. touch stamp-cpu
  68. cpu.h sem.c sem-switch.c model.c decode.c decode.h: $(CGEN_MAINT) stamp-cpu