+Wed Jan 29 12:32:41 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (sim_callback): If the gdb is post 4.16, configure
+ callback support from the common directory.
+ * configure: Regenerate.
+
+ * Makefile.in (BUILT_SRC_WO_CONFIG): Add targ-vals.{h,def} and
+ targ-map.c.
+ (GDB_OBJ): Add callback support configured in.
+ (gentmap,targ-vals.def): Build from common directory.
+ (targ-vals.h,targ-map.c): Build by running gentmap.
+ (callback.o): Build from source in common directory.
+ (targ-map.o): Add dependency.
+ (clean): Remove gentmap.
+
Thu Jan 23 09:07:26 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
* hw_trace.c (hw_trace_init_data): Delete. The trace options need
support.h support.c \
pk.h \
hw.h hw.c \
- filter_host.c
+ filter_host.c \
+ targ-vals.h targ-map.c targ-vals.def
BUILT_SRC = \
$(BUILT_SRC_WO_CONFIG) \
options.o
-GDB_OBJ = sim_calls.o
+GDB_OBJ = sim_calls.o @sim_callback@
HW_SRC = @sim_hw_src@
HW_OBJ = @sim_hw_obj@
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: ../common/nltvals.def
+ rm -f targ-vals.def
+ ln -s $< targ-vals.def || cp $< 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
+ $(CC) -c $(STD_CFLAGS) $<
+
+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)"' $<
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
sim_devzero=""
fi
+echo $ac_n "checking for common simulator directory""... $ac_c" 1>&6
+echo "configure:2835: checking for common simulator directory" >&5
+if test -e "${srcdir}/../common/callback.c"; then
+ echo "$ac_t""yes" 1>&6
+ sim_callback="callback.o targ-map.o"
+else
+ echo "$ac_t""no" 1>&6
+ sim_callback=""
+fi
+
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2842: checking for $ac_word" >&5
+echo "configure:2852: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
+
trap '' 1 2 15
s%@sim_stdio@%$sim_stdio%g
s%@sim_termio@%$sim_termio%g
s%@sim_devzero@%$sim_devzero%g
+s%@sim_callback@%$sim_callback%g
CEOF
EOF
sim_devzero=""
fi
+dnl Figure out if we are in the new Cygnus tree with a common directory or not
+AC_MSG_CHECKING(for common simulator directory)
+if test -e "${srcdir}/../common/callback.c"; then
+ AC_MSG_RESULT(yes)
+ sim_callback="callback.o targ-map.o"
+else
+ AC_MSG_RESULT(no)
+ sim_callback=""
+fi
+
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(CFLAGS)
AC_SUBST(HDEFINES)
AC_SUBST(sim_stdio)
AC_SUBST(sim_termio)
AC_SUBST(sim_devzero)
+AC_SUBST(sim_callback)
AC_OUTPUT(Makefile,
[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])