diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-01-13 07:34:59 +0300 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-01-14 01:24:17 +0300 |
commit | 4391d2aed3d4878c5a63f59d2a768f5d38f3936d (patch) | |
tree | 73eb533f0e0a443ea3fe4e4463b50e3631786efa /libgloss/csky | |
parent | c8ddd03cb015cf7f9137c42a6cbd0639c6c93a23 (diff) |
libgloss: merge csky into top-level Makefile
Avoid a recursive make to speed things up a bit.
A csky-elf build shows installed objects & libs produce same code.
Diffstat (limited to 'libgloss/csky')
-rw-r--r-- | libgloss/csky/Makefile.in | 125 | ||||
-rw-r--r-- | libgloss/csky/Makefile.inc | 36 |
2 files changed, 36 insertions, 125 deletions
diff --git a/libgloss/csky/Makefile.in b/libgloss/csky/Makefile.in deleted file mode 100644 index ebf7ef2cd..000000000 --- a/libgloss/csky/Makefile.in +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (c) 1995, 1996, 2001 Cygnus Support -*- mode:makefile -*- -# -# 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. -# -# csky semihosting support. -# - -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 - -mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs - -CC = @CC@ - -AS = @AS@ -AR = @AR@ -LD = @LD@ -RANLIB = @RANLIB@ -AR_FLAGS = qv - -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.S - -# -# here's all the hosted stuff -# -HOSTED_BSP= libsemi.a -HOSTED_SRS= io-semi.S -HOSTED_SRC= sbrk.c io-gdb.c io-exit.c io-close.c io-fstat.c io-gettimeofday.c \ - io-lseek.c io-read.c io-system.c io-unlink.c io-exit.c \ - io-gdb.c io-isatty.c io-open.c io-rename.c io-stat.c \ - io-time.c io-write.c kill.o getpid.o -HOSTED_OBJS= $(patsubst %.c,%.o,$(HOSTED_SRC)) - -INCLUDES+= -I/home/xialf/workspace/newlib-2.5.0.20171222/newlib/libc/include - -# Host specific makefile fragment comes in here. -@host_makefile_frag@ - -all :: $(HOSTED_BSP) - -# -# here's where we build the board support packages for each target -# - -# build hosted library -$(HOSTED_OBJS) : %.o : %.c - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -nostdlib -DHOSTED=1 $(INCLUDES) -c $< -o $@ -$(HOSTED_SRS:%.S=%.o): %.o : %.S - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -nostdlib -DHOSTED=1 $(INCLUDES) -c $< -o $@ - -$(HOSTED_BSP): $(HOSTED_OBJS) $(HOSTED_SRS:%.S=%.o) - ${AR} ${ARFLAGS} $@ $^ - ${RANLIB} $@ - -crt0.o: $(CRT0) - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -c $< -o $@ - -.PHONY: install info dvi doc install-info clean-info -install:: install_hosted crt0.o - ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} - $(INSTALL_PROGRAM) crt0.o $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(crt0.o) - -.PHONY:install_hosted -install_hosted:: - ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} - $(INSTALL_PROGRAM) $(HOSTED_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(HOSTED_BSP) - -# target specific makefile fragment comes in here. -@target_makefile_frag@ - -clean mostlyclean: - rm -f a.out core *.i *~ *.a *.o *-test *.srec *.dis *.x *.map - -distclean maintainer-clean realclean: clean - rm -f Makefile - -info dvi doc: -install-info: -clean-info: - -Makefile: Makefile.in ../config.status - cd .. && $(SHELL) config.status diff --git a/libgloss/csky/Makefile.inc b/libgloss/csky/Makefile.inc new file mode 100644 index 000000000..7f38d659c --- /dev/null +++ b/libgloss/csky/Makefile.inc @@ -0,0 +1,36 @@ +## csky semihosting support. + +multilibtool_DATA += \ + %D%/crt0.o +libobjs_a_SOURCES += \ + %D%/crt0.S + +## Here's all the hosted stuff. + +multilibtool_LIBRARIES += %D%/libsemi.a +%C%_libsemi_a_SOURCES = \ + %D%/io-semi.S \ + %D%/sbrk.c \ + %D%/io-gdb.c \ + %D%/io-exit.c \ + %D%/io-close.c \ + %D%/io-fstat.c \ + %D%/io-gettimeofday.c \ + %D%/io-lseek.c \ + %D%/io-read.c \ + %D%/io-system.c \ + %D%/io-unlink.c \ + %D%/io-exit.c \ + %D%/io-gdb.c \ + %D%/io-isatty.c \ + %D%/io-open.c \ + %D%/io-rename.c \ + %D%/io-stat.c \ + %D%/io-time.c \ + %D%/io-write.c \ + %D%/kill.c \ + %D%/getpid.c +%C%_libsemi_a_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -nostdlib \ + -DHOSTED=1 |