Makefile.in 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Makefile template for configure for the or1k simulator
  2. # Copyright (C) 2017-2022 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GDB, the GNU debugger.
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. ## COMMON_PRE_CONFIG_FRAG
  19. OR1K_OBJS = \
  20. or1k.o \
  21. arch.o \
  22. cpu.o \
  23. decode.o \
  24. model.o \
  25. sem.o \
  26. mloop.o \
  27. sim-if.o \
  28. traps.o
  29. SIM_OBJS = \
  30. $(SIM_NEW_COMMON_OBJS) \
  31. cgen-utils.o \
  32. cgen-trace.o \
  33. cgen-scache.o \
  34. cgen-run.o \
  35. cgen-fpu.o \
  36. cgen-accfp.o
  37. SIM_OBJS += $(OR1K_OBJS)
  38. # Extra headers included by sim-main.h.
  39. SIM_EXTRA_DEPS = \
  40. $(CGEN_INCLUDE_DEPS) \
  41. or1k-sim.h \
  42. $(srcdir)/../../opcodes/or1k-desc.h \
  43. arch.h \
  44. cpuall.h \
  45. decode.h
  46. SIM_EXTRA_CFLAGS =
  47. SIM_EXTRA_LIBS = -lm
  48. ## COMMON_POST_CONFIG_FRAG
  49. arch = or1k
  50. # or1k32bf
  51. OR1K32BF_INCLUDE_DEPS = \
  52. $(CGEN_MAIN_CPU_DEPS) \
  53. cpu.h \
  54. decode.h \
  55. eng.h
  56. or1k.o: or1k.c $(OR1K32BF_INCLUDE_DEPS)
  57. $(COMPILE) $<
  58. $(POSTCOMPILE)
  59. sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(srcdir)/../common/sim-core.h eng.h
  60. $(COMPILE) $<
  61. $(POSTCOMPILE)
  62. traps.o: traps.c $(SIM_MAIN_DEPS) eng.h
  63. $(COMPILE) $<
  64. $(POSTCOMPILE)
  65. stamps: stamp-arch stamp-cpu
  66. # NOTE: Generated source files are specified as full paths,
  67. # e.g. $(srcdir)/arch.c, because make may decide the files live
  68. # in objdir otherwise.
  69. OR1K_CGEN_DEPS = \
  70. $(CPU_DIR)/or1k.cpu \
  71. $(CPU_DIR)/or1k.opc \
  72. $(CPU_DIR)/or1kcommon.cpu \
  73. $(CPU_DIR)/or1korbis.cpu \
  74. $(CPU_DIR)/or1korfpx.cpu \
  75. Makefile
  76. stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(OR1K_CGEN_DEPS)
  77. $(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) \
  78. mach=or32,or32nd \
  79. archfile=$(CPU_DIR)/or1k.cpu \
  80. FLAGS="with-scache"
  81. $(SILENCE) touch $@
  82. $(srcdir)/arch.h $(srcdir)/arch.c $(srcdir)/cpuall.h: $(CGEN_MAINT) stamp-arch
  83. @true
  84. stamp-cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(OR1K_CGEN_DEPS)
  85. $(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
  86. cpu=or1k32bf \
  87. mach=or32,or32nd \
  88. archfile=$(CPU_DIR)/or1k.cpu \
  89. FLAGS="with-scache" \
  90. EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
  91. $(SILENCE) touch $@
  92. $(srcdir)/cpu.h $(srcdir)/cpu.c $(srcdir)/model.c $(srcdir)/sem.c $(srcdir)/sem-switch.c $(srcdir)/decode.c $(srcdir)/decode.h: $(CGEN_MAINT) stamp-cpu
  93. @true