1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = cygnus
5 # Multilib support variables.
13 # Work around what appears to be a GNU make bug handling MAKEFLAGS
14 # values defined in terms of make variables, as is the case for CC and
15 # friends when we are called from the top level Makefile.
17 "AR_FLAGS=$(AR_FLAGS)" \
18 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
20 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
21 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
22 "LDFLAGS=$(LDFLAGS)" \
23 "LIBCFLAGS=$(LIBCFLAGS)" \
24 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
26 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
27 "PICFLAG=$(PICFLAG)" \
28 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
31 "RUNTEST=$(RUNTEST)" \
32 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
33 "exec_prefix=$(exec_prefix)" \
34 "infodir=$(infodir)" \
37 "tooldir=$(tooldir)" \
42 "LIBCFLAGS=$(LIBCFLAGS)" \
44 "PICFLAG=$(PICFLAG)" \
48 FLAGS_TO_PASS=$(AM_MAKEFLAGS)
54 SUBDIRS = libc libm $(DOCDIR) .
56 tooldir = $(exec_prefix)/$(host_alias)
57 toollibdir = $(tooldir)/lib$(MULTISUBDIR)
61 toollib_LIBRARIES = libm.a libc.a
62 toollib_DATA = $(CRT0)
63 noinst_DATA = stmp-targ-include
65 # The functions ldexp, frexp and modf are traditionally supplied in
66 # both libc.a and libm.a. We build them in libm.a and copy them over,
67 # along with some required supporting routines.
69 s_isinf.o sf_isinf.o \
70 s_isnan.o sf_isnan.o \
71 s_ldexp.o sf_ldexp.o \
72 s_frexp.o sf_frexp.o s_modf.o sf_modf.o \
73 s_scalbn.o sf_scalbn.o s_finite.o sf_finite.o \
74 s_copysign.o sf_copysign.o s_infconst.o
76 libc.a: libc/libc.a libm.a
77 rm -rf libc.a libg.a tmp
80 $(AR) x ../libm.a $(MATHOBJS_IN_LIBC) ; \
81 $(AR) x ../libc/libc.a ; \
82 $(AR) $(AR_FLAGS) ../$@ *.o
84 ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a
91 ln libm/libm.a $@ >/dev/null 2>/dev/null || cp libm/libm.a $@
95 crt0.o: $(CRT0_DIR)/$(CRT0)
97 ln $(CRT0_DIR)/$(CRT0) $@ >/dev/null 2>/dev/null \
98 || cp $(CRT0_DIR)/$(CRT0) $@
100 $(CRT0_DIR)/$(CRT0): ; @true
102 all-recursive: stmp-targ-include
104 # The targ-include directory just holds the includes files for the
105 # particular system and machine we have been configured for. It is
106 # used while building.
107 stmp-targ-include: config.status
108 -rm -rf targ-include stmp-targ-include
109 mkdir targ-include targ-include/sys targ-include/machine
110 -for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
111 if [ -f $$i ]; then \
112 cp $$i targ-include/machine/`basename $$i`; \
115 -for i in $(srcdir)/libc/sys/$(sys_dir)/include/*.h; do \
116 if [ -f $$i ]; then \
117 cp $$i targ-include/`basename $$i`; \
120 -for i in $(srcdir)/libc/sys/$(sys_dir)/sys/*.h; do \
121 if [ -f $$i ]; then \
122 cp $$i targ-include/sys/`basename $$i`; \
127 CLEANFILES = targ-include stmp-targ-include
129 install-data-local: install-toollibLIBRARIES
130 rm -f $(DESTDIR)$(toollibdir)/libg.a
131 ln $(DESTDIR)$(toollibdir)/libc.a $(DESTDIR)$(toollibdir)/libg.a >/dev/null 2>/dev/null || cp $(DESTDIR)$(toollibdir)/libc.a $(DESTDIR)$(toollibdir)/libg.a
132 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
133 -if [ -z "$(MULTISUBDIR)" ]; then \
134 $(mkinstalldirs) $(DESTDIR)$(tooldir)/include; \
135 for i in $(srcdir)/libc/include/*.h; do \
136 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
138 $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/machine; \
139 for i in $(srcdir)/libc/include/machine/*.h; do \
140 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
142 for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
143 if [ -f $$i ]; then \
144 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
147 $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
148 for i in $(srcdir)/libc/include/sys/*.h; do \
149 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
151 for i in $(srcdir)/libc/sys/$(sys_dir)/sys/*.h; do \
152 if [ -f $$i ]; then \
153 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
156 for i in $(srcdir)/libc/sys/$(sys_dir)/include/*.h; do \
157 if [ -f $$i ]; then \
158 $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
163 # Force makedoc to be built before building info files.
164 info-recursive: doc/makedoc
165 dvi-recursive: doc/makedoc
167 cd doc && $(MAKE) all
169 CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
172 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
173 maintainer-clean-multi
175 all-recursive: all-multi
176 mostlyclean-recursive: mostlyclean-multi
177 clean-recursive: clean-multi
178 distclean-recursive: distclean-multi
179 maintainer-clean-recursive: maintainer-clean-multi
182 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
184 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
186 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
188 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
189 maintainer-clean-multi:
190 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean