[PATCH] libgloss: merge i960 into top-level Makefile

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Avoid a recursive make to speed things up a bit.
I can't test this as current versions of binutils doesn't support i960.
---
 libgloss/Makefile.am       |   3 +
 libgloss/Makefile.in       | 206 +++++++++++++++++++++++--------------
 libgloss/configure         |  19 +++-
 libgloss/configure.ac      |   7 +-
 libgloss/i960/Makefile.in  | 107 -------------------
 libgloss/i960/Makefile.inc |  16 +++
 6 files changed, 166 insertions(+), 192 deletions(-)
 delete mode 100644 libgloss/i960/Makefile.in
 create mode 100644 libgloss/i960/Makefile.inc

diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am
index 476db4742d76..92da21efd2ef 100644
--- a/libgloss/Makefile.am
+++ b/libgloss/Makefile.am
@@ -81,6 +81,9 @@ endif
 if CONFIG_D30V
 include d30v/Makefile.inc
 endif
+if CONFIG_I960
+include i960/Makefile.inc
+endif
 if CONFIG_IQ2000
 include iq2000/Makefile.inc
 endif
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 1e0d74325b78..bc4421393d5c 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -87,8 +87,7 @@ case "${target}" in
 	subdirs="$subdirs pa"
 	;;
   i960-*-coff)
-	AC_CONFIG_FILES([i960/Makefile])
-	subdirs="$subdirs i960"
+	config_i960=true
 	;;
   sparc-*leon*-elf* | sparc-*leon*-none*)
 	AC_CONFIG_FILES([sparc_leon/Makefile])
@@ -248,8 +247,8 @@ AC_SUBST(subdirs)
 dnl These subdirs have converted to non-recursive make.  Hopefully someday all
 dnl the ports above will too!
 m4_foreach_w([SUBDIR], [
-  aarch64 arc arm bfin csky d30v iq2000 libnosys lm32 moxie nios2 riscv v850
-  wince xtensa
+  aarch64 arc arm bfin csky d30v i960 iq2000 libnosys lm32 moxie nios2 riscv
+  v850 wince xtensa
 ], [dnl
   AM_CONDITIONAL([CONFIG_]m4_toupper(SUBDIR), [test x$config_]SUBDIR = xtrue)
 ])
diff --git a/libgloss/i960/Makefile.in b/libgloss/i960/Makefile.in
deleted file mode 100644
index 0d1b80029e88..000000000000
--- a/libgloss/i960/Makefile.in
+++ /dev/null
@@ -1,107 +0,0 @@
-#
-#
-
-DESTDIR =
-VPATH = @srcdir@ @srcdir@/..
-srcdir = @srcdir@
-objdir = .
-srcroot = $(srcdir)/../..
-objroot = $(objdir)/../..
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-host_alias = @host_alias@
-target_alias = @target_alias@
-
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-# Multilib support variables.
-# TOP is used instead of MULTI{BUILD,SRC}TOP.
-MULTIDIRS =
-MULTISUBDIR =
-
-SHELL =	/bin/sh
-
-mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs
-
-CC = @CC@
-
-AS = @AS@
-AR = @AR@
-LD = @LD@
-RANLIB = @RANLIB@
-
-OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
-	then echo ${objroot}/../binutils/objdump ; \
-	else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
-OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
-	then echo ${objroot}/../binutils/objcopy ; \
-	else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
-
-OBJS		= putnum.o unlink.o
-CFLAGS		= -g
-SCRIPTS		= 
-
-# Here is all of the mon960 stuff
-MON_LDFLAGS	=
-MON_BSP		= libmon960.a
-MON_CRT0	= crt0.o
-MON_OBJS	= mon-read.o mon-write.o mon-syscalls.o mon960.o
-MON_SCRIPTS	= mon960.ld
-MON_INSTALL	= install-mon
-
-# Host specific makefile fragment comes in here.
-@host_makefile_frag@
-
-#
-# build a test program for each target board. Just trying to get
-# it to link is a good test, so we ignore all the errors for now.
-#
-all: ${MON_CRT0} ${MON_BSP}
-
-#
-# here's where we build the board support packages for each target
-#
-${MON_BSP}: ${OBJS} ${MON_OBJS}
-	${AR} ${ARFLAGS} ${MON_BSP} ${MON_OBJS} ${OBJS}
-	${RANLIB} ${MON_BSP}
-
-#
-#
-#
-.c.S:
-	${CC} ${CFLAGS_FOR_TARGET} -c $<
-
-mvme-crt0.o: mvme-crt0.S
-mvme-exit.o: mvme-exit.S
-mvme-inbyte.o: mvme-inbyte.S
-mvme-outbyte.o: mvme-outbyte.S
-
-clean mostlyclean:
-	rm -f a.out core *.i *.o *-test *.srec *.dis *.x
-
-distclean maintainer-clean realclean: clean
-	rm -f Makefile *~
-
-.PHONY: install info install-info clean-info
-install: ${MON_INSTALL}
-
-install-mon:
-	${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}
-	set -e; for x in ${MON_CRT0} ${MON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
-	set -e; for x in ${MON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
-
-doc:
-info:
-install-info:
-clean-info:
-
-Makefile: Makefile.in ../config.status
-	cd .. && $(SHELL) config.status
diff --git a/libgloss/i960/Makefile.inc b/libgloss/i960/Makefile.inc
new file mode 100644
index 000000000000..3d1f58bb101a
--- /dev/null
+++ b/libgloss/i960/Makefile.inc
@@ -0,0 +1,16 @@
+multilibtool_DATA += \
+	%D%/crt0.o
+libobjs_a_SOURCES += \
+	%D%/crt0.c
+
+multilibtool_DATA += \
+	%D%/mon960.ld
+
+multilibtool_LIBRARIES += %D%/libmon960.a
+%C%_libmon960_a_SOURCES = \
+	putnum.c \
+	unlink.c \
+	%D%/mon-read.c \
+	%D%/mon-write.c \
+	%D%/mon-syscalls.S \
+	%D%/mon960.c
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.