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