o Add modulo argument to sim_core_attach
[binutils-gdb.git] / sim / tic80 / Makefile.in
1 # Makefile for blah ...
2 # Copyright blah ...
3
4
5
6 ## COMMON_PRE_CONFIG_FRAG
7
8 # These variables are given default values in COMMON_PRE_CONFIG_FRAG.
9 # We override the ones we need to here.
10 # Not all of these need to be mentioned, only the necessary ones.
11
12 # List of object files, less common parts.
13 SIM_OBJS = sim-endian.o sim-bits.o sim-config.o \
14 support.o idecode.o semantics.o itable.o misc.o \
15 sim-calls.o \
16 sim-events.o \
17 sim-core.o \
18 sim-hload.o \
19 sim-io.o \
20 sim-utils.o \
21 sim-load.o \
22 sim-memopt.o \
23 sim-module.o \
24 sim-options.o \
25 sim-trace.o \
26 sim-profile.o \
27 sim-fpu.o \
28 sim-engine.o \
29 sim-run.o \
30 sim-resume.o \
31 sim-stop.o \
32 sim-reason.o \
33 sim-watch.o
34
35 # List of extra dependencies.
36 # Generally this consists of simulator specific files included by sim-main.h.
37 SIM_EXTRA_DEPS = itable.h idecode.h cpu.h alu.h
38
39 # List of extra libraries to link with
40 SIM_EXTRA_LIBS = -lm
41
42 # List of generators
43 SIM_GEN=tmp-igen
44
45 # List of flags to always pass to $(CC).
46 SIM_WARNINGS=@sim_warnings@
47 SIM_ENDIAN=@sim_endian@
48 SIM_HOSTENDIAN=@sim_hostendian@
49 SIM_INLINE=@sim_inline@
50 SIM_RESERVED_BITS=@sim_reserved_bits@
51 SIM_ALIGNMENT=@sim_alignment@
52
53 SIM_EXTRA_CFLAGS = \
54 $(SIM_WARNINGS) \
55 $(SIM_ENDIAN) \
56 $(SIM_HOSTENDIAN) \
57 $(SIM_INLINE) \
58 $(SIM_RESERVED_BITS) \
59 -DWITH_TARGET_WORD_MSB=31
60
61 # List of main object files for `run'.
62 SIM_RUN_OBJS = nrun.o
63
64 # Dependency of `clean' to clean any extra files.
65 SIM_EXTRA_CLEAN = clean-igen
66
67
68 ## COMMON_POST_CONFIG_FRAG
69
70 # Rules need to build $(SIM_OBJS), plus whatever else the target wants.
71
72 # ... target specific rules ...
73
74 BUILT_SRC_FROM_IGEN = \
75 icache.h \
76 icache.c \
77 idecode.h \
78 idecode.c \
79 semantics.h \
80 semantics.c \
81 model.h \
82 model.c \
83 support.h \
84 support.c \
85 itable.h itable.c
86 $(BUILT_SRC_FROM_IGEN): tmp-igen
87 #
88
89 .PHONY: clean-igen
90 clean-igen:
91 rm -f $(BUILT_SRC_FROM_IGEN)
92 rm -f tmp-igen tmp-insns
93
94 ../igen/igen:
95 cd ../igen && $(MAKE)
96
97 tmp-igen: $(srcdir)/dc $(srcdir)/insns $(srcdir)/ic ../igen/igen
98 cd ../igen && $(MAKE)
99 ../igen/igen \
100 -F f \
101 -G direct-access \
102 -G delayed-branch \
103 -G zero-r0 \
104 -F short,emul \
105 -B 32 -H 31 \
106 -o $(srcdir)/dc \
107 -k $(srcdir)/ic \
108 -i $(srcdir)/insns \
109 -n icache.h -hc tmp-icache.h \
110 -n icache.c -c tmp-icache.c \
111 -n semantics.h -hs tmp-semantics.h \
112 -n semantics.c -s tmp-semantics.c \
113 -n idecode.h -hd tmp-idecode.h \
114 -n idecode.c -d tmp-idecode.c \
115 -n model.h -hm tmp-model.h \
116 -n model.c -m tmp-model.c \
117 -n support.h -hf tmp-support.h \
118 -n support.c -f tmp-support.c \
119 -n itable.h -ht tmp-itable.h \
120 -n itable.c -t tmp-itable.c
121 $(srcdir)/../../move-if-change tmp-icache.h icache.h
122 $(srcdir)/../../move-if-change tmp-icache.c icache.c
123 $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
124 $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
125 $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
126 $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
127 $(srcdir)/../../move-if-change tmp-model.h model.h
128 $(srcdir)/../../move-if-change tmp-model.c model.c
129 $(srcdir)/../../move-if-change tmp-support.h support.h
130 $(srcdir)/../../move-if-change tmp-support.c support.c
131 $(srcdir)/../../move-if-change tmp-itable.h itable.h
132 $(srcdir)/../../move-if-change tmp-itable.c itable.c
133 touch tmp-igen
134
135 ENGINE_H = \
136 sim-main.h \
137 $(srcdir)/../common/sim-basics.h \
138 config.h \
139 $(srcdir)/../common/sim-config.h \
140 $(srcdir)/../common/sim-inline.h \
141 $(srcdir)/../common/sim-types.h \
142 $(srcdir)/../common/sim-bits.h \
143 $(srcdir)/../common/sim-endian.h \
144 $(srcdir)/../common/sim-options.h \
145 itable.h \
146 idecode.h \
147 cpu.h \
148 alu.h \
149 $(srcdir)/../common/sim-alu.h \
150 $(srcdir)/../common/sim-core.h \
151 $(srcdir)/../common/sim-events.h \
152 $(srcdir)/../common/sim-fpu.h \
153 $(srcdir)/../common/sim-engine.h \
154
155 idecode.o: $(ENGINE_H)
156 semantics.o: $(ENGINE_H)
157 support.o: $(ENGINE_H)
158 interp.o: interp.c $(ENGINE_H)
159 sim-calls.o: sim-calls.c $(ENGINE_H)
160 cpu.o: cpu.c $(ENGINE_H)
161 misc.o: $(ENGINE_H)