1## Process this file with automake to generate Makefile.in 2 3AUTOMAKE_OPTIONS = cygnus 4 5if HAVE_POSIX_DIR 6POSIX_SUBDIR = posix 7endif 8 9if HAVE_SIGNAL_DIR 10SIGNAL_SUBDIR = signal 11endif 12 13if HAVE_SYSCALL_DIR 14SYSCALLS_SUBDIR = syscalls 15endif 16 17if HAVE_UNIX_DIR 18UNIX_SUBDIR = unix 19endif 20 21if HAVE_STDIO64_DIR 22STDIO64_SUBDIR = stdio64 23endif 24 25if ENABLE_NEWLIB_ICONV 26NEWLIB_ICONV_DIRS = iconv 27NEWLIB_ICONV_LIBS = iconv/ces/lib.$(aext) iconv/ccs/lib.$(aext) iconv/lib/lib.$(aext) 28else 29NEWLIB_ICONV_DIRS = 30NEWLIB_ICONV_LIBS = 31endif 32 33# The order of SUBDIRS is important for the integrated documentation. 34# Do not change the order without considering the doc impact. 35SUBDIRS = argz stdlib ctype search stdio $(STDIO64_SUBDIR) string $(SIGNAL_SUBDIR) time locale sys reent \ 36 $(extra_dir) errno misc machine $(UNIX_SUBDIR) $(POSIX_SUBDIR) $(SYSCALLS_SUBDIR) $(NEWLIB_ICONV_DIRS) . 37 38noinst_DATA = $(CRT0) 39 40if USE_LIBTOOL 41noinst_LTLIBRARIES = libc.la 42SUBLIBS = \ 43 argz/libargz.$(aext) \ 44 stdlib/libstdlib.$(aext) \ 45 ctype/libctype.$(aext) \ 46 search/libsearch.$(aext) \ 47 stdio/libstdio.$(aext) \ 48 $(LIBC_STDIO64_LIB) \ 49 string/libstring.$(aext) \ 50 $(LIBC_SIGNAL_LIB) \ 51 time/libtime.$(aext) \ 52 locale/liblocale.$(aext) \ 53 $(LIBC_SYS_LIB) \ 54 reent/libreent.$(aext) \ 55 $(LIBC_EXTRA_LIB) \ 56 errno/liberrno.$(aext) \ 57 misc/libmisc.$(aext) \ 58 $(LIBC_MACHINE_LIB) \ 59 $(LIBC_UNIX_LIB) \ 60 $(LIBC_POSIX_LIB) \ 61 $(LIBC_SYSCALL_LIB) 62else 63noinst_LIBRARIES = libc.a 64SUBLIBS = \ 65 argz/lib.$(aext) \ 66 stdlib/lib.$(aext) \ 67 ctype/lib.$(aext) \ 68 search/lib.$(aext) \ 69 stdio/lib.$(aext) \ 70 $(LIBC_STDIO64_LIB) \ 71 string/lib.$(aext) \ 72 $(LIBC_SIGNAL_LIB) \ 73 time/lib.$(aext) \ 74 locale/lib.$(aext) \ 75 $(LIBC_SYS_LIB) \ 76 reent/lib.$(aext) \ 77 $(LIBC_EXTRA_LIB) \ 78 errno/lib.$(aext) \ 79 misc/lib.$(aext) \ 80 $(LIBC_MACHINE_LIB) \ 81 $(LIBC_UNIX_LIB) \ 82 $(LIBC_POSIX_LIB) \ 83 $(LIBC_SYSCALL_LIB) \ 84 $(NEWLIB_ICONV_LIBS) 85endif 86 87libc_la_LDFLAGS = -Xcompiler -nostdlib 88 89if USE_LIBTOOL 90libc_la_SOURCES = 91libc_la_LIBADD = $(SUBLIBS) 92libc_la_DEPENDENCIES = $(SUBLIBS) 93else 94libc.a: $(SUBLIBS) 95 rm -f $@ 96 rm -rf tmp 97 mkdir tmp 98 cd tmp; \ 99 for i in $(SUBLIBS); do \ 100 $(AR) x ../$$i; \ 101 done; \ 102 $(AR) $(AR_FLAGS) ../$@ *.o 103 $(RANLIB) $@ 104 rm -rf tmp 105endif # USE_LIBTOOL 106 107$(SUBLIBS): ; @true 108 109crt0.o: sys/crt0.o 110 rm -f $@ 111 ln sys/crt0.o $@ >/dev/null 2>/dev/null || cp sys/crt0.o $@ 112 113sys/crt0.o: ; @true 114 115info_TEXINFOS = libc.texinfo 116 117# This is a list of the stmp-def files in each subdirectory which 118# builds .def files. We don't list subdirectories which don't build 119# .def files; if the list of subdirectories changes, we must change 120# this as well. 121SUBDEFS = \ 122 stdlib/stmp-def \ 123 ctype/stmp-def \ 124 stdio/stmp-def \ 125 $(LIBC_STDIO64_DEF) \ 126 string/stmp-def \ 127 $(LIBC_SIGNAL_DEF) \ 128 time/stmp-def \ 129 locale/stmp-def \ 130 reent/stmp-def \ 131 $(LIBC_EXTRA_DEF) \ 132 misc/stmp-def 133 134libc.info: sigset.texi extra.texi stdio64.texi iconvset.texi \ 135 targetdep.tex $(SUBDEFS) 136 137stmp-sigset: config.status 138 if test -n "$(LIBC_SIGNAL_LIB)"; then \ 139 echo "@set SIGNALS" >tmp.texi; \ 140 else \ 141 echo "@clear SIGNALS" >tmp.texi; \ 142 fi 143 $(SHELL) $(newlib_basedir)/../move-if-change tmp.texi sigset.texi 144 touch $@ 145 146sigset.texi: stmp-sigset ; @true 147 148stmp-iconvset: config.status 149 if test -n "$(NEWLIB_ICONV_LIBS)"; then \ 150 echo "@set ICONV" >tmp.texi; \ 151 else \ 152 echo "@clear ICONV" >tmp.texi; \ 153 fi 154 $(SHELL) $(newlib_basedir)/../move-if-change tmp.texi iconvset.texi 155 touch $@ 156 157iconvset.texi: stmp-iconvset ; @true 158 159stmp-extra: config.status 160 if test -n "$(LIBC_EXTRA_LIB)"; then \ 161 echo "@set EXTRA" >tmp.texi; \ 162 else \ 163 echo "@clear EXTRA" >tmp.texi; \ 164 fi 165 $(SHELL) $(newlib_basedir)/../move-if-change tmp.texi extra.texi 166 touch $@ 167 168extra.texi: stmp-extra ; @true 169 170stmp-stdio64: config.status 171 if test -n "$(LIBC_STDIO64_LIB)"; then \ 172 echo "@set STDIO64" >tmp.texi; \ 173 else \ 174 echo "@clear STDIO64" >tmp.texi; \ 175 fi 176 $(SHELL) $(newlib_basedir)/../move-if-change tmp.texi stdio64.texi 177 touch $@ 178 179stdio64.texi: stmp-stdio64 ; @true 180 181stmp-targetdep: force 182 rm -f tmp.texi 183 targetdoc=`pwd`/tmp.texi; \ 184 for d in $(SUBDIRS); do \ 185 if test "$$d" != "."; then \ 186 (cd $$d && $(MAKE) TARGETDOC=$${targetdoc} doc) || exit 1; \ 187 fi; \ 188 done 189 cat $(srcdir)/sys.tex >>tmp.texi 190 $(SHELL) $(newlib_basedir)/../move-if-change tmp.texi targetdep.tex 191 touch $@ 192 193targetdep.tex: stmp-targetdep ; @true 194 195$(SUBDEFS): stmp-targetdep ; @true 196 197.PHONY: force 198force: 199 200CLEANFILES = $(CRT0) \ 201 sigset.texi stmp-sigset extra.texi stmp-extra \ 202 stdio64.texi stmp-stdio64 tmp.texi targetdep.tex stmp-targetdep 203 204ACLOCAL_AMFLAGS = -I .. 205CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host 206