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