diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-27 08:18:12 +0300 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-20 04:26:52 +0300 |
commit | 3342c0ef8196d2c80e4cfc8332daf9468ef9154d (patch) | |
tree | ee672e35a0b776dd753552cb03216011ba76a49e /libgloss/xstormy16 | |
parent | 695404d16f90e82a9ce2f68d89fa81b419285a89 (diff) |
libgloss: merge xstormy16 into top-level Makefile
Avoid a recursive make to speed things up a bit.
A xstormy16-elf build shows installed objects & libs produce same code.
Diffstat (limited to 'libgloss/xstormy16')
-rw-r--r-- | libgloss/xstormy16/Makefile.in | 131 | ||||
-rw-r--r-- | libgloss/xstormy16/Makefile.inc | 48 |
2 files changed, 48 insertions, 131 deletions
diff --git a/libgloss/xstormy16/Makefile.in b/libgloss/xstormy16/Makefile.in deleted file mode 100644 index 49d8a8dea..000000000 --- a/libgloss/xstormy16/Makefile.in +++ /dev/null @@ -1,131 +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@ - -# Yuk. -OBJCOPY = $(subst ranlib,objcopy,$(RANLIB)) - -OBJS = isatty.o -CFLAGS = -g -O2 -ASFLAGS = --gdwarf2 -SCRIPTS = -CRT = crt0.o crti.o crtn.o - -# Here is all of the simulator stuff -SIM_SCRIPTS = sim_high.ld sim_rom.ld -SIM_LDFLAGS = -SIM_BSP = libsim.a -SIM_OBJS = syscalls.o sim_malloc_start.o - -# Here is stuff for building apps for GDB on the EVA board -EVA_APP_BSP = libeva_app.a -EVA_APP_OBJS = close.o fstat.o getpid.o kill.o lseek.o open.o \ - stat.o unlink.o eva_app.o -EVA_APP_SCRIPTS = eva_app.ld - -# Stub stuff -EVA_STUB_HEX = eva_stub.hex -EVA_STUB = eva_stub.elf -EVA_STUB_OBJS = xstormy16_stub.o crt0_stub.o - -# 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} -all: ${CRT} ${SIM_BSP} ${EVA_APP_BSP} ${EVA_STUB_HEX} - -# -# here's where we build the board support packages for each target -# -${SIM_BSP}: ${OBJS} ${SIM_OBJS} - ${AR} ${ARFLAGS} ${SIM_BSP} ${SIM_OBJS} ${OBJS} - ${RANLIB} ${SIM_BSP} - -${EVA_APP_BSP}: ${OBJS} ${EVA_APP_OBJS} - ${AR} ${ARFLAGS} ${EVA_APP_BSP} ${EVA_APP_OBJS} ${OBJS} - ${RANLIB} ${EVA_APP_BSP} - -${EVA_STUB_HEX}: ${EVA_STUB} - ${OBJCOPY} -O ihex $< $@ - -${EVA_STUB}: ${EVA_STUB_OBJS} ${srcdir}/eva_stub.ld - ${CC} -g -Os -nostartfiles -T${srcdir}/eva_stub.ld ${EVA_STUB_OBJS} -o $@ - - -# -# here's where we build the test programs for each target -# -.PHONY: test -test: - true - -# -# -# -.c.S: - ${CC} ${CFLAGS_FOR_TARGET} -c $< - -clean mostlyclean: - rm -f a.out core *.i *.o *-test *.srec *.dis *.x *.hex $(SIM_BSP) $(EVA_APP_BSP) $(EVA_STUB) - -distclean maintainer-clean realclean: clean - rm -f Makefile *~ - -.PHONY: install info install-info clean-info -install: - ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} - set -e; for x in ${SIM_BSP} ${CRT} ${EVA_APP_BSP} ${EVA_STUB_HEX} ${EVA_STUB} ; do\ - ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \ - done - @for script in ${SCRIPTS} ${SIM_SCRIPTS} ${EVA_APP_SCRIPTS}; do\ - ${INSTALL_DATA} ${srcdir}/$${script} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$${script}; \ - done - - -doc: -info: -install-info: -clean-info: - -Makefile: Makefile.in ../config.status - cd .. && $(SHELL) config.status diff --git a/libgloss/xstormy16/Makefile.inc b/libgloss/xstormy16/Makefile.inc new file mode 100644 index 000000000..346fee379 --- /dev/null +++ b/libgloss/xstormy16/Makefile.inc @@ -0,0 +1,48 @@ +multilibtool_DATA += \ + %D%/crt0.o \ + %D%/crti.o \ + %D%/crtn.o +libobjs_a_SOURCES += \ + %D%/crt0.s \ + %D%/crti.s \ + %D%/crtn.s + +## Here is all of the simulator stuff +multilibtool_DATA += \ + %D%/sim_high.ld \ + %D%/sim_rom.ld +multilibtool_LIBRARIES += %D%/libsim.a +%C%_libsim_a_SOURCES = \ + %D%/syscalls.S \ + %D%/sim_malloc_start.s \ + %D%/isatty.c + +## Here is stuff for building apps for GDB on the EVA board +multilibtool_DATA += %D%/eva_app.ld +multilibtool_LIBRARIES += %D%/libeva_app.a +%C%_libeva_app_a_SOURCES = \ + %D%/close.c \ + %D%/fstat.c \ + %D%/getpid.c \ + %D%/kill.c \ + %D%/lseek.c \ + %D%/open.c \ + %D%/stat.c \ + %D%/unlink.c \ + %D%/eva_app.c \ + %D%/isatty.c + +## Stub stuff +multilibtool_PROGRAMS += %D%/eva_stub.elf +%C%_eva_stub_elf_SOURCES = \ + %D%/xstormy16_stub.c \ + %D%/crt0_stub.s +%C%_eva_stub_elf_LDFLAGS = \ + $(AM_LDFLAGS) \ + -nostartfiles -T$(srcdir)/%D%/eva_stub.ld + +multilibtool_DATA += \ + %D%/eva_stub.hex +%D%/eva_stub.hex: %D%/eva_stub.elf + $(AM_V_GEN)$(OBJCOPY) -O ihex $< $@ +CLEANFILES += %D%/eva_stub.hex |