1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = cygnus dejagnu
5 # Multilib support variables.
13 LIBTOOL_VERSION_INFO = 0:0:0
21 # Work around what appears to be a GNU make bug handling MAKEFLAGS
22 # values defined in terms of make variables, as is the case for CC and
23 # friends when we are called from the top level Makefile.
25 "AR_FLAGS=$(AR_FLAGS)" \
26 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
28 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
29 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
30 "LDFLAGS=$(LDFLAGS)" \
31 "LIBCFLAGS=$(LIBCFLAGS)" \
32 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
34 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
35 "PICFLAG=$(PICFLAG)" \
36 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
39 "RUNTEST=$(RUNTEST)" \
40 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
41 "exec_prefix=$(exec_prefix)" \
42 "infodir=$(infodir)" \
45 "tooldir=$(tooldir)" \
46 "top_toollibdir=$(toollibdir)" \
49 "CC=$(CC_FOR_NEWLIB)" \
51 "LIBCFLAGS=$(LIBCFLAGS)" \
53 "PICFLAG=$(PICFLAG)" \
57 FLAGS_TO_PASS=$(AM_MAKEFLAGS)
66 $(DOCDIR) . $(EXTRA_DIRS)
68 tooldir = $(exec_prefix)/$(host_alias)
69 toollibdir = $(tooldir)/lib$(MULTISUBDIR)
74 toollib_LTLIBRARIES = libm.la \
77 toollib_LIBRARIES = libm.a \
81 noinst_DATA = stmp-targ-include
83 toollib_DATA = $(CRT0) $(CRT1)
86 # The functions ldexp, frexp and modf are traditionally supplied in
87 # both libc.a and libm.a. We build them in libm.a and copy them over,
88 # along with some required supporting routines.
90 s_isinf.$(oext) sf_isinf.$(oext) \
91 s_isnan.$(oext) sf_isnan.$(oext) \
92 s_ldexp.$(oext) sf_ldexp.$(oext) \
93 s_frexp.$(oext) sf_frexp.$(oext) \
95 sf_modf.$(oext) s_scalbn.$(oext) \
97 s_finite.$(oext) sf_finite.$(oext) \
98 s_copysign.$(oext) sf_copysign.$(oext) \
102 $(POSIX_OBJECTLIST) \
103 $(SIGNAL_OBJECTLIST) \
104 $(SYSCALL_OBJECTLIST) \
106 $(STDIO64_OBJECTLIST) \
107 libc/argz/objectlist.awk.in \
108 libc/stdlib/objectlist.awk.in \
109 libc/time/objectlist.awk.in \
110 libc/ctype/objectlist.awk.in \
111 libc/search/objectlist.awk.in \
112 libc/string/objectlist.awk.in \
113 libc/locale/objectlist.awk.in \
114 libc/misc/objectlist.awk.in \
115 libc/reent/objectlist.awk.in \
116 libc/errno/objectlist.awk.in \
117 libc/stdio/objectlist.awk.in \
118 $(MACHINE_OBJECTLIST) \
120 $(SYS_MACH_OBJECTLIST)
123 libm/$(MATHDIR)/objectlist.awk.in \
124 libm/common/objectlist.awk.in \
125 $(LIBM_MACHINE_OBJECTLIST)
127 libm_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -objectlist libm-libtool-objectlist
129 libc_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -objectlist libc-libtool-objectlist
133 libm_la_DEPENDENCIES = libm-libtool-objectlist
135 # objects listed later in LIBM_OBJECTLISTS will override those listed earlier
136 libm-libtool-objectlist: $(LIBM_OBJECTLISTS)
137 cat $(LIBM_OBJECTLISTS) | $(AWK) '{ libm[$$1] = $$2 }; END { for (x in libm) printf ("%s\n", libm[x]) }' > $@
140 libc_la_DEPENDENCIES = libc-libtool-objectlist
142 # objects listed later in LIBM_OBJECTLISTS and LIBC_OBJECTLISTS will override those listed earlier
143 libc-libtool-objectlist: $(LIBM_OBJECTLISTS) $(LIBC_OBJECTLISTS)
144 cat $(LIBM_OBJECTLISTS) $(LIBC_OBJECTLISTS) | $(AWK) '{ libc[$$1] = $$2 }; END { for (x in libc) printf ("%s\n", libc[x]) }' > $@
148 libc.a: libc/libc.a libm.a
149 rm -rf libc.a libg.a tmp
152 $(AR) x ../libm.a $(MATHOBJS_IN_LIBC) ; \
153 $(AR) x ../libc/libc.a ; \
154 $(AR) $(AR_FLAGS) ../$@ *.o
156 ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a
163 ln libm/libm.a $@ >/dev/null 2>/dev/null || cp libm/libm.a $@
169 crt0.o: $(CRT0_DIR)$(CRT0)
171 ln $(CRT0_DIR)$(CRT0) $@ >/dev/null 2>/dev/null \
172 || cp $(CRT0_DIR)$(CRT0) $@
174 $(CRT0_DIR)$(CRT0): ; @true
176 crt1.o: $(CRT1_DIR)$(CRT1)
178 ln $(CRT0_DIR)$(CRT0) $@ >/dev/null 2>/dev/null \
179 || cp $(CRT0_DIR)$(CRT0) $@
181 $(CRT1_DIR)$(CRT1): ; @true
184 all-recursive: stmp-targ-include
186 # The targ-include directory just holds the includes files for the
187 # particular system and machine we have been configured for. It is
188 # used while building.
189 stmp-targ-include: config.status
190 -rm -rf targ-include stmp-targ-include
191 mkdir targ-include targ-include/sys targ-include/machine
192 cp newlib.h targ-include/newlib.h
193 -for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
194 if [ -f $$i ]; then \
195 cp $$i targ-include/machine/`basename $$i`; \
198 -for i in $(srcdir)/libc/sys/$(sys_dir)/include/*.h; do \
199 if [ -f $$i ]; then \
200 cp $$i targ-include/`basename $$i`; \
203 -for i in $(srcdir)/libc/sys/$(sys_dir)/sys/*.h; do \
204 if [ -f $$i ]; then \
205 cp $$i targ-include/sys/`basename $$i`; \
208 -for i in $(srcdir)/libc/sys/$(sys_dir)/machine/*.h; do \
209 if [ -f $$i ]; then \
210 cp $$i targ-include/machine/`basename $$i`; \
213 -for i in $(srcdir)/libc/sys/$(sys_dir)/machine/$(machine_dir)/*.h; do \
214 if [ -f $$i ]; then \
215 cp $$i targ-include/machine/`basename $$i`; \
218 -for i in $(srcdir)/libc/sys/$(sys_dir)/machine/$(machine_dir)/include/*.h; do \
219 if [ -f $$i ]; then \
220 cp $$i targ-include/machine/`basename $$i`; \
225 CLEANFILES = targ-include stmp-targ-include
227 install-data-local: install-toollibLIBRARIES
230 rm -f $(DESTDIR)$(toollibdir)/libg.a
231 ln $(DESTDIR)$(toollibdir)/libc.a $(DESTDIR)$(toollibdir)/libg.a >/dev/null 2>/dev/null || cp $(DESTDIR)$(toollibdir)/libc.a $(DESTDIR)$(toollibdir)/libg.a
233 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
234 -if [ -z "$(MULTISUBDIR)" ]; then \
235 $(mkinstalldirs) $(DESTDIR)$(tooldir)/include; \
236 for i in $(srcdir)/libc/include/*.h; do \
237 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
239 $(INSTALL_DATA) newlib.h $(DESTDIR)$(tooldir)/include/newlib.h; \
240 $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/machine; \
241 for i in $(srcdir)/libc/include/machine/*.h; do \
242 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
244 for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
245 if [ -f $$i ]; then \
246 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
249 $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
250 for i in $(srcdir)/libc/include/sys/*.h; do \
251 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
253 for i in $(srcdir)/libc/sys/$(sys_dir)/sys/*.h; do \
254 if [ -f $$i ]; then \
255 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
258 for i in $(srcdir)/libc/sys/$(sys_dir)/machine/*.h; do \
259 if [ -f $$i ]; then \
260 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
263 for i in $(srcdir)/libc/sys/$(sys_dir)/include/*.h; do \
264 if [ -f $$i ]; then \
265 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
268 for i in $(srcdir)/libc/sys/$(sys_dir)/machine/$(machine_dir)/include/*.h; do \
269 if [ -f $$i ]; then \
270 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
275 # Force makedoc to be built before building info files.
276 info-recursive: doc/makedoc
277 dvi-recursive: doc/makedoc
279 cd doc && $(MAKE) all
281 CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
284 .PHONY: all-multi check-multi mostlyclean-multi clean-multi distclean-multi \
285 maintainer-clean-multi
287 all-recursive: all-multi
288 check-recursive: check-multi
289 mostlyclean-recursive: mostlyclean-multi
290 clean-recursive: clean-multi
291 distclean-recursive: distclean-multi
292 maintainer-clean-recursive: maintainer-clean-multi
294 # The $(MAKE) comments below are to enable parallel building.
296 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
298 $(MULTIDO) $(AM_MAKEFLAGS) DO=check multi-do # $(MAKE)
300 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
302 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
304 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
305 maintainer-clean-multi:
306 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE)
315 @echo 'Making a new site.exp file...'
316 @test ! -f site.bak || rm -f site.bak
317 @echo '## these variables are automatically generated by make ##' > $@-t
318 @echo '# Do not edit here. If you wish to override these values' >> $@-t
319 @echo '# edit the last section' >> $@-t
320 @echo 'set tool $(DEJATOOL)' >> $@-t
321 @echo 'set tool_version $(VERSION)' >> $@-t
322 @echo 'set srcdir $(srcdir)/testsuite' >> $@-t
323 @echo 'set objdir' `pwd` >> $@-t
324 @echo 'set multibuildtop ./$(MULTIBUILDTOP)' >> $@-t
325 @echo 'set host_alias $(build_alias)' >> $@-t
326 @echo 'set host_triplet $(build_triplet)' >> $@-t
327 @echo 'set target_alias $(host_alias)' >> $@-t
328 @echo 'set target_triplet $(host_triplet)' >> $@-t
329 @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
330 @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
331 @test ! -f site.exp || mv site.exp site.bak
334 check-DEJAGNU: site.exp
335 @if [ -d testsuite ] ; then \
340 @rm -f testsuite/site.exp
341 @cp site.exp testsuite/site.exp
344 srcdir=`cd ${srcdir}; pwd` ; \
346 EXPECT=`if [ -f $${rootme}/${MULTIBUILDTOP}../../expect/expect ] ; then \
347 echo $${rootme}/${MULTIBUILDTOP}../../expect/expect ; \
352 echo "Found expect: $${EXPECT}" ; \
353 if [ -f $(top_builddir)/$(MULTIBUILDTOP)../../expect/expect ] ; then \
354 TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd` ; \
355 export TCL_LIBRARY ; \
356 echo "Found TCL library directory: $${TCL_LIBRARY}" ; \
358 RUNTEST=`if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
359 echo $${srcdir}/../dejagnu/runtest ; \
364 echo "Found runtest: $${RUNTEST}" ; \
366 if $(SHELL) -c "$$RUNTEST --version" > /dev/null 2>&1 ; then \
367 $$RUNTEST --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite $(RUNTESTFLAGS) ; \
370 echo "WARNING: could not find \`runtest'" 1>&2 ; \