OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [Makefile.in] - Rev 39

Go to most recent revision | Compare with Previous | Blame | View Log

# Makefile for newlib/libc.
# Copyright (c) 1994, 1995, 1997 Cygnus Support.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# at Cygnus Support, Inc.  Cygnus Support, Inc. may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

VERSION = 1.8.1

srcdir = .

prefix = /usr/local

exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib

datadir = $(prefix)/share

mandir = $(prefix)/man
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = $(prefix)/info
includedir = $(prefix)/include

# Used for docn; upper-level Makefile may clear this in some configs
signal_dir = signal

SHELL = /bin/sh

INSTALL = install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)

AR_FLAGS = qv
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
TEXIDIR=$(srcdir)/../../texinfo
SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$$TEXINPUTS

TOP = ..
SRCTOP = ..
TARGETDOC = `echo $${rootpre}./targetdep.tex`

.NOEXPORT:
MAKEOVERRIDES=

#### Host, target, and site specific Makefile fragments come in here.
###

# These are roughly topologically sorted in order to make porting more
# streamlined.
FLAGS_TO_PASS = \
        "CC=$(CC)" \
        "CFLAGS=$(CFLAGS)" \
        "AR=$(AR)" \
        "AR_FLAGS=$(AR_FLAGS)" \
        "AS=$(AS)" \
        "DLLTOOL=$(DLLTOOL)" \
        "CROSS_CFLAGS=$(CROSS_CFLAGS)" \
        "TARGET_CFLAGS=$(TARGET_CFLAGS)" \
        "TARGET_ASFLAGS=$(TARGET_ASFLAGS)" \
        "INCLUDES=$(INCLUDES)"

# The order of SUBDIRS is very important to the integrated documentation;
# DO NOT CHANGE this order without considering doc impact.
#
LIBC_SIGNAL_LIB =
LIBC_SYS_LIB =
LIBC_MACHINE_LIB =
LIBC_UNIX_LIB =
LIBC_POSIX_LIB =
LIBC_SYSCALL_LIB =
CRT0 =

SUBDIRS = stdlib ctype stdio string signal time locale sys reent errno \
        misc machine unix posix syscalls

SUBLIBS = \
        stdlib/lib.a \
        ctype/lib.a \
        stdio/lib.a \
        string/lib.a \
        $(LIBC_SIGNAL_LIB) \
        time/lib.a \
        locale/lib.a \
        $(LIBC_SYS_LIB) \
        reent/lib.a \
        errno/lib.a \
        misc/lib.a \
        $(LIBC_MACHINE_LIB) \
        $(LIBC_UNIX_LIB) \
        $(LIBC_POSIX_LIB) \
        $(LIBC_SYSCALL_LIB)

all: libc.a $(CRT0)
libc.a: $(SUBLIBS)
        rm -f $@
        rm -rf tmp
        mkdir tmp
        rootpre=`pwd`/; export rootpre; \
        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre ; \
        cd tmp ; \
                for i in $(SUBLIBS) ; do \
                        $(AR) x ../$$i ; \
                done ; \
                $(AR) $(AR_FLAGS) ../$@ *.o
        $(RANLIB) $@
        rm -rf tmp

crt0.o: sys/crt0.o
        rm -f $@
        ln sys/crt0.o $@ >/dev/null 2>/dev/null || cp sys/crt0.o $@

sys/crt0.o: $(LIBC_SYS_LIB)

$(SUBLIBS): force
        @rootpre=`pwd`/; export rootpre; \
        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
        (cd `echo $@ | sed -e 's:/[^/]*$$::'` ; \
                $(MAKE) $(FLAGS_TO_PASS) all) \
        || exit 1

clean-here:
        rm -f core *~ libc.a crt0.o
        rm -f libc.cp libc.dvi targetdep.tex libc.log libc.cps
        rm -f libc.aux libc.toc libc.fn libc.vr libc.tp libc.ky
        rm -f libc.pg libc.fns libc.kys libc.pgs libc.tps libc.vrs

clean mostlyclean: clean-here
        @rootpre=`pwd`/; export rootpre; \
        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
        for i in $(SUBDIRS); do \
          if [ -f ./$$i/Makefile ] ; then \
            (cd $$i ; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1 ; \
          else true ; fi ; \
        done

distclean maintainer-clean realclean: clean-here
        @rootpre=`pwd`/; export rootpre; \
        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
        for i in $(SUBDIRS); do \
          if [ -f ./$$i/Makefile ] ; then \
            (cd $$i ; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1 ; \
          else true ; fi ; \
        done
        rm -f Makefile config.status

info:
        -rm -f targetdep.tex
        if [ -n "$(signal_dir)" ]; then \
          echo "@set SIGNALS" >sigset.texi ; else \
          echo "@clear SIGNALS" >sigset.texi ; fi
        @rootpre=`pwd`/; export rootpre; \
        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
        $(MAKE) "CHEW=$(CHEW)" "TARGETDOC=$(TARGETDOC)" targetdep.tex
        $(MAKEINFO) -o libc.info $(srcdir)/libc.texinfo

targetdep.tex:
        touch targetdep.tex
        @rootpre=`pwd`/; export rootpre; \
        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
        for i in $(SUBDIRS); do \
          if [ -f ./$$i/Makefile ] ; then \
            (cd $$i ; $(MAKE) "CHEW=$(CHEW)" "TARGETDOC=$(TARGETDOC)" doc) \
            || exit 1 ; \
          else true ; fi ; \
        done
        cat $(srcdir)/sys.tex >> $(TARGETDOC)

docs: dvi

dvi:
        -rm -f targetdep.tex
        @rootpre=`pwd`/; export rootpre; \
        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
        $(MAKE) $(FLAGS_TO_PASS) "CHEW=$(CHEW)" "TARGETDOC=$(TARGETDOC)" \
             targetdep.tex
        $(SET_TEXINPUTS) $(TEXI2DVI) $(srcdir)/libc.texinfo

install:

install-info:
        -for i in libc.info*; do \
            $(INSTALL_DATA) $$i $(infodir)/$$i; \
          done

force:

Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
        $(SHELL) config.status

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.