Daily bump.
[official-gcc.git] / libstdc++ / Makefile.in
blobae8b5c3dae48ed5b647c1ab68df1e9e73142584a
1 # Copyright (C) 1994, 1995, 1999 Free Software Foundation
3 # This file is part of the GNU ANSI C++ Library. This library is free
4 # software; you can redistribute it and/or modify it under the terms of
5 # the GNU General Public License as published by the Free Software
6 # Foundation; either version 2, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this library; see the file COPYING. If not, write to the Free
15 # Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 VERSION = 2.10.0
18 INTERFACE = 3
20 gxx_include_dir=${includedir}/g++
22 OBJS = cstringi.o stdexcepti.o cstdlibi.o cmathi.o stlinst.o valarray.o
23 SUBLIBS = $(STAMP)-string $(STAMP)-complx
25 # C++ headers with no extension
26 HEADERS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \
27 csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \
28 cwchar cwctype string stdexcept \
29 algorithm deque functional hash_map hash_set iterator list map \
30 memory numeric pthread_alloc queue rope set slist stack utility \
31 vector fstream iomanip iostream strstream iosfwd bitset valarray
33 ARLIB = libstdc++.a.$(VERSION)
34 ARLINK = libstdc++.a
35 MARLINK = libstdc++.a.`echo $(VERSION) | sed 's/\([0-9]*[.][0-9]*\).*/\1/'`
36 SHLIB = libstdc++.so.$(VERSION)
37 SHARLIB = libstdc++-sh.a
38 SHLINK = libstdc++.so
39 MSHLINK = libstdc++.so.`echo $(VERSION) | sed 's/\([0-9]*[.][0-9]*\).*/\1/'`
40 SHFLAGS =
41 SHDEPS =
42 SHOPT = -shared
44 STAMP = bigstmp
46 LIBS = $(ARLIB) $(ARLINK)
48 #### package, host, target, and site dependent Makefile fragments come in here.
51 IO_DIR = ../libio
52 LIBIBERTY_DIR = ../libiberty
54 LIBIBERTY_OBJS = `cat $(LIBIBERTY_DIR)/needed-list` strerror.o
56 tooldir = $(exec_prefix)/$(target)
57 # This is where the libraries will be installed; note, it will be set
58 # at make runtime now. See below at target install.
59 INSTALLDIR = $(libdir)
61 MOSTLYCLEAN_JUNK = *stmp-* tlib*.a *.s *.ii stdlist piclist
62 CLEAN_JUNK = $(LIBS)
64 .PHONY: libs
65 libs: $(LIBS)
67 # The "pic" subdir must be created before we can put any object
68 # files into it.
69 $(OBJS): stamp-picdir
71 stdlist: $(IO_DIR)/iostream.list $(OBJS) $(SUBLIBS) $(LIBIBERTY_DIR)/libiberty.a
72 -rm -f tlist
73 touch tlist
74 echo *.o >> tlist
75 for f in `cat $(IO_DIR)/iostream.list` ; do \
76 echo "$(IO_DIR)/$$f" >> tlist ; \
77 done
78 for f in $(LIBIBERTY_OBJS) ; do \
79 echo "$(LIBIBERTY_DIR)/$$f" >> tlist ; \
80 done
81 mv tlist stdlist
83 piclist: stdlist
84 -rm -f tlist
85 cp stdlist tlist
86 if [ x"$(enable_shared)" = xyes ]; then \
87 sed 's,\([A-Za-z_]*\.o\),pic/\1,g' tlist > tlist2 ; \
88 mv tlist2 tlist ; \
89 else true ; fi
90 mv tlist piclist
92 $(ARLIB): stdlist
93 -rm -f t$(ARLIB)
94 $(AR) $(AR_FLAGS) t$(ARLIB) `cat stdlist`
95 mv t$(ARLIB) $(ARLIB)
96 $(RANLIB) $(ARLIB)
98 $(ARLINK):
99 -rm -f $(ARLINK)
100 $(LN_S) $(ARLIB) $(ARLINK) || cp $(ARLIB) $(ARLINK)
102 marlink:
103 @$(MAKE) $(MARLINK) "ARLINK=$(MARLINK)"
105 $(SHLIB): piclist
106 $(CC) $(LIBCXXFLAGS) $(SHFLAGS) $(SHOPT) -o $(SHLIB) `cat piclist` $(SHDEPS)
108 $(SHARLIB): $(SHLIB)
109 -rm -f t$(SHARLIB)
110 $(AR) $(AR_FLAGS) t$(SHARLIB) $(SHLIB)
111 mv t$(SHARLIB) $(SHARLIB)
112 $(RANLIB) $(SHARLIB)
114 $(SHLINK):
115 -rm -f $(SHLINK)
116 $(LN_S) $(SHLIB) $(SHLINK) || cp $(ARLIB) $(ARLINK)
118 mshlink:
119 @$(MAKE) $(MSHLINK) "SHLINK=$(MSHLINK)"
121 $(IO_DIR)/iostream.list: force
122 cd $(IO_DIR) ; $(MAKE) $(FLAGS_TO_PASS) iostream.list
124 $(LIBIBERTY_DIR)/libiberty.a:
125 cd $(LIBIBERTY_DIR) ; $(MAKE) $(FLAGS_TO_PASS)
127 STRFUNCS = REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC \
128 EQSS EQPS EQSP NESS NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP \
129 LESS LEPS LESP GESS GEPS GESP
130 STRIO = EXTRACT INSERT GETLINE
132 # These are here for SunOS VPATH.
133 cstringi.o: cstringi.cc
134 cstdlibi.o: cstdlibi.cc
135 cmathi.o: cmathi.cc
136 stdexcepti.o: stdexcepti.cc
137 stlinst.o: stlinst.cc
138 valarray.o: valarray.cc
140 # Later do wide strings, too.
141 stmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
142 ${srcdir}/std/bastring.cc ${srcdir}/std/straits.h
143 for name in $(STRFUNCS) $(STRIO); do \
144 echo c$${name}; \
145 if [ x"$(enable_shared)" = xyes ]; then \
146 $(COMPILE.cc) $(PICFLAG) -DC -D$${name} ${srcdir}/sinst.cc \
147 -o pic/c$${name}.o; \
148 else true ; fi; \
149 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
150 $(COMPILE.cc) -DC -D$${name} ${srcdir}/sinst.cc -o c$${name}.o; \
151 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
152 done
153 touch stmp-string
155 bigstmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
156 ${srcdir}/std/bastring.cc ${srcdir}/std/straits.h
157 echo cstring
158 if [ x"$(enable_shared)" = xyes ]; then \
159 $(COMPILE.cc) $(PICFLAG) -DC \
160 `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
161 $(srcdir)/sinst.cc -o pic/cstrmain.o; \
162 else true ; fi
163 $(COMPILE.cc) -DC `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
164 $(srcdir)/sinst.cc -o cstrmain.o
165 echo cstrio
166 if [ x"$(enable_shared)" = xyes ]; then \
167 $(COMPILE.cc) $(PICFLAG) -DC \
168 `for N in $(STRIO); do echo " -D$${N}"; done` \
169 $(srcdir)/sinst.cc -o pic/cstrio.o; \
170 else true ; fi
171 $(COMPILE.cc) -DC `for N in $(STRIO); do echo " -D$${N}"; done` \
172 $(srcdir)/sinst.cc -o cstrio.o
173 touch bigstmp-string
175 COMFUNCS = MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
176 DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \
177 CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
178 COMIO = EXTRACT INSERT
180 stmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
181 ${srcdir}/std/complext.cc ${srcdir}/std/dcomplex.h \
182 ${srcdir}/std/ldcomplex.h
183 for N in $(COMFUNCS) $(COMIO); do \
184 echo f$${N}; \
185 if [ x"$(enable_shared)" = xyes ]; then \
186 $(COMPILE.cc) $(PICFLAG) -DF -D$${N} $(srcdir)/cinst.cc \
187 -o pic/f$${N}.o; \
188 else true ; fi; \
189 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
190 $(COMPILE.cc) -DF -D$${N} ${srcdir}/cinst.cc -o f$${N}.o; \
191 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
192 echo d$${N}; \
193 if [ x"$(enable_shared)" = xyes ]; then \
194 $(COMPILE.cc) $(PICFLAG) -DD -D$${N} $(srcdir)/cinst.cc \
195 -o pic/d$${N}.o; \
196 else true ; fi; \
197 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
198 $(COMPILE.cc) -DD -D$${N} ${srcdir}/cinst.cc -o d$${N}.o; \
199 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
200 echo ld$${N}; \
201 if [ x"$(enable_shared)" = xyes ]; then \
202 $(COMPILE.cc) $(PICFLAG) -DLD -D$${N} $(srcdir)/cinst.cc \
203 -o pic/ld$${N}.o; \
204 else true ; fi; \
205 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
206 $(COMPILE.cc) -DLD -D$${N} ${srcdir}/cinst.cc -o ld$${N}.o; \
207 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
208 done
209 touch stmp-complx
211 bigstmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
212 ${srcdir}/std/complext.cc ${srcdir}/std/dcomplex.h \
213 ${srcdir}/std/ldcomplex.h
214 echo fcomplex
215 if [ x"$(enable_shared)" = xyes ]; then \
216 $(COMPILE.cc) $(PICFLAG) -DF \
217 `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
218 $(srcdir)/cinst.cc -o pic/fcomplex.o; \
219 else true ; fi
220 $(COMPILE.cc) -DF `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
221 $(srcdir)/cinst.cc -o fcomplex.o
222 echo fcomio
223 if [ x"$(enable_shared)" = xyes ]; then \
224 $(COMPILE.cc) $(PICFLAG) -DF \
225 `for N in $(COMIO); do echo " -D$${N}"; done` \
226 $(srcdir)/cinst.cc -o pic/fcomio.o; \
227 else true ; fi
228 $(COMPILE.cc) -DF `for N in $(COMIO); do echo " -D$${N}"; done` \
229 $(srcdir)/cinst.cc -o fcomio.o
230 echo dcomplex
231 if [ x"$(enable_shared)" = xyes ]; then \
232 $(COMPILE.cc) $(PICFLAG) -DD \
233 `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
234 $(srcdir)/cinst.cc -o pic/dcomplex.o; \
235 else true ; fi
236 $(COMPILE.cc) -DD `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
237 $(srcdir)/cinst.cc -o dcomplex.o
238 echo dcomio
239 if [ x"$(enable_shared)" = xyes ]; then \
240 $(COMPILE.cc) $(PICFLAG) -DD \
241 `for N in $(COMIO); do echo " -D$${N}"; done` \
242 $(srcdir)/cinst.cc -o pic/dcomio.o; \
243 else true ; fi
244 $(COMPILE.cc) -DD `for N in $(COMIO); do echo " -D$${N}"; done` \
245 $(srcdir)/cinst.cc -o dcomio.o
246 echo ldcomplex
247 if [ x"$(enable_shared)" = xyes ]; then \
248 $(COMPILE.cc) $(PICFLAG) -DLD \
249 `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
250 $(srcdir)/cinst.cc -o pic/ldcomplex.o; \
251 else true ; fi
252 $(COMPILE.cc) -DLD `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
253 $(srcdir)/cinst.cc -o ldcomplex.o
254 echo ldcomio
255 if [ x"$(enable_shared)" = xyes ]; then \
256 $(COMPILE.cc) $(PICFLAG) -DLD \
257 `for N in $(COMIO); do echo " -D$${N}"; done` \
258 $(srcdir)/cinst.cc -o pic/ldcomio.o; \
259 else true ; fi
260 $(COMPILE.cc) -DLD `for N in $(COMIO); do echo " -D$${N}"; done` \
261 $(srcdir)/cinst.cc -o ldcomio.o
262 touch bigstmp-complx
264 .PHONY: install
265 install:
266 rootme=`pwd`/ ; export rootme ; \
267 if [ -z "$(MULTISUBDIR)" ]; then \
268 cd $(srcdir); \
269 for FILE in $(HEADERS); do \
270 rm -f $(gxx_include_dir)/$$FILE ; \
271 if [ -f stl/$$FILE ]; then \
272 $(INSTALL_DATA) stl/$$FILE $(gxx_include_dir)/$$FILE ; \
273 else \
274 $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
275 fi ; \
276 chmod a-x $(gxx_include_dir)/$$FILE ; \
277 done ; \
278 for FILE in *.h std/*.h std/*.cc std/*.tcc; do \
279 rm -f $(gxx_include_dir)/$$FILE ; \
280 $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
281 chmod a-x $(gxx_include_dir)/$$FILE ; \
282 done ; \
283 cd stl; \
284 for FILE in *.h; do \
285 rm -f $(gxx_include_dir)/$$FILE ; \
286 $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
287 chmod a-x $(gxx_include_dir)/$$FILE ; \
288 done ; \
289 else true ; \
291 rootme=`pwd`/ ; export rootme ; \
292 if [ x$(enable_version_specific_runtime_libs) != xyes ]; then \
293 INSTALLDIR=$(libdir); \
294 else \
295 INSTALLDIR=$(libsubdir); \
296 fi; \
297 INSTALLLINKDIR=$(libsubdir); \
298 if [ $${INSTALLLINKDIR}$(MULTISUBDIR) = $${INSTALLDIR}$(MULTISUBDIR) ]; then \
299 RELINSTALLDIR=; \
300 elif [ x$(MULTISUBDIR) = x ]; then \
301 if [ $(build_alias) = $(target_alias) ]; then \
302 RELINSTALLDIR=../../../; \
303 else \
304 RELINSTALLDIR=../../../../$(target_alias)/lib/; \
305 fi; \
306 else \
307 if [ $(build_alias) = $(target_alias) ]; then \
308 RELINSTALLDIR=../../..`echo $(MULTISUBDIR) | sed -e 's,/[^/]*,/..,g'`$(MULTISUBDIR)/; \
309 else \
310 RELINSTALLDIR=../../../..`echo $(MULTISUBDIR) | sed -e 's,/[^/]*,/..,g'`/$(target_alias)/lib$(MULTISUBDIR)/; \
311 fi; \
312 fi; \
313 if [ $(build_alias) != $(target_alias) ]; then \
314 case $$RELINSTALLDIR in \
315 ../../../|../../../../) \
316 RELINSTALLDIR=../$${RELINSTALLDIR}$(target_alias)/lib/;; \
317 esac; \
318 fi; \
319 rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(SHLINK) ; \
320 rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(ARLINK) ; \
321 for FILE in $(LIBS) ; do \
322 rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
323 if [ $$FILE = $(SHLINK) ] ; then \
324 if [ -f $${INSTALLDIR}/$(MSHLINK) ]; then \
325 rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
326 $(LN_S) $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
327 || cp $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
328 else \
329 rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
330 $(LN_S) $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
331 || cp $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
332 fi; \
333 elif [ $$FILE = $(ARLINK) ] ; then \
334 if [ -f $${INSTALLDIR}/$(MARLINK) ]; then \
335 rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
336 $(LN_S) $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
337 || cp $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
338 else \
339 rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
340 $(LN_S) $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
341 || cp $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
342 fi; \
343 elif [ $$FILE = mshlink ]; then \
344 for FILE in $(MSHLINK) ; do \
345 rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
346 $(LN_S) $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE \
347 || cp $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
348 done; \
349 elif [ $$FILE = marlink ]; then \
350 for FILE in $(MARLINK) ; do \
351 rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
352 $(LN_S) $(ARLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE \
353 || cp $(ARLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
354 done; \
355 elif [ $$FILE = $(SHLIB) ]; then \
356 $(INSTALL_PROGRAM) $$FILE $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
357 : On the HP, shared libraries must be mode 555. ;\
358 chmod 555 $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
359 else \
360 $(INSTALL_DATA) $$FILE $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
361 $(RANLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
362 chmod a-x $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
363 fi ; \
364 done
365 @rootme=`pwd`/ ; export rootme ; \
366 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
368 .PHONY: force
369 force:
371 MYCXXFLAGS = $(CXXFLAGS) -g -O2 -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast -Winline -Wwrite-strings -pedantic -Wno-long-long
372 MYCFLAGS = $(CFLAGS) -g -O2 -Wpointer-arith -Wnested-externs
374 .PHONY: stuff
375 stuff:
376 $(MAKE) stuff1
377 $(MAKE) stuff2
379 stuff1:
380 $(MAKE) clean
381 $(MAKE) -C ../libio c++clean
382 touch ../../gcc/libgcc2.ready
384 stuff2:
385 $(MAKE) -C ../../gcc/ libgcc.a
386 $(MAKE) CXXFLAGS="$(MYCXXFLAGS)" CFLAGS="$(MYCFLAGS)"
387 -$(MAKE) check
388 -$(MAKE) -C ../libio check
389 -$(MAKE) -C ../../gcc check-g++