aboutsummaryrefslogtreecommitdiff
path: root/sim/common/Make-common.in
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1997-11-17 23:09:08 +0000
committerDoug Evans <dje@google.com>1997-11-17 23:09:08 +0000
commitf7abc1ca0cbae80f1910de13c969816d14d8acb2 (patch)
tree6007dc93c2633dd0a79e3286e96b2c6f31077acb /sim/common/Make-common.in
parent891703e5e87f5868b72d95c889cb6b6f27089014 (diff)
downloadgdb-f7abc1ca0cbae80f1910de13c969816d14d8acb2.zip
gdb-f7abc1ca0cbae80f1910de13c969816d14d8acb2.tar.gz
gdb-f7abc1ca0cbae80f1910de13c969816d14d8acb2.tar.bz2
* Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o. (gentmap): Pass $(NL_TARGET) to $(CC). (syscall.o): Add rule for. (sim_main_headers): Add $(SIM_EXTRA_DEPS). (sim-bits.o): Depend on $(sim-n-bits_h). (sim-load.o): Depend on callback.h. * Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to cgen-mem.h, sem-ops.h renamed to cgen-ops.h. * cgen-mem.h, cgen-ops.h: New files. * aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no". * Makefile.in (nltvals.def): Depend on gennltvals.sh. Rewrite build rule. * callback.c: #include string.h or strings.h. #include sys/types.h and sys/stat.h. (cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare. (enosys): New function. (os_get_errno,os_open): Update. (os_stat,os_fstat): New functions. (os_init): Initialize syscall_map, errno_map, open_map. (default_callback): Add entries for os_stat, os_fstat, syscall_map, errno_map, open_map, signal_map, stat_map. (cb_read_target_syscall_maps): New function. (cb_target_to_host_syscall): New function. (cb_host_to_target_errno): Renamed from host_to_target_errno. (cb_target_to_host_open): Renamed from target_to_host_open. (store): New function. (cb_host_to_target_stat): New function. * gentmap.c (sys_tdefs): New global. (gen_targ_vals_h): Output target syscall numbers. (gen_targ_map_c): Update. Output target syscall translation map. * gentvals.sh: New first argument `target'. Preface table with #ifdef NL_TARGET_$target if non-null target passed. * gennltvals.sh: New file. * nltvals.def: Regenerated.
Diffstat (limited to 'sim/common/Make-common.in')
-rw-r--r--sim/common/Make-common.in82
1 files changed, 42 insertions, 40 deletions
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index f2a289f..bb04b97 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -97,6 +97,8 @@ AR_FLAGS = rc
RANLIB = @RANLIB@
MAKEINFO = makeinfo
+DEP = $(srcroot)/mkdep
+
# Each simulator's Makefile.in defines one or more of these variables
# to override our settings as necessary. There is no need to define these
# in the simulator's Makefile.in if one is using the default value. In fact
@@ -158,6 +160,8 @@ CSEARCH = -I. -I$(srcdir) -I../common -I$(srcdir)/../common \
ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(CFLAGS)
BUILD_CFLAGS = -g -O $(CSEARCH)
+COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH)
+
LIBIBERTY_LIB = ../../libiberty/libiberty.a
BFD_LIB = ../../bfd/libbfd.a
OPCODES_LIB = ../../opcodes/libopcodes.a
@@ -167,7 +171,7 @@ LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBIBERTY_LIB) \
EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBIBERTY_LIB) \
$(CONFIG_LIBS) $(SIM_EXTRA_LIBS)
-LIB_OBJS = callback.o targ-map.o $(SIM_OBJS)
+LIB_OBJS = callback.o syscall.o targ-map.o $(SIM_OBJS)
all: $(SIM_EXTRA_ALL) libsim.a run
@@ -193,10 +197,14 @@ callback.o: $(srcdir)/../common/callback.c config.h tconfig.h \
$(srcroot)/include/callback.h targ-vals.h
$(CC) -c $(srcdir)/../common/callback.c $(ALL_CFLAGS)
+syscall.o: $(srcdir)/../common/syscall.c config.h tconfig.h \
+ $(srcroot)/include/callback.h targ-vals.h
+ $(CC) -c $(srcdir)/../common/syscall.c $(ALL_CFLAGS)
+
targ-map.o: targ-map.c targ-vals.h
gentmap: Makefile $(srcdir)/../common/gentmap.c targ-vals.def
- $(CC_FOR_BUILD) $(srcdir)/../common/gentmap.c -o gentmap $(BUILD_CFLAGS)
+ $(CC_FOR_BUILD) $(srcdir)/../common/gentmap.c -o gentmap $(BUILD_CFLAGS) $(NL_TARGET)
targ-vals.h: gentmap
rm -f targ-vals.h
@@ -226,7 +234,8 @@ sim_main_headers = \
$(srcdir)/../common/sim-events.h \
$(srcdir)/../common/sim-watch.h \
$(srcdir)/../common/sim-assert.h \
- tconfig.h
+ tconfig.h \
+ $(SIM_EXTRA_DEPS)
sim-assert_h = $(srcdir)/../common/sim-assert.h
sim-endian_h = $(srcdir)/../common/sim-endian.h
@@ -250,11 +259,11 @@ BUILT_SRC_FROM_COMMON= \
sim-inline.c
sim-abort.o: $(srcdir)/../common/sim-abort.c \
- $(SIM_EXTRA_DEPS)
+ $(SIM_EXTRA_DEPS)
$(CC) -c $(srcdir)/../common/sim-abort.c $(ALL_CFLAGS)
sim-bits.o: $(srcdir)/../common/sim-bits.c $(sim-bits_h) $(sim-n-bits_h) \
- $(SIM_EXTRA_DEPS)
+ $(SIM_EXTRA_DEPS)
$(CC) -c $(srcdir)/../common/sim-bits.c $(ALL_CFLAGS)
sim-config.o: $(srcdir)/../common/sim-config.c $(sim-config_h) \
@@ -262,31 +271,30 @@ sim-config.o: $(srcdir)/../common/sim-config.c $(sim-config_h) \
$(CC) -c $(srcdir)/../common/sim-config.c $(ALL_CFLAGS)
sim-core.o: $(srcdir)/../common/sim-core.c $(sim-core_h) $(sim-n-core_h) \
- $(SIM_EXTRA_DEPS)
+ $(SIM_EXTRA_DEPS)
$(CC) -c $(srcdir)/../common/sim-core.c $(ALL_CFLAGS)
sim-endian.o: $(srcdir)/../common/sim-endian.c $(sim-endian_h) $(sim-n-endian_h) \
- $(SIM_EXTRA_DEPS)
+ $(SIM_EXTRA_DEPS)
$(CC) -c $(srcdir)/../common/sim-endian.c $(ALL_CFLAGS)
-sim-engine.o: $(srcdir)/../common/sim-engine.c $(sim_main_headers) $(sim-engine_h) \
- $(SIM_EXTRA_DEPS)
+sim-engine.o: $(srcdir)/../common/sim-engine.c $(sim_main_headers) $(sim-engine_h)
$(CC) -c $(srcdir)/../common/sim-engine.c $(ALL_CFLAGS)
sim-events.o: $(srcdir)/../common/sim-events.c $(sim-events_h) \
- $(SIM_EXTRA_DEPS)
+ $(SIM_EXTRA_DEPS)
$(CC) -c $(srcdir)/../common/sim-events.c $(ALL_CFLAGS)
sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(sim-fpu_h) \
- $(SIM_EXTRA_DEPS)
+ $(SIM_EXTRA_DEPS)
$(CC) -c $(srcdir)/../common/sim-fpu.c $(ALL_CFLAGS)
sim-hload.o: $(srcdir)/../common/sim-hload.c $(sim-assert_h) \
- $(SIM_EXTRA_DEPS)
+ $(SIM_EXTRA_DEPS)
$(CC) -c $(srcdir)/../common/sim-hload.c $(ALL_CFLAGS)
sim-hrw.o: $(srcdir)/../common/sim-hrw.c $(sim-assert_h) \
- $(SIM_EXTRA_DEPS)
+ $(SIM_EXTRA_DEPS)
$(CC) -c $(srcdir)/../common/sim-hrw.c $(ALL_CFLAGS)
sim-inline.c: $(srcdir)/../common/sim-inline.c
@@ -295,63 +303,56 @@ sim-inline.c: $(srcdir)/../common/sim-inline.c
cat $(srcdir)/../common/$@ >> tmp-$@
$(srcdir)/../../move-if-change tmp-$@ $@
-sim-io.o: $(srcdir)/../common/sim-io.c $(sim_main_headers) $(sim-io_h) \
- $(SIM_EXTRA_DEPS)
+sim-io.o: $(srcdir)/../common/sim-io.c $(sim_main_headers) $(sim-io_h)
$(CC) -c $(srcdir)/../common/sim-io.c $(ALL_CFLAGS)
sim-memopt.o: $(srcdir)/../common/sim-memopt.c $(sim_main_headers) \
- $(sim-io_h) $(SIM_EXTRA_DEPS)
+ $(sim-io_h)
$(CC) -c $(srcdir)/../common/sim-memopt.c $(ALL_CFLAGS)
sim-module.o: $(srcdir)/../common/sim-module.c $(sim_main_headers) \
- $(sim-io_h) $(SIM_EXTRA_DEPS)
+ $(sim-io_h)
$(CC) -c $(srcdir)/../common/sim-module.c $(ALL_CFLAGS)
sim-options.o: $(srcdir)/../common/sim-options.c $(sim_main_headers) \
- $(sim-options_h) $(sim-io_h) $(SIM_EXTRA_DEPS)
+ $(sim-options_h) $(sim-io_h)
$(CC) -c $(srcdir)/../common/sim-options.c $(ALL_CFLAGS)
-sim-reason.o: $(srcdir)/../common/sim-reason.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS)
+sim-reason.o: $(srcdir)/../common/sim-reason.c $(sim_main_headers)
$(CC) -c $(srcdir)/../common/sim-reason.c $(ALL_CFLAGS)
-sim-resume.o: $(srcdir)/../common/sim-resume.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS)
+sim-resume.o: $(srcdir)/../common/sim-resume.c $(sim_main_headers)
$(CC) -c $(srcdir)/../common/sim-resume.c $(ALL_CFLAGS)
-sim-run.o: $(srcdir)/../common/sim-run.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS)
+sim-run.o: $(srcdir)/../common/sim-run.c $(sim_main_headers)
$(CC) -c $(srcdir)/../common/sim-run.c $(ALL_CFLAGS)
-sim-stop.o: $(srcdir)/../common/sim-stop.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS)
+sim-stop.o: $(srcdir)/../common/sim-stop.c $(sim_main_headers)
$(CC) -c $(srcdir)/../common/sim-stop.c $(ALL_CFLAGS)
sim-trace.o: $(srcdir)/../common/sim-trace.c $(sim_main_headers) \
- $(sim-options_h) $(sim-io_h) $(SIM_EXTRA_DEPS)
+ $(sim-options_h) $(sim-io_h)
$(CC) -c $(srcdir)/../common/sim-trace.c $(ALL_CFLAGS)
sim-profile.o: $(srcdir)/../common/sim-profile.c $(sim_main_headers) \
- $(sim-options_h) $(sim-io_h) $(SIM_EXTRA_DEPS)
+ $(sim-options_h) $(sim-io_h)
$(CC) -c $(srcdir)/../common/sim-profile.c $(ALL_CFLAGS)
sim-model.o: $(srcdir)/../common/sim-model.c $(sim_main_headers) \
- $(sim-io_h) $(SIM_EXTRA_DEPS)
+ $(sim-io_h)
$(CC) -c $(srcdir)/../common/sim-model.c $(ALL_CFLAGS)
-sim-utils.o: $(srcdir)/../common/sim-utils.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS)
+sim-utils.o: $(srcdir)/../common/sim-utils.c $(sim_main_headers)
$(CC) -c $(srcdir)/../common/sim-utils.c $(ALL_CFLAGS)
-sim-watch.o: $(srcdir)/../common/sim-watch.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS)
+sim-watch.o: $(srcdir)/../common/sim-watch.c $(sim_main_headers)
$(CC) -c $(srcdir)/../common/sim-watch.c $(ALL_CFLAGS)
-sim-load.o: $(srcdir)/../common/sim-load.c
+sim-load.o: $(srcdir)/../common/sim-load.c $(srcroot)/include/callback.h
$(CC) -c $(srcdir)/../common/sim-load.c $(ALL_CFLAGS)
sim-break.o: $(srcdir)/../common/sim-break.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS) $(sim_break_h)
+ $(sim_break_h)
$(CC) -c $(srcdir)/../common/sim-break.c $(ALL_CFLAGS)
nrun.o: $(srcdir)/../common/nrun.c config.h tconfig.h \
@@ -361,19 +362,20 @@ nrun.o: $(srcdir)/../common/nrun.c config.h tconfig.h \
# CGEN support.
cgen-run.o: $(srcdir)/../common/cgen-run.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS)
+ $(srcdir)/../common/cgen-mem.h $(srcdir)/../common/cgen-ops.h \
+ $(srcdir)/../common/cgen-scache.h
$(CC) -c $(srcdir)/../common/cgen-run.c $(ALL_CFLAGS)
cgen-scache.o: $(srcdir)/../common/cgen-scache.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS) $(srcdir)/../common/cgen-scache.h
+ $(srcdir)/../common/cgen-scache.h
$(CC) -c $(srcdir)/../common/cgen-scache.c $(ALL_CFLAGS)
cgen-trace.o: $(srcdir)/../common/cgen-trace.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS) $(srcdir)/../common/cgen-trace.h
+ $(srcdir)/../common/cgen-trace.h
$(CC) -c $(srcdir)/../common/cgen-trace.c $(ALL_CFLAGS)
cgen-utils.o: $(srcdir)/../common/cgen-utils.c $(sim_main_headers) \
- $(SIM_EXTRA_DEPS) mem-ops.h sem-ops.h
+ $(srcdir)/../common/cgen-mem.h $(srcdir)/../common/cgen-ops.h
$(CC) -c $(srcdir)/../common/cgen-utils.c $(ALL_CFLAGS)
# Support targets.
@@ -405,7 +407,7 @@ clean: $(SIM_EXTRA_CLEAN)
rm -f *.[oa] *~ core
rm -f run libsim.a
rm -f gentmap targ-map.c targ-vals.h
- if [ "cd $(srcdir) && pwd" != `pwd` ] ; then \
+ if [ ! -f Make-common.in ] ; then \
rm -f $(BUILT_SRC_FROM_COMMON) ; \
fi