]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/common/Make-common.in
sim: move sim-inline to the common code
[thirdparty/binutils-gdb.git] / sim / common / Make-common.in
index 12fb233c5ee4d39bf5a18493132905bd0b1ef5dc..b8116d8996ff4941a47500d5cc5193d46b61bcf0 100644 (file)
@@ -40,16 +40,18 @@ srccom = $(srcdir)/../common
 srcroot = $(srcdir)/../..
 srcsim = $(srcdir)/..
 
+include $(srcroot)/gdb/silent-rules.mk
+
 # Helper code from gnulib.
 GNULIB_PARENT_DIR = ../..
 include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
 
+# Settings from top-level configure.
+include ../arch-subdir.mk
+
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
-host_alias = @host_alias@
-target_alias = @target_alias@
-program_transform_name = @program_transform_name@
 bindir = @bindir@
 
 libdir = @libdir@
@@ -62,56 +64,30 @@ man1dir = $(mandir)/man1
 infodir = @infodir@
 includedir = @includedir@
 
-lt_cv_dlopen_libs = @lt_cv_dlopen_libs@
 # This can be referenced by the gettext configuration code.
 top_builddir = ..
 
-EXEEXT = @EXEEXT@
 SHELL = @SHELL@
 
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-CC = @CC@
-C_DIALECT = @C_DIALECT@
-CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-CXXFLAGS = @CXXFLAGS@
-LDFLAGS = @LDFLAGS@
-
 SIM_BITSIZE = @sim_bitsize@
 SIM_DEFAULT_MODEL = @sim_default_model@
-SIM_ENDIAN = @sim_endian@
 SIM_FLOAT = @sim_float@
 SIM_HW_CFLAGS = @sim_hw_cflags@
 SIM_HW_OBJS = @sim_hw_objs@
 SIM_HW = @sim_hw@
-SIM_INLINE = @sim_inline@
 SIM_RESERVED_BITS = @sim_reserved_bits@
 SIM_SCACHE = @sim_scache@
-WARN_CFLAGS = @WARN_CFLAGS@
-WERROR_CFLAGS = @WERROR_CFLAGS@
 SIM_WARN_CFLAGS = $(WARN_CFLAGS)
 SIM_WERROR_CFLAGS = $(WERROR_CFLAGS)
 
-AR = @AR@
-AR_FLAGS = rc
-RANLIB = @RANLIB@
-MAKEINFO = makeinfo
-
 # Dependency tracking information.
-DEPMODE = @CCDEPMODE@
-DEPDIR = @DEPDIR@
 depcomp = $(SHELL) $(srcroot)/depcomp
 
 # Note that these are overridden by GNU make-specific code below if
 # GNU make is used.  The overrides implement dependency tracking.
 COMPILE.pre = $(CC) $(C_DIALECT)
 COMPILE.post = -c -o $@
-COMPILE = $(COMPILE.pre) $(ALL_CFLAGS) $(COMPILE.post)
+COMPILE = $(ECHO_CC) $(COMPILE.pre) $(ALL_CFLAGS) $(COMPILE.post)
 POSTCOMPILE = @true
 
 # igen leaks memory, and therefore makes AddressSanitizer unhappy.  Disable
@@ -218,10 +194,9 @@ CGEN_INCLUDE_DEPS = \
 ## COMMON_POST_CONFIG_FRAG
 
 CONFIG_CFLAGS = \
-       @DEFS@ \
+       -DHAVE_CONFIG_H \
        $(SIM_DEFAULT_MODEL) \
        $(SIM_BITSIZE) \
-       $(SIM_ENDIAN) \
        $(SIM_FLOAT) \
        $(SIM_HW_CFLAGS) \
        $(SIM_INLINE) \
@@ -235,20 +210,17 @@ CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \
   -I../../bfd -I$(srcroot)/bfd \
   -I../../opcodes -I$(srcroot)/opcodes \
   -I../.. \
-  @INCINTL@
+  $(INTL_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)
 
-ZLIB = @zlibdir@ -lz
+ZLIB = $(zlibdir) -lz
 LIBIBERTY_LIB = ../../libiberty/libiberty.a
 BFD_LIB = ../../bfd/libbfd.a
-@PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
 OPCODES_LIB = ../../opcodes/libopcodes.a
-LIBINTL = @LIBINTL@
-LIBINTL_DEP = @LIBINTL_DEP@
-CONFIG_LIBS = @LIBS@ $(ZLIB)
+CONFIG_LIBS = $(COMMON_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) $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
@@ -273,11 +245,11 @@ all: libsim.a run$(EXEEXT) .gdbinit
 
 libsim.a: $(LIB_OBJS)
        rm -f libsim.a
-       $(AR) $(AR_FLAGS) libsim.a $(LIB_OBJS)
-       $(RANLIB) libsim.a
+       $(ECHO_AR) $(AR) $(AR_FLAGS) libsim.a $(LIB_OBJS)
+       $(ECHO_RANLIB) $(RANLIB) libsim.a
 
 run$(EXEEXT): $(SIM_RUN_OBJS) libsim.a $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o run$(EXEEXT) \
+       $(ECHO_CCLD) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o run$(EXEEXT) \
          $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
 
 # FIXME: Ideally, callback.o and friends live in a library outside of
@@ -286,10 +258,10 @@ run$(EXEEXT): $(SIM_RUN_OBJS) libsim.a $(LIBDEPS)
 # a library).
 
 gentmap.o: Makefile $(srccom)/gentmap.c $(srccom)/nltvals.def
-       $(COMPILE_FOR_BUILD) -o $@ -c $(srccom)/gentmap.c $(NL_TARGET)
+       $(ECHO_CC) $(COMPILE_FOR_BUILD) -o $@ -c $(srccom)/gentmap.c $(NL_TARGET)
 
 gentmap: gentmap.o
-       $(LINK_FOR_BUILD) $<
+       $(ECHO_CC) $(LINK_FOR_BUILD) $<
 
 targ-vals.h targ-map.c: stamp-tvals
 stamp-tvals: gentmap
@@ -423,7 +395,6 @@ endif
 all_object_files = $(LIB_OBJS) $(SIM_RUN_OBJS)
 generated_files = \
        $(SIM_EXTRA_DEPS) \
-       config.h \
        hw-config.h \
        modules.c \
        targ-map.c \
@@ -546,15 +517,11 @@ mostlyclean clean: $(SIM_EXTRA_CLEAN)
        rm -f hw-config.h stamp-hw
        rm -f modules.c stamp-modules
        rm -f gentmap targ-map.c targ-vals.h stamp-tvals
-       if [ ! -f Make-common.in ] ; then \
-               rm -f $(BUILT_SRC_FROM_COMMON) ; \
-       fi
        rm -f tmp-mloop.hin tmp-mloop.h tmp-mloop.cin tmp-mloop.c
 
 distclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN)
        rm -f TAGS
        rm -f Makefile config.cache config.log config.status .gdbinit
-       rm -f config.h stamp-h
 
 .c.o:
        $(COMPILE) $<
@@ -569,10 +536,6 @@ Makefile: Makefile.in $(srccom)/Make-common.in config.status
 config.status: configure
        $(SHELL) ./config.status --recheck
 
-config.h: stamp-h ; @true
-stamp-h: config.in config.status
-       CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
-
 .gdbinit: # config.status $(srccom)/gdbinit.in
        CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status