1 # Makefile template for Configure for the SH64 simulator
2 # Copyright (C) 2000-2015 Free Software Foundation, Inc.
3 # Contributed by Red Hat, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 ## COMMON_PRE_CONFIG_FRAG
20 SH64_OBJS
= sh64.o cpu.o sh-desc.o \
21 decode-compact.o sem-compact.o mloop-compact.o \
22 decode-media.o sem-media.o mloop-media.o
25 $(SIM_NEW_COMMON_OBJS
) \
31 cgen-utils.o cgen-trace.o cgen-scache.o \
32 cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
36 # Extra headers included by sim-main.h.
38 $(CGEN_INCLUDE_DEPS
) \
39 arch.h cpuall.h sh64-sim.h sh-desc.h sh-opc.h
43 SIM_EXTRA_CLEAN
= sh64-clean
45 ## COMMON_POST_CONFIG_FRAG
49 sim-if.o
: sim-if.c
$(SIM_MAIN_DEPS
) $(srcdir)/..
/common
/sim-core.h
51 arch.o
: arch.c
$(SIM_MAIN_DEPS
)
53 sh-desc.o
: sh-desc.c
$(SIM_MAIN_DEPS
)
55 devices.o
: devices.c
$(SIM_MAIN_DEPS
)
60 $(CGEN_MAIN_CPU_DEPS
) \
62 decode-compact.h eng-compact.h defs-compact.h \
63 decode-media.h eng-media.h defs-media.h
65 sh64.o
: sh64.c
$(SH64_INCLUDE_DEPS
)
67 mloop-compact.o
: mloop-compact.c sem-compact-switch.c
$(SH64_INCLUDE_DEPS
)
68 $(CC
) -c
$(srcdir)/mloop-compact.c
$(ALL_CFLAGS
) -DWANT_ISA_COMPACT
70 mloop-media.o
: mloop-media.c sem-media-switch.c
$(SH64_INCLUDE_DEPS
)
71 $(CC
) -c
$(srcdir)/mloop-media.c
$(ALL_CFLAGS
) -DWANT_ISA_MEDIA
73 cpu.o
: $(srcdir)/cpu.c
$(SH64_INCLUDE_DEPS
)
75 decode-compact.o
: decode-compact.c
$(SH64_INCLUDE_DEPS
)
76 $(CC
) -c
$(srcdir)/decode-compact.c
$(ALL_CFLAGS
) -DWANT_ISA_COMPACT
78 sem-compact.o
: sem-compact.c
$(SH64_INCLUDE_DEPS
)
79 $(CC
) -c
$(srcdir)/sem-compact.c
$(ALL_CFLAGS
) -DWANT_ISA_COMPACT
81 decode-media.o
: decode-media.c
$(SH64_INCLUDE_DEPS
)
82 $(CC
) -c
$(srcdir)/decode-media.c
$(ALL_CFLAGS
) -DWANT_ISA_MEDIA
84 sem-media.o
: sem-media.c
$(SH64_INCLUDE_DEPS
)
85 $(CC
) -c
$(srcdir)/sem-media.c
$(ALL_CFLAGS
) -DWANT_ISA_MEDIA
89 rm -f stamp-defs-
{compact
,media
}
90 rm -f stamp-arch stamp-desc stamp-cpu stamp-decode-
{compact
,media
}
92 # cgen support, enable with --enable-cgen-maint
94 # The following line is commented in or out depending upon --enable-cgen-maint.
95 @CGEN_MAINT@CGEN_MAINT
=
97 # Utility rules for humans.
98 .PHONY
: stamp-all stamp-decode stamp-defs
99 stamp-all
: stamp-arch stamp-desc stamp-cpu stamp-decode stamp-defs
100 stamp-decode
: stamp-decode-compact stamp-decode-media
101 stamp-defs
: stamp-defs-compact stamp-defs-media
103 # NOTE: Generated source files are specified as full paths,
104 # e.g. $(srcdir)/arch.c, because make may decide the files live
105 # in objdir otherwise.
107 stamp-arch
: $(CGEN_READ_SCM
) $(CGEN_ARCH_SCM
) $(CGEN_CPU_DIR
)/sh.cpu
$(CGEN_CPU_DIR
)/sh.opc
$(CGEN_CPU_DIR
)/sh64-media.cpu
$(CGEN_CPU_DIR
)/sh64-compact.cpu
$(CGEN_CPU_DIR
)/sh-sim.cpu Makefile
108 $(MAKE
) cgen-arch
$(CGEN_FLAGS_TO_PASS
) mach
=all isa
=compact
,media archfile
=$(CGEN_CPU_DIR
)/sh.cpu \
111 $(srcdir)/arch.h
$(srcdir)/arch.c
$(srcdir)/cpuall.h
: $(CGEN_MAINT
) stamp-arch
114 stamp-desc
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_CPU_DIR
)/sh.cpu
$(CGEN_CPU_DIR
)/sh.opc
$(CGEN_CPU_DIR
)/sh64-compact.cpu
$(CGEN_CPU_DIR
)/sh64-media.cpu
$(CGEN_CPU_DIR
)/sh-sim.cpu Makefile
115 $(MAKE
) cgen-desc
$(CGEN_FLAGS_TO_PASS
) cpu
=sh64 mach
=all isa
=compact
,media archfile
=$(CGEN_CPU_DIR
)/sh.cpu
117 $(srcdir)/sh-desc.h
$(srcdir)/sh-desc.c
$(srcdir)/sh-opc.h
: $(CGEN_MAINT
) stamp-desc
120 stamp-cpu
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_CPU_DIR
)/sh.cpu
$(CGEN_CPU_DIR
)/sh.opc
$(CGEN_CPU_DIR
)/sh64-compact.cpu
$(CGEN_CPU_DIR
)/sh64-media.cpu
$(CGEN_CPU_DIR
)/sh-sim.cpu Makefile
121 $(MAKE
) cgen-cpu
$(CGEN_FLAGS_TO_PASS
) \
122 cpu
=sh64 mach
=sh4
,sh5 isa
=compact
,media FLAGS
="with-multiple-isa with-scache" archfile
=$(CGEN_CPU_DIR
)/sh.cpu
123 rm -f
$(srcdir)/model.c
125 $(srcdir)/cpu.h
$(srcdir)/cpu.c
: $(CGEN_MAINT
) stamp-cpu
128 stamp-defs-compact
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_CPU_DIR
)/sh.cpu
$(CGEN_CPU_DIR
)/sh.opc
$(CGEN_CPU_DIR
)/sh64-compact.cpu
$(CGEN_CPU_DIR
)/sh-sim.cpu Makefile
129 $(MAKE
) cgen-defs
$(CGEN_FLAGS_TO_PASS
) \
130 cpu
=sh64 mach
=sh5 isa
=compact FLAGS
="with-scache" SUFFIX
="-compact" archfile
=$(CGEN_CPU_DIR
)/sh.cpu
132 $(srcdir)/defs-compact.h
: $(CGEN_MAINT
) stamp-defs-compact
135 stamp-defs-media
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_CPU_DIR
)/sh.cpu
$(CGEN_CPU_DIR
)/sh.opc
$(CGEN_CPU_DIR
)/sh64-media.cpu
$(CGEN_CPU_DIR
)/sh-sim.cpu Makefile
136 $(MAKE
) cgen-defs
$(CGEN_FLAGS_TO_PASS
) \
137 cpu
=sh64 mach
=sh5 isa
=media FLAGS
="with-scache" SUFFIX
="-media" archfile
=$(CGEN_CPU_DIR
)/sh.cpu
139 $(srcdir)/defs-media.h
: $(CGEN_MAINT
) stamp-defs-media
141 stamp-decode-compact
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(CGEN_CPU_DIR
)/sh.cpu
$(CGEN_CPU_DIR
)/sh.opc
$(CGEN_CPU_DIR
)/sh64-compact.cpu
$(CGEN_CPU_DIR
)/sh-sim.cpu Makefile
142 $(MAKE
) cgen-decode
$(CGEN_FLAGS_TO_PASS
) \
143 cpu
=sh64 mach
=sh5 isa
=compact FLAGS
="with-scache" SUFFIX
="-compact" EXTRAFILES
="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)" \
144 archfile
=$(CGEN_CPU_DIR
)/sh.cpu
146 $(srcdir)/sem-compact.c
$(srcdir)/sem-compact-switch.c
$(srcdir)/decode-compact.c
$(srcdir)/decode-compact.h
: $(CGEN_MAINT
) stamp-decode-compact
149 stamp-decode-media
: $(CGEN_READ_SCM
) $(CGEN_CPU_SCM
) $(CGEN_DECODE_SCM
) $(CGEN_CPU_DIR
)/sh.cpu
$(CGEN_CPU_DIR
)/sh.opc
$(CGEN_CPU_DIR
)/sh64-media.cpu
$(CGEN_CPU_DIR
)/sh-sim.cpu Makefile
150 $(MAKE
) cgen-decode
$(CGEN_FLAGS_TO_PASS
) \
151 cpu
=sh64 mach
=sh5 isa
=media FLAGS
="with-scache" SUFFIX
="-media" EXTRAFILES
="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)" \
152 archfile
=$(CGEN_CPU_DIR
)/sh.cpu
154 $(srcdir)/sem-media.c
$(srcdir)/sem-media-switch.c
$(srcdir)/decode-media.c
$(srcdir)/decode-media.h
: $(CGEN_MAINT
) stamp-decode-media