# Top level makefile for libgloss # # Copyright (c) 1995, 1996 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 = /home/seti/riscv-gnu-toolchain/newlib/libgloss srcdir = /home/seti/riscv-gnu-toolchain/newlib/libgloss objdir = . srcroot = $(srcdir)/../.. objroot = $(objdir)/../.. prefix = /home/seti/riscv-gnu-toolchain/install-newlib-nano exec_prefix = ${prefix} host_alias = riscv32-unknown-elf target_alias = riscv32-unknown-elf bindir = ${exec_prefix}/bin libdir = ${exec_prefix}/lib tooldir = $(exec_prefix)/$(target_alias) TOP = . SRCTOP = . # Multilib support variables. # TOP is used instead of MULTI{BUILD,SRC}TOP. MULTISRCTOP = MULTIBUILDTOP = MULTIDIRS = MULTISUBDIR = MULTIDO = $(MAKE) MULTICLEAN = $(MAKE) INSTALL = /usr/bin/install -c INSTALL_PROGRAM = /usr/bin/install -c INSTALL_DATA = /usr/bin/install -c -m 644 SHELL = /bin/sh CC = riscv32-unknown-elf-gcc -B/home/seti/riscv-gnu-toolchain/build-newlib-nano/riscv32-unknown-elf/newlib/ -isystem /home/seti/riscv-gnu-toolchain/build-newlib-nano/riscv32-unknown-elf/newlib/targ-include -isystem /home/seti/riscv-gnu-toolchain/newlib/newlib/libc/include -B/home/seti/riscv-gnu-toolchain/build-newlib-nano/riscv32-unknown-elf/libgloss/riscv32 -L/home/seti/riscv-gnu-toolchain/build-newlib-nano/riscv32-unknown-elf/libgloss/libnosys -L/home/seti/riscv-gnu-toolchain/newlib/libgloss/riscv32 AS = riscv32-unknown-elf-as AR = riscv32-unknown-elf-ar LD = riscv32-unknown-elf-ld RANLIB = riscv32-unknown-elf-ranlib AR_FLAGS = qv BISON = bison MAKEINFO = makeinfo SUBDIRS = doc riscv libnosys .NOEXPORT: MAKEOVERRIDES= # Host specific makefile fragment comes in here. NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi` INCLUDES = -I. -I$(srcdir)/.. # Note that when building the library, ${MULTILIB} is not the way multilib # options are passed; they're passed in $(CFLAGS). CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS} LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS} AR_FLAGS = rc .c.o: $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $< .C.o: $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $< .s.o: $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $< # # GCC knows to run the preprocessor on .S files before it assembles them. # .S.o: $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< # # this is a bogus target that'll produce an assembler from the # C source with the right compiler options. this is so we can # track down code generation or debug symbol bugs. # .c.s: $(CC) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $(CFLAGS) $< # These are roughly topologically sorted in order to make porting more # streamlined. FLAGS_TO_PASS = \ "CC=$(CC)" \ "CFLAGS=$(CFLAGS)" \ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ "CCASFLAGS=$(CCASFLAGS)" \ "AR=$(AR)" \ "RANLIB=$(RANLIB)" \ "AR_FLAGS=$(AR_FLAGS)" \ "MAKEINFO=$(MAKEINFO)" \ "AS=$(AS)" \ "LD=$(LD)" \ "CROSS_CFLAGS=$(CROSS_CFLAGS)" \ "TARGET_CFLAGS=$(TARGET_CFLAGS)" \ "exec_prefix=$(exec_prefix)" \ "prefix=$(prefix)" \ "tooldir=$(tooldir)" \ "infodir=$(infodir)" \ "libdir=$(libdir)" \ "top_toollibdir=$(toollibdir)" \ "INSTALL=$(INSTALL)" \ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ "INSTALL_DATA=$(INSTALL_DATA)" \ "DESTDIR=$(DESTDIR)" all: stmp-bsp force +@rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all stmp-bsp: force @rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ for dir in .. ${SUBDIRS}; do \ if [ x$$dir != x.. ]; then \ if [ -d $$dir ]; then \ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)) || exit $$?; \ else true; fi; \ else true; fi; \ done install: force @rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ for dir in .. ${SUBDIRS}; do \ if [ x$$dir != x.. ]; then \ if [ -d $$dir ]; then \ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install) || exit $$?; \ else true; fi; \ else true; fi; \ done @rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install test: force @rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ for dir in .. ${SUBDIRS}; do \ if [ x$$dir != x.. ]; then \ if [ -d $$dir ]; then \ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) test); \ else true; fi; \ else true; fi; \ done @rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=test clean-here: -rm -f *~ core *.o a.out xgdb *.x clean mostlyclean: clean-here rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \ $(MULTICLEAN) multi-clean DO=$@ distclean maintainer-clean realclean: clean-here -rm -f Makefile config.cache config.log config.status -rm -f *-init.exp site.* -rm -fr *.log summary detail *.sum rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ $(MAKE) DO=$@ DODIRS="$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do; \ $(MULTICLEAN) multi-clean DO=$@ .PHONY: info install-info clean-info html pdf subdir_do: @rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ for i in .. $(DODIRS); do \ if [ x$$i != x.. ]; then \ if [ -f ./$$i/Makefile ]; then \ if (cd ./$$i; $(MAKE) $(FLAGS_TO_PASS) $(DO)); then \ true; \ else \ exit 1; \ fi; \ else true; fi; \ else true; fi; \ done info dvi html pdf docs: rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do install-info: rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do install-html: rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do install-pdf: rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ $(MAKE) DO=$@ DODIRS=doc $(FLAGS_TO_PASS) subdir_do clean-info: force: Makefile: Makefile.in config.status /home/seti/riscv-gnu-toolchain/newlib/libgloss/config/default.mh $(SHELL) config.status config.status: configure $(SHELL) config.status --recheck PWD_COMMAND=$${PWDCMD-pwd} # FIXME: There should be an @-sign in front of the `if'. # Leave out until this is tested a bit more. multi-do: if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ rootpre=`${PWD_COMMAND}`/; export rootpre; \ srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \ lib=`echo "$${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \ compiler="$(CC)"; \ for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \ dir=`echo $$i | sed -e 's/;.*$$//'`; \ if [ "$${dir}" = "." ]; then \ true; \ else \ if [ -d ../$${dir}/$${lib} ]; then \ flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(CFLAGS) $${flags}" \ CCASFLAGS="$(CCASFLAGS) $${flags}" \ FCFLAGS="$(FCFLAGS) $${flags}" \ FFLAGS="$(FFLAGS) $${flags}" \ ADAFLAGS="$(ADAFLAGS) $${flags}" \ prefix="$(prefix)" \ exec_prefix="$(exec_prefix)" \ GCJFLAGS="$(GCJFLAGS) $${flags}" \ GOCFLAGS="$(GOCFLAGS) $${flags}" \ CXXFLAGS="$(CXXFLAGS) $${flags}" \ LIBCFLAGS="$(LIBCFLAGS) $${flags}" \ LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \ LDFLAGS="$(LDFLAGS) $${flags}" \ MULTIFLAGS="$${flags}" \ DESTDIR="$(DESTDIR)" \ INSTALL="$(INSTALL)" \ INSTALL_DATA="$(INSTALL_DATA)" \ INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \ INSTALL_SCRIPT="$(INSTALL_SCRIPT)" \ $(DO)); then \ true; \ else \ exit 1; \ fi; \ else true; \ fi; \ fi; \ done; \ fi # FIXME: There should be an @-sign in front of the `if'. # Leave out until this is tested a bit more. multi-clean: if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \ for dir in : $(MULTIDIRS); do \ test $$dir != : || continue; \ if [ -f ../$${dir}/$${lib}/Makefile ]; then \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \ then true; \ else exit 1; \ fi; \ else true; \ fi; \ done; \ fi