source: trunk/libs/newlib/src/newlib/libc/Makefile.am @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 6.0 KB
Line 
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_STDIO_DIR
22STDIO_SUBDIR = stdio
23endif
24
25if HAVE_STDIO64_DIR
26STDIO64_SUBDIR = stdio64
27endif
28
29if ENABLE_NEWLIB_ICONV
30NEWLIB_ICONV_DIRS = iconv
31NEWLIB_ICONV_LIBS = iconv/ces/lib.$(aext) iconv/ccs/lib.$(aext) iconv/lib/lib.$(aext)
32else
33NEWLIB_ICONV_DIRS =
34NEWLIB_ICONV_LIBS =
35endif
36
37if HAVE_XDR_DIR
38XDR_SUBDIR = xdr
39endif
40
41# The order of SUBDIRS is important for the integrated documentation.
42# Do not change the order without considering the doc impact.
43SUBDIRS = 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
47noinst_DATA = $(CRT0)
48
49if USE_LIBTOOL
50noinst_LTLIBRARIES = libc.la
51SUBLIBS = \
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)
73else
74noinst_LIBRARIES = libc.a
75SUBLIBS = \
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)
98endif
99
100libc_la_LDFLAGS = -Xcompiler -nostdlib
101
102if USE_LIBTOOL
103libc_la_SOURCES =
104libc_la_LIBADD = $(SUBLIBS)
105libc_la_DEPENDENCIES = $(SUBLIBS)
106else
107libc.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
118endif # USE_LIBTOOL
119
120$(SUBLIBS): ; @true
121
122crt0.o: sys/crt0.o
123        rm -f $@
124        ln sys/crt0.o $@ >/dev/null 2>/dev/null || cp sys/crt0.o $@
125
126sys/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.
132SUBDEFS = \
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
148SUBXMLS = $(SUBDEFS:stmp-def=stmp-xml)
149
150libc.info: sigset.texi extra.texi stdio64.texi posix.texi iconvset.texi \
151        targetdep.tex $(SUBDEFS)
152
153libc.dvi: sigset.texi extra.texi stdio64.texi posix.texi iconvset.texi \
154        targetdep.tex $(SUBDEFS)
155
156stmp-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
165sigset.texi: stmp-sigset ; @true
166
167stmp-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
176iconvset.texi: stmp-iconvset ; @true
177
178stmp-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
187extra.texi: stmp-extra ; @true
188
189stmp-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
198stdio64.texi: stmp-stdio64 ; @true
199
200stmp-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
209posix.texi: stmp-posix ; @true
210
211stmp-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
223targetdep.tex: stmp-targetdep ; @true
224
225$(SUBDEFS): stmp-targetdep ; @true
226
227info_TEXINFOS = libc.texinfo
228libc_TEXINFOS = sigset.texi extra.texi posix.texi stdio64.texi iconvset.texi \
229        targetdep.tex $(SUBDEFS)
230
231docbook-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
240man: $(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
244install-man: man
245        mkdir -p $(DESTDIR)$(mandir)/man3
246        $(INSTALL_DATA) *.3 $(DESTDIR)$(mandir)/man3
247
248.PHONY: force
249force:
250
251CLEANFILES = $(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
258ACLOCAL_AMFLAGS = -I .. -I ../..
259CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
Note: See TracBrowser for help on using the repository browser.