2003-01-04 Richard Sandiford <rsandifo@redhat.com>
[deliverable/binutils-gdb.git] / sim / mips / Makefile.in
index e0e9fafcafeaf718644713a6a6fd75e2cc64094b..72ec4ab6905f89da7223ab9e55139927211ee9b3 100644 (file)
@@ -33,6 +33,7 @@ SIM_M16_OBJ = \
        itable.o \
        m16run.o \
 
+SIM_MULTI_OBJ = itable.o @sim_multi_obj@
 
 MIPS_EXTRA_OBJS = @mips_extra_objs@
 MIPS_EXTRA_LIBS = @mips_extra_libs@
@@ -57,6 +58,7 @@ SIM_SUBTARGET=@SIM_SUBTARGET@
 SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
 
 SIM_EXTRA_CLEAN = clean-extra
+SIM_EXTRA_DISTCLEAN = distclean-extra
 
 SIM_EXTRA_ALL = $(SIM_@sim_gen@_ALL)
 
@@ -74,6 +76,8 @@ cp1.o: $(srcdir)/cp1.c config.h sim-main.h
 
 mdmx.o: $(srcdir)/mdmx.c $(srcdir)/sim-main.h
 
+multi-run.o: multi-include.h tmp-mach-multi
+
 ../igen/igen:
        cd ../igen && $(MAKE)
 
@@ -98,6 +102,7 @@ BUILT_SRC_FROM_GEN = \
 
 SIM_IGEN_ALL = tmp-igen
 SIM_M16_ALL = tmp-m16
+SIM_MULTI_ALL = tmp-multi
 
 $(BUILT_SRC_FROM_GEN): $(SIM_@sim_gen@_ALL)
 
@@ -291,10 +296,99 @@ tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
        touch tmp-m16
 
 
+BUILT_SRC_FROM_MULTI = @sim_multi_src@
+SIM_MULTI_IGEN_CONFIGS = @sim_multi_igen_configs@
+
+$(BUILT_SRC_FROM_MULTI): tmp-multi
+tmp-multi: tmp-mach-multi tmp-itable-multi tmp-run-multi targ-vals.h
+tmp-mach-multi: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
+       for t in $(SIM_MULTI_IGEN_CONFIGS); do \
+         p=`echo $${t} | sed -e 's/:.*//'` ; \
+         m=`echo $${t} | sed -e 's/.*:\(.*\):.*/\1/'` ; \
+         f=`echo $${t} | sed -e 's/.*://'` ; \
+         case $${p} in \
+           m16*) e="-B 16 -H 15 -o $(M16_DC) -F 16" ;; \
+           *) e="-B 32 -H 31 -o $(IGEN_DC) -F $${f}" ;; \
+         esac; \
+         ../igen/igen \
+               $(IGEN_TRACE) \
+               $${e} \
+               -I $(srcdir) \
+               -Werror \
+               -Wnodiscard \
+               -N 0 \
+               -M $${m} \
+               -G gen-direct-access \
+               -G gen-zero-r0 \
+               -i $(IGEN_INSN) \
+               -P $${p}_ \
+               -x \
+               -n $${p}_icache.h    -hc tmp-icache.h \
+               -n $${p}_icache.c    -c  tmp-icache.c \
+               -n $${p}_semantics.h -hs tmp-semantics.h \
+               -n $${p}_semantics.c -s  tmp-semantics.c \
+               -n $${p}_idecode.h   -hd tmp-idecode.h \
+               -n $${p}_idecode.c   -d  tmp-idecode.c \
+               -n $${p}_model.h     -hm tmp-model.h \
+               -n $${p}_model.c     -m  tmp-model.c \
+               -n $${p}_support.h   -hf tmp-support.h \
+               -n $${p}_support.c   -f  tmp-support.c \
+               -n $${p}_engine.h    -he tmp-engine.h \
+               -n $${p}_engine.c    -e  tmp-engine.c \
+               ; \
+         $(srcdir)/../../move-if-change tmp-icache.h $${p}_icache.h ; \
+         $(srcdir)/../../move-if-change tmp-icache.c $${p}_icache.c ; \
+         $(srcdir)/../../move-if-change tmp-idecode.h $${p}_idecode.h ; \
+         $(srcdir)/../../move-if-change tmp-idecode.c $${p}_idecode.c ; \
+         $(srcdir)/../../move-if-change tmp-semantics.h $${p}_semantics.h ; \
+         $(srcdir)/../../move-if-change tmp-semantics.c $${p}_semantics.c ; \
+         $(srcdir)/../../move-if-change tmp-model.h $${p}_model.h ; \
+         $(srcdir)/../../move-if-change tmp-model.c $${p}_model.c ; \
+         $(srcdir)/../../move-if-change tmp-support.h $${p}_support.h ; \
+         $(srcdir)/../../move-if-change tmp-support.c $${p}_support.c ; \
+         $(srcdir)/../../move-if-change tmp-engine.h $${p}_engine.h ; \
+         $(srcdir)/../../move-if-change tmp-engine.c $${p}_engine.c ; \
+       done
+       touch tmp-mach-multi
+tmp-itable-multi: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
+       ../igen/igen \
+               $(IGEN_TRACE) \
+               -I $(srcdir) \
+               -Werror \
+               -Wnodiscard \
+               -Wnowidth \
+               -N 0 \
+               @sim_multi_flags@ \
+               -G gen-direct-access \
+               -G gen-zero-r0 \
+               -i $(IGEN_INSN) \
+               -n itable.h    -ht tmp-itable.h \
+               -n itable.c    -t  tmp-itable.c \
+               #
+       $(srcdir)/../../move-if-change tmp-itable.h itable.h
+       $(srcdir)/../../move-if-change tmp-itable.c itable.c
+       touch tmp-itable-multi
+tmp-run-multi: $(srcdir)/m16run.c
+       for t in $(SIM_MULTI_IGEN_CONFIGS); do \
+         case $${t} in \
+           *:*mips16*:*) \
+             m=`echo $${t} | sed -e 's/^m16//' -e 's/:.*//'`; \
+             sed <  $(srcdir)/m16run.c > tmp-run \
+                   -e "s/^sim_/m16$${m}_/" \
+                   -e "s/m16_/m16$${m}_/" \
+                   -e "s/m32_/m32$${m}_/" ; \
+             $(srcdir)/../../move-if-change tmp-run m16$${m}_run.c ; \
+         esac \
+       done
+       touch tmp-run-multi
+
 clean-extra:
        rm -f $(BUILT_SRC_FROM_GEN)
        rm -f $(BUILT_SRC_FROM_IGEN)
        rm -f $(BUILT_SRC_FROM_M16)
+       rm -f $(BUILT_SRC_FROM_MULTI)
        rm -f tmp-*
        rm -f m16*.o m32*.o itable*.o
 
+distclean-extra:
+       rm -f multi-include.h multi-run.c
This page took 0.023736 seconds and 4 git commands to generate.