1 # Makefile template for Configure for the i960 simulator
2 # Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
3 # Contributed by Cygnus Support.
5 # This file is part of GDB, the GNU debugger.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along
18 # with this program; if not, write to the Free Software Foundation, Inc.,
19 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 ## COMMON_PRE_CONFIG_FRAG
23 I960_OBJS
= i960.o cpu.o decode.o sem.o model.o mloop.o i960-desc.o
25 CONFIG_DEVICES
= dv-sockser.o
29 $(SIM_NEW_COMMON_OBJS
) \
36 cgen-utils.o cgen-trace.o cgen-scache.o \
37 cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
43 # Extra headers included by sim-main.h.
45 $(CGEN_INCLUDE_DEPS
) \
46 arch.h cpuall.h i960-sim.h i960-desc.h i960-opc.h
51 SIM_EXTRA_CLEAN
= i960-clean
53 # This selects the i960 newlib/libgloss syscall definitions.
55 # ??? This affects what stuff gets included from ../common/nltvals.def.
56 # For now, we need SYS_exit because of traps.c. If we really need this,
57 # then we need to add i960 specific definitions to nltvals.def.
58 NL_TARGET
= -DNL_TARGET_i960
60 ## COMMON_POST_CONFIG_FRAG
64 sim-if.o
: sim-if.c
$(SIM_MAIN_DEPS
) $(srcdir)/..
/common
/sim-core.h
66 arch.o
: arch.c
$(SIM_MAIN_DEPS
)
68 traps.o
: traps.c targ-vals.h
$(SIM_MAIN_DEPS
)
69 devices.o
: devices.c
$(SIM_MAIN_DEPS
)
73 I960BASE_INCLUDE_DEPS
= \
74 $(CGEN_MAIN_CPU_DEPS
) \
77 i960.o
: i960.c
$(I960BASE_INCLUDE_DEPS
)
79 # FIXME: Use of `mono' is wip.
80 mloop.c eng.h
: stamp-mloop
81 stamp-mloop
: $(srcdir)/..
/common
/genmloop.sh mloop.in Makefile
82 $(SHELL
) $(srccom
)/genmloop.sh \
83 -mono
-fast
-pbb
-switch sem-switch.c \
84 -cpu i960base
-infile
$(srcdir)/mloop.in
85 $(SHELL
) $(srcroot
)/move-if-change eng.hin eng.h
86 $(SHELL
) $(srcroot
)/move-if-change mloop.cin mloop.c
88 # $(SHELL) $(srccom)/genmloop.sh \
89 # -mono -scache -fast i960base $(srcdir)/mloop.in \
90 # | sed -e 's/@cpu@/i960base/' -e 's/@CPU@/I960BASE/' >mloop.c
91 mloop.o
: mloop.c sem-switch.c
$(I960BASE_INCLUDE_DEPS
)
93 cpu.o
: cpu.c
$(I960BASE_INCLUDE_DEPS
)
94 decode.o
: decode.c
$(I960BASE_INCLUDE_DEPS
)
95 sem.o
: sem.c
$(I960BASE_INCLUDE_DEPS
)
96 model.o
: model.c
$(I960BASE_INCLUDE_DEPS
)
99 rm -f mloop.c eng.h stamp-mloop
101 rm -f stamp-arch stamp-cpu stamp-desc
103 # cgen support, enable with --enable-cgen-maint
105 # The following line is commented in or out depending upon --enable-cgen-maint.
106 @CGEN_MAINT@CGEN_MAINT
=
108 stamp-arch
: $(CGEN_READ_SCM
) $(CGEN_ARCH_SCM
) $(CGEN_CPU_DIR
)/i960.cpu
109 $(MAKE
) cgen-arch
$(CGEN_FLAGS_TO_PASS
) mach
=all \
110 archfile
=$(CGEN_CPU_DIR
)/i960.cpu \
111 FLAGS
="with-scache with-profile=fn"
113 arch.h arch.c cpuall.h
: $(CGEN_MAINT
) stamp-arch
115 stamp-cpu
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(CGEN_CPU_DIR
)/i960.cpu
116 $(MAKE
) cgen-cpu-decode
$(CGEN_FLAGS_TO_PASS
) \
117 cpu
=i960base mach
=i960
:ka_sa
,i960
:ca SUFFIX
= \
118 archfile
=$(CGEN_CPU_DIR
)/i960.cpu \
119 FLAGS
="with-scache with-profile=fn" \
120 EXTRAFILES
="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
122 cpu.h sem.c sem-switch.c model.c decode.c decode.h
: $(CGEN_MAINT
) stamp-cpu
124 stamp-desc
: $(CGEN_READ_SCM
) $(CGEN_DESC_SCM
) \
125 $(CGEN_CPU_DIR
)/sparc.cpu
$(CGEN_CPU_DIR
)/sparccom.cpu
$(CGEN_CPU_DIR
)/i960.cpu
$(CGEN_CPU_DIR
)/i960.cpu
126 $(MAKE
) cgen-desc
$(CGEN_FLAGS_TO_PASS
) \
128 archfile
=$(CGEN_CPU_DIR
)/i960.cpu
130 i960-desc.c i960-desc.h i960-opc.h
: $(CGEN_MAINT
) stamp-desc