aboutsummaryrefslogtreecommitdiff
path: root/sim/common/Make-common.in
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2000-08-21 15:52:39 +0000
committerFrank Ch. Eigler <fche@redhat.com>2000-08-21 15:52:39 +0000
commit604259a086894006eb6fd65142a26305858862e7 (patch)
treece09ab34acd3e2874640afedcc8bc89c32e10aa7 /sim/common/Make-common.in
parent9765193ec2250ebd086d8614342ae9ab95a4697c (diff)
downloadgdb-604259a086894006eb6fd65142a26305858862e7.zip
gdb-604259a086894006eb6fd65142a26305858862e7.tar.gz
gdb-604259a086894006eb6fd65142a26305858862e7.tar.bz2
* Contribute CGEN simulator build support code.
* Patch was posted by bje@redhat.com.
Diffstat (limited to 'sim/common/Make-common.in')
-rw-r--r--sim/common/Make-common.in52
1 files changed, 52 insertions, 0 deletions
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 7c25d6c..4ee4acb 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -654,4 +654,56 @@ stamp-h: config.in config.status
CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status
+# CGEN support
+
+CGENDIR = @cgendir@
+CGEN = `if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/guile; else echo guile ; fi`
+CGENFLAGS = -v
+srccgen = $(CGENDIR)
+
+CGEN_READ_SCM = ../../cgen/stamp-cgen $(srccgen)/sim.scm
+CGEN_ARCH_SCM = $(srccgen)/sim-arch.scm
+CGEN_CPU_SCM = $(srccgen)/sim-cpu.scm $(srccgen)/sim-model.scm
+CGEN_DECODE_SCM = $(srccgen)/sim-decode.scm
+CGEN_DESC_SCM = $(srccgen)/desc.scm $(srccgen)/desc-cpu.scm
+
+# Various choices for which cpu specific files to generate.
+CGEN_CPU_EXTR = -E tmp-ext.c1
+CGEN_CPU_READ = -R tmp-read.c1
+CGEN_CPU_WRITE = -W tmp-write.c1
+CGEN_CPU_SEM = -S tmp-sem.c1
+CGEN_CPU_SEMSW = -X tmp-semsw.c1
+
+CGEN_FLAGS_TO_PASS = \
+ CGEN=$(CGEN) \
+ CGENFLAGS="$(CGENFLAGS)"
+
+# We store the generated files in the source directory until we decide to
+# ship a Scheme interpreter with gdb/binutils. Maybe we never will.
+
+cgen-arch: force
+ $(SHELL) $(srccom)/cgen.sh arch $(srcdir) \
+ $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
+ $(arch) "$(FLAGS)" ignored $(mach) ignored ignored
+
+cgen-cpu: force
+ $(SHELL) $(srccom)/cgen.sh cpu $(srcdir) \
+ $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
+ $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" "$(EXTRAFILES)"
+
+cgen-decode: force
+ $(SHELL) $(srccom)/cgen.sh decode $(srcdir) \
+ $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
+ $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" ignored
+
+cgen-cpu-decode: force
+ $(SHELL) $(srccom)/cgen.sh cpu-decode $(srcdir) \
+ $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
+ $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" "$(EXTRAFILES)"
+
+cgen-desc: force
+ $(SHELL) $(srccom)/cgen.sh desc $(srcdir) \
+ $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
+ $(arch) "$(FLAGS)" $(cpu) $(mach) "$(SUFFIX)" ignored
+
## End COMMON_POST_CONFIG_FRAG