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