sim: unify callback.o building
authorMike Frysinger <vapier@gentoo.org>
Wed, 7 Jul 2021 03:44:38 +0000 (23:44 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 31 Oct 2021 08:51:44 +0000 (04:51 -0400)
Now that the use of TARGET_xxx defines have been removed, we can move
this to the common logic so we only build it once for multi-targets.

sim/Makefile.in
sim/common/Make-common.in
sim/common/local.mk

index f6bf4168ad10a643c6ab05d7e9d59b44531c6f09..1cea0604fd7514b9c46e94f4662cbe944b81689c 100644 (file)
@@ -251,6 +251,7 @@ common_libcommon_a_AR = $(AR) $(ARFLAGS)
 common_libcommon_a_LIBADD =
 am__dirstamp = $(am__leading_dot)dirstamp
 am_common_libcommon_a_OBJECTS =  \
+       common/common_libcommon_a-callback.$(OBJEXT) \
        common/common_libcommon_a-portability.$(OBJEXT) \
        common/common_libcommon_a-sim-load.$(OBJEXT) \
        common/common_libcommon_a-target-newlib-errno.$(OBJEXT) \
@@ -844,6 +845,7 @@ common_libcommon_a_CPPFLAGS = \
        -I..
 
 common_libcommon_a_SOURCES = \
+       common/callback.c \
        common/portability.c \
        common/sim-load.c \
        common/target-newlib-errno.c \
@@ -1017,6 +1019,8 @@ common/$(am__dirstamp):
 common/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) common/$(DEPDIR)
        @: > common/$(DEPDIR)/$(am__dirstamp)
+common/common_libcommon_a-callback.$(OBJEXT): common/$(am__dirstamp) \
+       common/$(DEPDIR)/$(am__dirstamp)
 common/common_libcommon_a-portability.$(OBJEXT):  \
        common/$(am__dirstamp) common/$(DEPDIR)/$(am__dirstamp)
 common/common_libcommon_a-sim-load.$(OBJEXT): common/$(am__dirstamp) \
@@ -1147,6 +1151,7 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-callback.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-portability.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-sim-load.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@common/$(DEPDIR)/common_libcommon_a-target-newlib-errno.Po@am__quote@
@@ -1202,6 +1207,20 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
+common/common_libcommon_a-callback.o: common/callback.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT common/common_libcommon_a-callback.o -MD -MP -MF common/$(DEPDIR)/common_libcommon_a-callback.Tpo -c -o common/common_libcommon_a-callback.o `test -f 'common/callback.c' || echo '$(srcdir)/'`common/callback.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) common/$(DEPDIR)/common_libcommon_a-callback.Tpo common/$(DEPDIR)/common_libcommon_a-callback.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='common/callback.c' object='common/common_libcommon_a-callback.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o common/common_libcommon_a-callback.o `test -f 'common/callback.c' || echo '$(srcdir)/'`common/callback.c
+
+common/common_libcommon_a-callback.obj: common/callback.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT common/common_libcommon_a-callback.obj -MD -MP -MF common/$(DEPDIR)/common_libcommon_a-callback.Tpo -c -o common/common_libcommon_a-callback.obj `if test -f 'common/callback.c'; then $(CYGPATH_W) 'common/callback.c'; else $(CYGPATH_W) '$(srcdir)/common/callback.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) common/$(DEPDIR)/common_libcommon_a-callback.Tpo common/$(DEPDIR)/common_libcommon_a-callback.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='common/callback.c' object='common/common_libcommon_a-callback.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o common/common_libcommon_a-callback.obj `if test -f 'common/callback.c'; then $(CYGPATH_W) 'common/callback.c'; else $(CYGPATH_W) '$(srcdir)/common/callback.c'; fi`
+
 common/common_libcommon_a-portability.o: common/portability.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(common_libcommon_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT common/common_libcommon_a-portability.o -MD -MP -MF common/$(DEPDIR)/common_libcommon_a-portability.Tpo -c -o common/common_libcommon_a-portability.o `test -f 'common/portability.c' || echo '$(srcdir)/'`common/portability.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) common/$(DEPDIR)/common_libcommon_a-portability.Tpo common/$(DEPDIR)/common_libcommon_a-portability.Po
index e5c3484c047e9e2a3d4fc97639b4abee4d76a8c6..4c83059176439107e0af4dfdb671a5aeef49ae06 100644 (file)
@@ -229,6 +229,7 @@ EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \
        $(CONFIG_LIBS) $(SIM_EXTRA_LIBS) $(LIBDL) $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
 
 COMMON_OBJS_NAMES = \
+       callback.o \
        portability.o \
        sim-load.o \
        target-newlib-errno.o \
@@ -237,7 +238,7 @@ COMMON_OBJS_NAMES = \
        version.o
 COMMON_OBJS = $(COMMON_OBJS_NAMES:%=../common/common_libcommon_a-%)
 
-LIB_OBJS = callback.o modules.o syscall.o targ-map.o $(COMMON_OBJS) $(SIM_OBJS)
+LIB_OBJS = 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 $@
index fdbdca444b3f9ad0b1cbfa3793bc2f1aa7b16f12..2fd78264ba1f2a9e69041669840957e24f23a32a 100644 (file)
@@ -34,6 +34,7 @@ noinst_LIBRARIES += %D%/libcommon.a
        -I../bfd \
        -I..
 %C%_libcommon_a_SOURCES = \
+       %D%/callback.c \
        %D%/portability.c \
        %D%/sim-load.c \
        %D%/target-newlib-errno.c \