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