Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-27 07:13:37 +0300
committerMike Frysinger <vapier@gentoo.org>2024-01-20 04:26:52 +0300
commit25f6d8772ec7f6305d59224d2043dd312e2f99e5 (patch)
treead9311cef4dcfa5518073b8ce7a219d2d0d93335 /libgloss/mn10300
parent56211d0e14fe5e97000884d21d003759f2906422 (diff)
libgloss: merge mn10300 into top-level Makefile
Avoid a recursive make to speed things up a bit. A mn10300-elf build shows installed objects & libs produce same code.
Diffstat (limited to 'libgloss/mn10300')
-rw-r--r--libgloss/mn10300/Makefile.in156
-rw-r--r--libgloss/mn10300/Makefile.inc66
-rw-r--r--libgloss/mn10300/acinclude.m418
3 files changed, 70 insertions, 170 deletions
diff --git a/libgloss/mn10300/Makefile.in b/libgloss/mn10300/Makefile.in
deleted file mode 100644
index 1669d5ce4..000000000
--- a/libgloss/mn10300/Makefile.in
+++ /dev/null
@@ -1,156 +0,0 @@
-# Copyright (c) 1998, 2000 Cygnus Support
-#
-# The authors hereby grant permission to use, copy, modify, distribute,
-# and license this software and its documentation for any purpose, provided
-# that existing copyright notices are retained in all copies and that this
-# notice is included verbatim in any distributions. No written agreement,
-# license, or royalty fee is required for any of the authorized uses.
-# Modifications to this software may be copyrighted by their authors
-# and need not follow the licensing terms described here, provided that
-# the new terms are clearly indicated on the first page of each file where
-# they apply.
-
-DESTDIR =
-VPATH = @srcdir@
-srcdir = @srcdir@
-objdir = .
-srcroot = $(srcdir)/../..
-objroot = $(objdir)/../..
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-host_alias = @host_alias@
-target_alias = @target_alias@
-program_transform_name = @program_transform_name@
-
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
-
-# Multilib support variables.
-# TOP is used instead of MULTI{BUILD,SRC}TOP.
-MULTIDIRS =
-MULTISUBDIR =
-MULTIDO = true
-MULTICLEAN = true
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SHELL = /bin/sh
-
-CC = @CC@
-
-#AS = @AS@
-AS = `if [ -f ${objroot}/../gas/as.new ] ; \
- then echo ${objroot}/../gas/as.new ; \
- else echo as ; fi`
-
-AR = @AR@
-
-#LD = @LD@
-LD = `if [ -f ${objroot}/../ld/ld.new ] ; \
- then echo ${objroot}/../ld/ld.new ; \
- else echo ld ; fi`
-
-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`
-
-CRT0 = crt0.o crt0_cygmon.o crt0_redboot.o
-
-# Generic object files common to all targets.
-GENOBJS_NO_TRAP = _exit.o access.o chmod.o close.o crt1.o \
- fstat.o getpid.o isatty.o \
- kill.o lseek.o open.o read.o \
- sbrk.o stat.o time.o times.o unlink.o utime.o write.o
-GENOBJS = ${GENOBJS_NO_TRAP} trap.o
-
-# Object files specific to particular targets.
-EVALOBJS = ${GENOBJS}
-CYGMONOBJS = cygmon.o ${GENOBJS_NO_TRAP}
-
-CFLAGS = -g
-
-GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
- then echo -L${objroot}/../gcc ; fi`
-
-SCRIPTS = @MN10300_SCRIPT_LIST@
-BSP = @MN10300_BSP_LIST@
-
-# 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: ${CRT0} test.o ${BSP}
-
-#
-# here's where we build the board support packages for each target
-#
-
-libeval.a: $(EVALOBJS)
- ${AR} ${ARFLAGS} $@ $(EVALOBJS)
- ${RANLIB} $@
-
-libcygmon.a: $(CYGMONOBJS)
- ${AR} ${ARFLAGS} $@ $(CYGMONOBJS)
- ${RANLIB} $@
-
-
-# compile a fully linked binary. The -Wl,-T*.ld is for the linker
-# script. By using -Wl, the linker script is put on the proper place
-# in the comand line for ld, and all the symbols will get fully
-# resolved.
-
-test: ${CRT0} test.o
- ${CC} $(CFLAGS_FOR_TARGET) -L${srcdir} -L${objdir} \
- test.o -o $@ $(NEWLIB_LDFLAGS) -Wl,-Teval.ld
- @echo Done...
-
-doc:
-
-clean mostlyclean:
- rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x
-
-distclean maintainer-clean realclean: clean
- rm -f Makefile a.out
-
-.PHONY: install info install-info clean-info
-install:
- mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR};
- @for crt in ${CRT0}; do \
- $(INSTALL_PROGRAM) $${crt} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${crt}; \
- done
- @for bsp in ${BSP}; do \
- $(INSTALL_PROGRAM) $${bsp} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
- done
- @for script in ${SCRIPTS}; do \
- $(INSTALL_DATA) ${srcdir}/$${script}.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${script}.ld; \
- done
-
-info:
-install-info:
-clean-info:
-
-test.o: ${srcdir}/test.c
-
-# these are for the BSPs
-crt0.o: ${srcdir}/crt0.S
-crt0_cygmon.o: ${srcdir}/crt0_cygmon.S
-
-# target specific makefile fragment comes in here.
-@target_makefile_frag@
-
-Makefile: Makefile.in ../config.status
- cd .. && $(SHELL) config.status
diff --git a/libgloss/mn10300/Makefile.inc b/libgloss/mn10300/Makefile.inc
new file mode 100644
index 000000000..cc91b8bf1
--- /dev/null
+++ b/libgloss/mn10300/Makefile.inc
@@ -0,0 +1,66 @@
+## Copyright (c) 1998, 2000 Cygnus Support
+##
+## The authors hereby grant permission to use, copy, modify, distribute,
+## and license this software and its documentation for any purpose, provided
+## that existing copyright notices are retained in all copies and that this
+## notice is included verbatim in any distributions. No written agreement,
+## license, or royalty fee is required for any of the authorized uses.
+## Modifications to this software may be copyrighted by their authors
+## and need not follow the licensing terms described here, provided that
+## the new terms are clearly indicated on the first page of each file where
+## they apply.
+
+multilibtool_DATA += \
+ %D%/eval.ld \
+ %D%/sim.ld
+if MN10300_BUILD_LIBCYGMON
+multilibtool_DATA += \
+ %D%/asb2303.ld \
+ %D%/asb2305.ld
+endif
+
+multilibtool_DATA += \
+ %D%/crt0.o \
+ %D%/crt0_cygmon.o \
+ %D%/crt0_redboot.o
+libobjs_a_SOURCES += \
+ %D%/crt0.S \
+ %D%/crt0_cygmon.S \
+ %D%/crt0_redboot.S
+
+# Generic object files common to all targets.
+%C%_common_lib_sources = \
+ %D%/_exit.c \
+ %D%/access.c \
+ %D%/chmod.c \
+ %D%/close.c \
+ %D%/crt1.c \
+ %D%/fstat.c \
+ %D%/getpid.c \
+ %D%/isatty.c \
+ %D%/kill.c \
+ %D%/lseek.c \
+ %D%/open.c \
+ %D%/read.c \
+ %D%/sbrk.c \
+ %D%/stat.c \
+ %D%/time.c \
+ %D%/times.c \
+ %D%/unlink.c \
+ %D%/utime.c \
+ %D%/write.c
+
+multilibtool_LIBRARIES += %D%/libeval.a
+%C%_libeval_a_SOURCES = \
+ $(%C%_common_lib_sources) \
+ %D%/trap.S
+
+if MN10300_BUILD_LIBCYGMON
+multilibtool_LIBRARIES += %D%/libcygmon.a
+%C%_libcygmon_a_SOURCES = \
+ $(%C%_common_lib_sources) \
+ %D%/cygmon.c
+endif
+
+check_PROGRAMS += %D%/test
+%C%_test_LDFLAGS = $(AM_LDFLAGS) -Wl,-T$(srcdir)/%D%/eval.ld
diff --git a/libgloss/mn10300/acinclude.m4 b/libgloss/mn10300/acinclude.m4
index 93fa5286e..031b55f3f 100644
--- a/libgloss/mn10300/acinclude.m4
+++ b/libgloss/mn10300/acinclude.m4
@@ -1,14 +1,4 @@
-MN10300_SCRIPT_LIST=
-MN10300_BSP_LIST=
-case "${target}" in
- mn10300-*elf)
- MN10300_SCRIPT_LIST="eval sim asb2303 asb2305"
- MN10300_BSP_LIST="libeval.a libcygmon.a"
- ;;
- *)
- MN10300_SCRIPT_LIST="eval sim"
- MN10300_BSP_LIST="libeval.a"
- ;;
-esac
-AC_SUBST(MN10300_SCRIPT_LIST)
-AC_SUBST(MN10300_BSP_LIST)
+AS_CASE([${target}],
+ [mn10300-*elf], [MN10300_BUILD_LIBCYGMON=true],
+ [MN10300_BUILD_LIBCYGMON=false])
+AM_CONDITIONAL([MN10300_BUILD_LIBCYGMON], [$MN10300_BUILD_LIBCYGMON])