diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-29 10:10:36 +0300 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-20 06:23:47 +0300 |
commit | 7ba23b682540f2f8999bd1cf8421bdeca6f59ca4 (patch) | |
tree | e5869a70e0bce547381c5ab96e627eee6c0f75a6 /libgloss/sparc_leon | |
parent | 9b35bf859aeb32d9a11815d683e5cde2053bc420 (diff) |
libgloss: merge sparc_leon into top-level Makefile
Avoid a recursive make to speed things up a bit.
A sparc-elf build shows installed objects & libs produce same code.
Diffstat (limited to 'libgloss/sparc_leon')
-rw-r--r-- | libgloss/sparc_leon/Makefile.in | 161 | ||||
-rw-r--r-- | libgloss/sparc_leon/Makefile.inc | 107 |
2 files changed, 107 insertions, 161 deletions
diff --git a/libgloss/sparc_leon/Makefile.in b/libgloss/sparc_leon/Makefile.in deleted file mode 100644 index d914009f1..000000000 --- a/libgloss/sparc_leon/Makefile.in +++ /dev/null @@ -1,161 +0,0 @@ -# Makefile for libgloss/sparc_leon. This is the board support -# code for the various sparc leon targets. - -DESTDIR = -VPATH = @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) -mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs - -# 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 = qrv - -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` - -LEON_BSP = libleonbare.a -LEON_OBJS = etrap.o rtrap.o etrap_fast.o rtrap_fast.o irqinstall.o regwin.o \ - regwinflush.o fpu.o bdinit.o contextswitch.o \ - busscan.o irqtrap_fast.o catch_interrupt.o catch_interrupt_svt.o \ - catch_interrupt_mvt.o catch_interrupt_pending.o gettimeofday.o \ - times.o rtc.o lcpuinit.o console_init.o console.o console_dbg.o \ - contextswitch.o contextswitch_asm.o _exit.o amba.o amba_dbg.o \ - amba_scan.o amba_driver.o timer.o mutex.o locore.o locore_clean.o \ - locore_var.o locore_var_svt.o jiffies.o \ - mmu_asm.o locore_svtdisp.o locore_mvt_reset.o locore_svt_reset.o stop.o initcalls.o \ - regwin_patch.o cacheA.o nocache.o - -LEONBARE_THREADS = liblbthread.a -LEONBARE_THREADS_OBJS = kernel.o kernel_debug.o kernel_debug_var.o kernel_context.o \ - kernel_mutex.o kernel_thread.o kernel_sched.o kernel_queue.o \ - kernel_mm.o - -LOCOREATEXIT = locore_atexit.o -LEON_SMALLC = libsmall.a - -PNP=pnpinit.o -PNP_S=pnpinit_simple.o -LEON_ALL = $(LEON_BSP) $(LEON_SMALLC) $(LEONBARE_THREADS) $(PNP) $(PNP_S) crti.o crtn.o - -LOCORESVT = locore_svt.o -LOCOREMVT = locore_mvt.o -CRT0 = crt0.o -OBJS = close.o fstat.o getpid.o isatty.o kill.o \ - lseek.o open.o print.o putnum.o read.o sbrk.o stat.o \ - unlink.o write.o io.o kernel.o kernel_debug.o kernel_debug_var.o kernel_context.o -#link.o - -#### Host specific Makefile fragment comes in here. -@host_makefile_frag@ - -all: stmp-targ-include $(CRT0) $(LOCOREMVT) $(LOCORESVT) $(LEON_ALL) - -$(CRT0): $(srcdir)/crt0.S - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -o $@ -c $(srcdir)/crt0.S - -$(LEON_BSP): $(OBJS) $(LEON_OBJS) - @rm -f $@ - ${AR} ${AR_FLAGS} $@ $(OBJS) $(LEON_OBJS) - ${RANLIB} $@ - -$(LEON_SMALLC): $(LOCOREATEXIT) - @rm -f $@ - ${AR} ${AR_FLAGS} $@ $(LOCOREATEXIT) - ${RANLIB} $@ - -$(LEONBARE_THREADS): $(LEONBARE_THREADS_OBJS) - @rm -f $@ - ${AR} ${AR_FLAGS} $@ $(LEONBARE_THREADS_OBJS) - ${RANLIB} $@ - -install: - ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} - $(INSTALL_DATA) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0) - $(INSTALL_DATA) $(LOCORESVT) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LOCORESVT) - $(INSTALL_DATA) $(LOCOREMVT) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LOCOREMVT) - $(INSTALL_DATA) $(PNP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(PNP) - $(INSTALL_DATA) $(PNP_S) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(PNP_S) - $(INSTALL_DATA) $(LEON_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LEON_BSP) - $(INSTALL_DATA) $(LEON_SMALLC) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LEON_SMALLC) - $(INSTALL_DATA) $(LEONBARE_THREADS) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LEONBARE_THREADS) - if [ -z "$(MULTISUBDIR)" ]; then \ - $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/asm-leon; \ - for i in $(srcdir)/asm-leon/*.h; do \ - if [ -f $$i ]; then \ - $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/asm-leon/`basename $$i` || exit $$?; \ - else true; fi ; \ - done; \ - else true; fi - -stmp-targ-include: $(srcdir)/asm-leon/* - if [ -d ${objroot}/newlib/targ-include/asm-leon ]; then \ - rm -rf ${objroot}/newlib/targ-include/asm-leon; \ - else true; fi ; \ - if [ -d ${objroot}/newlib/targ-include ]; then \ - cp -r $(srcdir)/asm-leon ${objroot}/newlib/targ-include/asm-leon; \ - else true; fi ; \ - touch $@ - -all-recursive: stmp-targ-include - -# Make a simple test case to test the linker script, startup code, and -# I/O code -# -test: - @echo Done... - -# target specific makefile fragment comes in here. -# @target_makefile_frag@ - -clean mostlyclean: - rm -f *.o *.a *.map *.x - -distclean maintainer-clean realclean: clean - rm -f Makefile config.cache config.log config.status - -.PHONY: info dvi doc install-info clean-info -info doc dvi: -install-info: -clean-info: - -# target specific makefile fragment comes in here. -@target_makefile_frag@ - -Makefile: Makefile.in ../config.status - cd .. && $(SHELL) config.status diff --git a/libgloss/sparc_leon/Makefile.inc b/libgloss/sparc_leon/Makefile.inc new file mode 100644 index 000000000..0b102fc32 --- /dev/null +++ b/libgloss/sparc_leon/Makefile.inc @@ -0,0 +1,107 @@ +AM_CPPFLAGS_%C% = -I$(srcdir)/%D% + +multilibtool_LIBRARIES += %D%/libleonbare.a +%C%_libleonbare_a_SOURCES = \ + close.c \ + fstat.c \ + getpid.c \ + isatty.c \ + kill.c \ + lseek.c \ + open.c \ + print.c \ + putnum.c \ + read.c \ + sbrk.c \ + stat.c \ + unlink.c \ + write.c \ + %D%/io.c \ + %D%/kernel.c \ + %D%/kernel_debug.c \ + %D%/kernel_debug_var.c \ + %D%/kernel_context.S \ + %D%/etrap.S \ + %D%/rtrap.S \ + %D%/etrap_fast.S \ + %D%/rtrap_fast.S \ + %D%/irqinstall.S \ + %D%/regwin.S \ + %D%/regwinflush.S \ + %D%/fpu.S \ + %D%/bdinit.S \ + %D%/contextswitch.c \ + %D%/busscan.S \ + %D%/irqtrap_fast.S \ + %D%/catch_interrupt.c \ + %D%/catch_interrupt_svt.c \ + %D%/catch_interrupt_mvt.c \ + %D%/catch_interrupt_pending.c \ + %D%/gettimeofday.c \ + %D%/times.c \ + %D%/rtc.c \ + %D%/lcpuinit.S \ + %D%/console_init.c \ + %D%/console.c \ + %D%/console_dbg.c \ + %D%/contextswitch.c \ + %D%/contextswitch_asm.S \ + %D%/_exit.c \ + %D%/amba.c \ + %D%/amba_dbg.c \ + %D%/amba_scan.c \ + %D%/amba_driver.c \ + %D%/timer.c \ + %D%/mutex.c \ + %D%/locore.S \ + %D%/locore_clean.S \ + %D%/locore_var.S \ + %D%/locore_var_svt.S \ + %D%/jiffies.c \ + %D%/mmu_asm.S \ + %D%/locore_svtdisp.S \ + %D%/locore_mvt_reset.S \ + %D%/locore_svt_reset.S \ + %D%/stop.S \ + %D%/initcalls.c \ + %D%/regwin_patch.c \ + %D%/cacheA.S \ + %D%/nocache.S + +multilibtool_LIBRARIES += %D%/liblbthread.a +%C%_liblbthread_a_SOURCES = \ + %D%/kernel.c \ + %D%/kernel_debug.c \ + %D%/kernel_debug_var.c \ + %D%/kernel_context.S \ + %D%/kernel_mutex.c \ + %D%/kernel_thread.c \ + %D%/kernel_sched.c \ + %D%/kernel_queue.c \ + %D%/kernel_mm.c + +multilibtool_LIBRARIES += %D%/libsmall.a +%C%_libsmall_a_SOURCES = \ + %D%/locore_atexit.c + +multilibtool_DATA += \ + %D%/crt0.o \ + %D%/pnpinit.o \ + %D%/pnpinit_simple.o \ + %D%/locore_svt.o \ + %D%/locore_mvt.o +libobjs_a_SOURCES += \ + %D%/crt0.S \ + %D%/pnpinit.c \ + %D%/pnpinit_simple.c \ + %D%/locore_svt.S \ + %D%/locore_mvt.S + +## Isn't actually installed anywhere? +## multilibtool_DATA += %D%/crti.o %D%/crtn.o +## libobjs_a_SOURCES += %D%/crti.S %D%/crtn.S + +if !HAVE_MULTISUBDIR +includetoolasmleondir = $(includetooldir)/asm-leon +includetoolasmleon_DATA = $(wildcard $(srcdir)/%D%/asm-leon/*.h) +endif |