This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / sim / ppc / Makefile.in
index b14084e189b3f1925421db936dbce327fbbd3305..17513440936444d732ffabb1ccf960849d216eed 100644 (file)
@@ -50,7 +50,7 @@ includedir = @includedir@
 
 SHELL = /bin/sh
 
-INSTALL = $(srcroot)/install.sh -c
+INSTALL = $(srcroot)/install-sh -c
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
@@ -119,6 +119,7 @@ BUILD_LDFLAGS       =
 
 CONFIG_FILE = @sim_config@
 IGEN_OPCODE_RULES = @sim_opcode@
+IGEN_DECODE_MECHANISM = @sim_decode_mechanism@
 IGEN_DUPLICATE = @sim_dup@
 IGEN_JUMP = @sim_jump@
 IGEN_FILTER = @sim_filter@
@@ -129,7 +130,14 @@ DGEN_FLAGS = @sim_switch@
 
 HDEFINES = @HDEFINES@
 TDEFINES =
-IGEN_FLAGS = $(IGEN_DUPLICATE) $(IGEN_JUMP) $(IGEN_FILTER) $(IGEN_ICACHE) $(IGEN_SMP) $(IGEN_LINE_NR)
+IGEN_FLAGS = \
+       $(IGEN_DECODE_MECHANISM) \
+       $(IGEN_DUPLICATE) \
+       $(IGEN_JUMP) \
+       $(IGEN_FILTER) \
+       $(IGEN_ICACHE) \
+       $(IGEN_SMP) \
+       $(IGEN_LINE_NR)
 
 .NOEXPORT:
 MAKEOVERRIDES=
@@ -222,7 +230,8 @@ BUILT_SRC_WO_CONFIG = \
        support.h support.c \
        pk.h \
        hw.h hw.c \
-       filter_host.c
+       filter_host.c \
+       @sim_targ_vals@
 
 BUILT_SRC = \
        $(BUILT_SRC_WO_CONFIG) \
@@ -298,7 +307,7 @@ LIB_OBJ = \
        options.o
 
 
-GDB_OBJ = sim_calls.o 
+GDB_OBJ = sim_calls.o @sim_callback@
 
 HW_SRC = @sim_hw_src@
 HW_OBJ = @sim_hw_obj@
@@ -314,7 +323,7 @@ run: psim
        rm -f run
        ln psim run
 
-$(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk $(LIB_OBJ) $(GDB_OBJ)
+$(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
        rm -f $(TARGETLIB)
        $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
        $(RANLIB) $(TARGETLIB)
@@ -383,13 +392,40 @@ itable.o: itable.c itable.h
 
 mon.o: mon.c $(CPU_H)
 
+# GDB after 4.16 expects the default_callback structure to be setup.
+# As a kludge, build the common stuff here for now.
+gentmap: ../common/gentmap.c Makefile targ-vals.def
+       $(CC_FOR_BUILD) $(BUILD_FLAGS) -I. -I../common -I$(srcdir)/../common -o gentmap $< $(BUILD_LIBS)
+
+targ-vals.def: $(srcdir)/../common/nltvals.def
+       rm -f targ-vals.def tmp-def
+       cat $(srcdir)/../common/nltvals.def > tmp-vals.def
+       $(srcdir)/../../move-if-change tmp-vals.def targ-vals.def
+
+targ-vals.h: Makefile gentmap $(srcdir)/../../move-if-change
+       rm -f tmp-vals.h
+       ./gentmap -h > tmp-vals.h
+       $(srcdir)/../../move-if-change tmp-vals.h targ-vals.h
+
+targ-map.c: Makefile gentmap $(srcdir)/../../move-if-change
+       rm -f tmp-map.c
+       ./gentmap -c > tmp-map.c
+       $(srcdir)/../../move-if-change tmp-map.c targ-map.c
+
+callback.o: ../common/callback.c targ-vals.h config.h
+       $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $<
+
+targ-map.o: targ-map.c targ-vals.h
+
 # Rebuild options whenever something changes so the date/time is up to date.
 options.o: options.c $(BASICS_H) $(CPU_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile defines.h
        $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $<
 
-defines.h: config.h Makefile
-       rm -f defines.h
-       sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > defines.h
+tmp-defines: config.h Makefile
+       sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > tmp-defines.h
+       $(srcdir)/../../move-if-change tmp-defines.h defines.h
+       touch tmp-defines
+
 #
 # Rules to create the built c source code files
 #
@@ -515,14 +551,27 @@ misc.o: misc.c misc.h filter_filename.h
 
 # real hardware
 tmp-hw: Makefile $(HW_SRC) $(srcdir)/../../move-if-change
-       for hw in $(HW_SRC) ; do echo $$hw ; done \
-       | cat -n | sort +1 -u | sort -n \
+       # The first for loop is to remove duplicates.
+       f=""; \
+       for i in $(HW_SRC) ; do \
+         case " $$f " in \
+           *" $$i "*) ;; \
+           *) f="$$f $$i" ;; \
+         esac ; \
+       done ; \
+       for hw in $$f ; do echo $$hw ; done \
        | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
                -e 's/^/extern const device_descriptor /' \
                -e 's/$$/_device_descriptor\[\];/' \
                > tmp-hw.h
-       for hw in $(HW_SRC) ; do echo $$hw ; done \
-       | cat -n | sort +1 -u | sort -n \
+       f=""; \
+       for i in $(HW_SRC) ; do \
+         case " $$f " in \
+           *" $$i "*) ;; \
+           *) f="$$f $$i" ;; \
+         esac ; \
+       done ; \
+       for hw in $$f ; do echo $$hw ; done \
        | sed -e 's/^.*\(hw_.*\)\.c/\1/' \
                -e 's/^/    /' \
                -e 's/$$/_device_descriptor,/' \
@@ -553,8 +602,15 @@ hw_vm.o: hw_vm.c $(DEVICE_TABLE_H)
 
 # real packages
 tmp-pk: Makefile $(PACKAGE_SRC) $(srcdir)/../../move-if-change
-       for pk in $(PACKAGE_SRC) ; do echo $$pk ; done \
-       | cat -n | sort +1 -u | sort -n \
+       # The first for loop is to remove duplicates.
+       f=""; \
+       for i in $(PACKAGE_SRC) ; do \
+         case " $$f " in \
+           *" $$i "*) ;; \
+           *) f="$$f $$i" ;; \
+         esac ; \
+       done ; \
+       for pk in $$f ; do echo $$pk ; done \
        | sed -e 's/^.*pk_\(.*\)\.c/\1/' \
                -e 's/^/extern package_create_instance_callback pk_/' \
                -e 's/$$/_create_instance;/' \
@@ -573,7 +629,7 @@ TAGS: $(BUILT_SRC)
        etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC)
 
 clean mostlyclean:
-       rm -f tmp-* *.[oasi] core psim run igen dgen $(BUILT_SRC_WO_CONFIG)
+       rm -f tmp-* *.[oasi] core psim run igen dgen $(BUILT_SRC_WO_CONFIG) gentmap
 
 distclean realclean: clean
        rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
This page took 0.065053 seconds and 4 git commands to generate.