sim: cgen: inline cgen_init logic
[deliverable/binutils-gdb.git] / sim / common / Make-common.in
index c92228bb929fc13982ed501564ff4da318c0f00b..f32026e179d316691c8d8b2d0d83ecea60c84d06 100644 (file)
@@ -40,6 +40,10 @@ srccom = $(srcdir)/../common
 srcroot = $(srcdir)/../..
 srcsim = $(srcdir)/..
 
+# Helper code from gnulib.
+GNULIB_BUILDDIR = ../../gnulib
+include $(GNULIB_BUILDDIR)/Makefile.gnulib.inc
+
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
@@ -113,7 +117,8 @@ POSTCOMPILE = @true
 
 # igen leaks memory, and therefore makes AddressSanitizer unhappy.  Disable
 # leak detection while running it.
-IGEN = ASAN_OPTIONS=detect_leaks=0 ../igen/igen
+IGEN = ../igen/igen$(EXEEXT)
+IGEN_RUN = ASAN_OPTIONS=detect_leaks=0 $(IGEN)
 
 # 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
@@ -232,8 +237,9 @@ CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \
   -I../../include -I$(srcroot)/include \
   -I../../bfd -I$(srcroot)/bfd \
   -I../../opcodes -I$(srcroot)/opcodes \
+  -I../.. \
   @INCINTL@
-ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS) $(CFLAGS)
+ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(INCGNU) $(SIM_EXTRA_CFLAGS) $(CFLAGS)
 BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(CSEARCH)
 
 COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS)
@@ -248,18 +254,19 @@ LIBINTL_DEP = @LIBINTL_DEP@
 CONFIG_LIBS = @LIBS@ $(ZLIB)
 LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB)
 EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \
-       $(CONFIG_LIBS) $(SIM_EXTRA_LIBS) $(LIBDL)
+       $(CONFIG_LIBS) $(SIM_EXTRA_LIBS) $(LIBDL) $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
+
+COMMON_OBJS = ../common/version.o
 
-LIB_OBJS = callback.o modules.o syscall.o targ-map.o version.o \
-       $(SIM_OBJS)
+LIB_OBJS = callback.o modules.o syscall.o targ-map.o $(COMMON_OBJS) $(SIM_OBJS)
 
 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS)
 LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@
 
 RUNTESTFLAGS =
 
-callback_h = $(srcroot)/include/gdb/callback.h
-remote_sim_h = $(srcroot)/include/gdb/remote-sim.h
+callback_h = $(srcroot)/include/sim/callback.h
+remote_sim_h = $(srcroot)/include/sim/sim.h
 
 all: libsim.a run$(EXEEXT) .gdbinit
 
@@ -292,11 +299,6 @@ stamp-tvals: gentmap
        $(SHELL) $(srcroot)/move-if-change tmp-tmap.c targ-map.c
        touch stamp-tvals
 
-version.c: Makefile $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcroot)/sim/common/create-version.sh
-       $(SHELL) $(srcroot)/sim/common/create-version.sh $(srcroot)/gdb $@.tmp
-       $(SHELL) $(srcroot)/move-if-change $@.tmp $@
-       touch $@
-
 #
 # Rules for building sim-* components.  Triggered by listing the corresponding
 # .o file in the list of simulator targets.
@@ -424,8 +426,7 @@ generated_files = \
        hw-config.h \
        modules.c \
        targ-map.c \
-       targ-vals.h \
-       version.c
+       targ-vals.h
 
 # Ensure that generated files are created early.  Use order-only
 # dependencies if available.  They require GNU make 3.80 or newer,
@@ -481,6 +482,7 @@ modules.c: Makefile $(SIM_OBJS:.o=.c)
        ) >$@.tmp
        $(SHELL) $(srcroot)/move-if-change $@.tmp $@
        @rm -f $@.l-tmp $@.tmp
+       touch $@
 
 # CGEN support.
 
@@ -512,10 +514,18 @@ installdirs:
 
 check:
 
+html:
+clean-html:
+install-html:
+
 info:
 clean-info:
 install-info:
 
+pdf:
+clean-pdf:
+install-pdf:
+
 .NOEXPORT:
 MAKEOVERRIDES=
 
This page took 0.045341 seconds and 4 git commands to generate.