Commit | Line | Data |
---|---|---|
15c16493 AC |
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. | |
d5d9a1e1 DE |
13 | SIM_OBJS = \ |
14 | $(SIM_NEW_COMMON_OBJS) \ | |
381f42ef | 15 | support.o idecode.o semantics.o itable.o misc.o \ |
15c16493 | 16 | sim-calls.o \ |
fafce69a | 17 | sim-hload.o \ |
6dbaff8f | 18 | sim-hrw.o \ |
f03b093c AC |
19 | sim-engine.o \ |
20 | sim-run.o \ | |
21 | sim-resume.o \ | |
22 | sim-stop.o \ | |
d5d9a1e1 | 23 | sim-reason.o |
15c16493 AC |
24 | |
25 | # List of extra dependencies. | |
26 | # Generally this consists of simulator specific files included by sim-main.h. | |
27 | SIM_EXTRA_DEPS = itable.h idecode.h cpu.h alu.h | |
28 | ||
3971886a AC |
29 | # List of extra libraries to link with |
30 | SIM_EXTRA_LIBS = -lm | |
31 | ||
15c16493 AC |
32 | # List of generators |
33 | SIM_GEN=tmp-igen | |
34 | ||
35 | # List of flags to always pass to $(CC). | |
15c16493 AC |
36 | |
37 | SIM_EXTRA_CFLAGS = \ | |
15c16493 AC |
38 | -DWITH_TARGET_WORD_MSB=31 |
39 | ||
40 | # List of main object files for `run'. | |
41 | SIM_RUN_OBJS = nrun.o | |
42 | ||
43 | # Dependency of `clean' to clean any extra files. | |
44 | SIM_EXTRA_CLEAN = clean-igen | |
45 | ||
46 | ||
47 | ## COMMON_POST_CONFIG_FRAG | |
48 | ||
49 | # Rules need to build $(SIM_OBJS), plus whatever else the target wants. | |
50 | ||
51 | # ... target specific rules ... | |
52 | ||
53 | BUILT_SRC_FROM_IGEN = \ | |
54 | icache.h \ | |
55 | icache.c \ | |
56 | idecode.h \ | |
57 | idecode.c \ | |
58 | semantics.h \ | |
59 | semantics.c \ | |
60 | model.h \ | |
61 | model.c \ | |
62 | support.h \ | |
63 | support.c \ | |
64 | itable.h itable.c | |
65 | $(BUILT_SRC_FROM_IGEN): tmp-igen | |
66 | # | |
67 | ||
68 | .PHONY: clean-igen | |
69 | clean-igen: | |
70 | rm -f $(BUILT_SRC_FROM_IGEN) | |
71 | rm -f tmp-igen tmp-insns | |
72 | ||
73 | ../igen/igen: | |
74 | cd ../igen && $(MAKE) | |
75 | ||
76 | tmp-igen: $(srcdir)/dc $(srcdir)/insns $(srcdir)/ic ../igen/igen | |
77 | cd ../igen && $(MAKE) | |
15c16493 | 78 | ../igen/igen \ |
381f42ef | 79 | -F f \ |
15c16493 AC |
80 | -G direct-access \ |
81 | -G delayed-branch \ | |
37a684b8 | 82 | -G zero-r0 \ |
15c16493 AC |
83 | -F short,emul \ |
84 | -B 32 -H 31 \ | |
85 | -o $(srcdir)/dc \ | |
86 | -k $(srcdir)/ic \ | |
87 | -i $(srcdir)/insns \ | |
88 | -n icache.h -hc tmp-icache.h \ | |
89 | -n icache.c -c tmp-icache.c \ | |
90 | -n semantics.h -hs tmp-semantics.h \ | |
91 | -n semantics.c -s tmp-semantics.c \ | |
92 | -n idecode.h -hd tmp-idecode.h \ | |
93 | -n idecode.c -d tmp-idecode.c \ | |
94 | -n model.h -hm tmp-model.h \ | |
95 | -n model.c -m tmp-model.c \ | |
96 | -n support.h -hf tmp-support.h \ | |
97 | -n support.c -f tmp-support.c \ | |
98 | -n itable.h -ht tmp-itable.h \ | |
99 | -n itable.c -t tmp-itable.c | |
100 | $(srcdir)/../../move-if-change tmp-icache.h icache.h | |
101 | $(srcdir)/../../move-if-change tmp-icache.c icache.c | |
102 | $(srcdir)/../../move-if-change tmp-idecode.h idecode.h | |
103 | $(srcdir)/../../move-if-change tmp-idecode.c idecode.c | |
104 | $(srcdir)/../../move-if-change tmp-semantics.h semantics.h | |
105 | $(srcdir)/../../move-if-change tmp-semantics.c semantics.c | |
106 | $(srcdir)/../../move-if-change tmp-model.h model.h | |
107 | $(srcdir)/../../move-if-change tmp-model.c model.c | |
108 | $(srcdir)/../../move-if-change tmp-support.h support.h | |
109 | $(srcdir)/../../move-if-change tmp-support.c support.c | |
110 | $(srcdir)/../../move-if-change tmp-itable.h itable.h | |
111 | $(srcdir)/../../move-if-change tmp-itable.c itable.c | |
112 | touch tmp-igen | |
113 | ||
114 | ENGINE_H = \ | |
115 | sim-main.h \ | |
116 | $(srcdir)/../common/sim-basics.h \ | |
117 | config.h \ | |
118 | $(srcdir)/../common/sim-config.h \ | |
119 | $(srcdir)/../common/sim-inline.h \ | |
120 | $(srcdir)/../common/sim-types.h \ | |
121 | $(srcdir)/../common/sim-bits.h \ | |
122 | $(srcdir)/../common/sim-endian.h \ | |
d5e2c74e | 123 | $(srcdir)/../common/sim-options.h \ |
15c16493 AC |
124 | itable.h \ |
125 | idecode.h \ | |
126 | cpu.h \ | |
127 | alu.h \ | |
128 | $(srcdir)/../common/sim-alu.h \ | |
129 | $(srcdir)/../common/sim-core.h \ | |
130 | $(srcdir)/../common/sim-events.h \ | |
07b4c0a6 | 131 | $(srcdir)/../common/sim-fpu.h \ |
f03b093c | 132 | $(srcdir)/../common/sim-engine.h \ |
15c16493 AC |
133 | |
134 | idecode.o: $(ENGINE_H) | |
135 | semantics.o: $(ENGINE_H) | |
d5e2c74e | 136 | support.o: $(ENGINE_H) |
15c16493 AC |
137 | interp.o: interp.c $(ENGINE_H) |
138 | sim-calls.o: sim-calls.c $(ENGINE_H) | |
139 | cpu.o: cpu.c $(ENGINE_H) | |
381f42ef | 140 | misc.o: $(ENGINE_H) |