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