]> gcc.gnu.org Git - gcc.git/blame - libstdc++/Makefile.in
configure.in: Put parenthesis around TARGET_CPU_DEFAULT's value.
[gcc.git] / libstdc++ / Makefile.in
CommitLineData
6599da04
JM
1# Copyright (C) 1994, 1995 Free Software Foundation
2
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.
7
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.
12
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.
16
17VERSION = 2.8.0
18
19OBJS = cstringi.o stdexcepti.o cstdlibi.o cmathi.o stlinst.o
7b2f8276 20SUBLIBS = $(STAMP)-string $(STAMP)-complx
6599da04
JM
21
22# C++ headers with no extension
23HEADERS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \
24 csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \
25 cwchar cwctype string stdexcept \
179b008f
JM
26 algorithm deque functional hash_map hash_set iterator list map \
27 memory numeric pthread_alloc queue rope set slist stack utility \
28 vector fstream iomanip iostream strstream iosfwd
6599da04
JM
29
30ARLIB = libstdc++.a
31SHLIB = libstdc++.so.$(VERSION)
32SHARLIB = libstdc++-sh.a
33SHLINK = libstdc++.so
34MSHLINK = libstdc++.so.`echo $(VERSION) | sed 's/\([0-9][.][0-9]\).*/\1/'`
35SHFLAGS =
36SHDEPS =
37
38STAMP = bigstmp
39
40LIBS = $(ARLIB)
41
42#### package, host, target, and site dependent Makefile fragments come in here.
43##
44
45IO_DIR = ../libio
46LIBIBERTY_DIR = ../libiberty
47
48LIBIBERTY_OBJS = `cat $(LIBIBERTY_DIR)/needed-list` strerror.o
49
50tooldir = $(exec_prefix)/$(target)
51INSTALLDIR = $(libdir)
52
53MOSTLYCLEAN_JUNK = *stmp-* tlib*.a *.s *.ii stdlist piclist
54CLEAN_JUNK = $(LIBS)
55
56# Remove these for public releases.
3e68fa83 57CXXFLAGS = -g -O -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast -Winline -Wwrite-strings -Weffc++
6599da04
JM
58CFLAGS = -g -O -Wpointer-arith -Wnested-externs
59
60.PHONY: libs
61libs: $(LIBS)
62
63stdlist: $(IO_DIR)/iostream.list $(OBJS) $(SUBLIBS) $(LIBIBERTY_DIR)/libiberty.a
64 -rm -f tlist
65 touch tlist
66 echo *.o >> tlist
67 for f in `cat $(IO_DIR)/iostream.list` ; do \
68 echo "$(IO_DIR)/$$f" >> tlist ; \
69 done
70 for f in $(LIBIBERTY_OBJS) ; do \
71 echo "$(LIBIBERTY_DIR)/$$f" >> tlist ; \
72 done
73 mv tlist stdlist
74
75piclist: stdlist
76 -rm -f tlist
77 cp stdlist tlist
78 if [ -n "$(PICFLAG)" ]; then \
79 sed 's,\([A-Za-z_]*\.o\),pic/\1,g' tlist > tlist2 ; \
80 mv tlist2 tlist ; \
81 else true ; fi
82 mv tlist piclist
83
84$(ARLIB): stdlist
85 -rm -f t$(ARLIB)
86 $(AR) $(AR_FLAGS) t$(ARLIB) `cat stdlist`
87 mv t$(ARLIB) $(ARLIB)
88 $(RANLIB) $(ARLIB)
89
90$(SHLIB): piclist
9671be8f 91 $(CC) $(LIBCXXFLAGS) $(SHFLAGS) -shared -o $(SHLIB) `cat piclist` $(SHDEPS)
6599da04
JM
92
93$(SHARLIB): $(SHLIB)
94 -rm -f t$(SHARLIB)
95 $(AR) $(AR_FLAGS) t$(SHARLIB) $(SHLIB)
96 mv t$(SHARLIB) $(SHARLIB)
97 $(RANLIB) $(SHARLIB)
98
99$(SHLINK):
c7728988 100 ln -f -s $(SHLIB) $(SHLINK)
6599da04
JM
101
102mshlink:
103 @$(MAKE) $(MSHLINK) "SHLINK=$(MSHLINK)"
104
105$(IO_DIR)/iostream.list: force
106 cd $(IO_DIR) ; $(MAKE) $(FLAGS_TO_PASS) iostream.list
107
108$(LIBIBERTY_DIR)/libiberty.a:
109 cd $(LIBIBERTY_DIR) ; $(MAKE) $(FLAGS_TO_PASS)
110
111STRFUNCS = REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC \
112 EQSS EQPS EQSP NESS NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP \
113 LESS LEPS LESP GESS GEPS GESP
114STRIO = EXTRACT INSERT GETLINE
115
116# These are here for SunOS VPATH.
117cstringi.o: cstringi.cc
118cstdlibi.o: cstdlibi.cc
119cmathi.o: cmathi.cc
120stdexcepti.o: stdexcepti.cc
121stlinst.o: stlinst.cc
122
123# Later do wide strings, too.
124stmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
125 ${srcdir}/std/bastring.cc ${srcdir}/std/straits.h
126 for name in $(STRFUNCS) $(STRIO); do \
127 echo c$${name}; \
128 if [ -n "$(PICFLAG)" ]; then \
129 $(COMPILE.cc) $(PICFLAG) -DC -D$${name} ${srcdir}/sinst.cc \
130 -o pic/c$${name}.o; \
131 else true ; fi; \
132 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
133 $(COMPILE.cc) -DC -D$${name} ${srcdir}/sinst.cc -o c$${name}.o; \
134 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
135 done
136 touch stmp-string
137
138bigstmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
139 ${srcdir}/std/bastring.cc ${srcdir}/std/straits.h
140 echo cstring
141 if [ -n "$(PICFLAG)" ]; then \
142 $(COMPILE.cc) $(PICFLAG) -DC \
143 `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
144 $(srcdir)/sinst.cc -o pic/cstrmain.o; \
145 else true ; fi
146 $(COMPILE.cc) -DC `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
147 $(srcdir)/sinst.cc -o cstrmain.o
148 echo cstrio
149 if [ -n "$(PICFLAG)" ]; then \
150 $(COMPILE.cc) $(PICFLAG) -DC \
151 `for N in $(STRIO); do echo " -D$${N}"; done` \
152 $(srcdir)/sinst.cc -o pic/cstrio.o; \
153 else true ; fi
154 $(COMPILE.cc) -DC `for N in $(STRIO); do echo " -D$${N}"; done` \
155 $(srcdir)/sinst.cc -o cstrio.o
156 touch bigstmp-string
157
158COMFUNCS = MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
159 DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \
160 CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
161COMIO = EXTRACT INSERT
162
6ec3cb84 163stmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
6599da04
JM
164 ${srcdir}/std/complext.cc ${srcdir}/std/dcomplex.h \
165 ${srcdir}/std/ldcomplex.h
166 for N in $(COMFUNCS) $(COMIO); do \
167 echo f$${N}; \
168 if [ -n "$(PICFLAG)" ]; then \
169 $(COMPILE.cc) $(PICFLAG) -DF -D$${N} $(srcdir)/cinst.cc \
170 -o pic/f$${N}.o; \
171 else true ; fi; \
172 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
173 $(COMPILE.cc) -DF -D$${N} ${srcdir}/cinst.cc -o f$${N}.o; \
174 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
175 echo d$${N}; \
176 if [ -n "$(PICFLAG)" ]; then \
177 $(COMPILE.cc) $(PICFLAG) -DD -D$${N} $(srcdir)/cinst.cc \
178 -o pic/d$${N}.o; \
179 else true ; fi; \
180 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
181 $(COMPILE.cc) -DD -D$${N} ${srcdir}/cinst.cc -o d$${N}.o; \
182 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
183 echo ld$${N}; \
184 if [ -n "$(PICFLAG)" ]; then \
185 $(COMPILE.cc) $(PICFLAG) -DLD -D$${N} $(srcdir)/cinst.cc \
186 -o pic/ld$${N}.o; \
187 else true ; fi; \
188 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
189 $(COMPILE.cc) -DLD -D$${N} ${srcdir}/cinst.cc -o ld$${N}.o; \
190 if [ $$? -eq 0 ]; then true; else exit 1; fi; \
191 done
6ec3cb84 192 touch stmp-complx
6599da04 193
7b2f8276 194bigstmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
6599da04
JM
195 ${srcdir}/std/complext.cc ${srcdir}/std/dcomplex.h \
196 ${srcdir}/std/ldcomplex.h
197 echo fcomplex
198 if [ -n "$(PICFLAG)" ]; then \
199 $(COMPILE.cc) $(PICFLAG) -DF \
200 `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
201 $(srcdir)/cinst.cc -o pic/fcomplex.o; \
202 else true ; fi
203 $(COMPILE.cc) -DF `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
204 $(srcdir)/cinst.cc -o fcomplex.o
205 echo fcomio
206 if [ -n "$(PICFLAG)" ]; then \
207 $(COMPILE.cc) $(PICFLAG) -DF \
208 `for N in $(COMIO); do echo " -D$${N}"; done` \
209 $(srcdir)/cinst.cc -o pic/fcomio.o; \
210 else true ; fi
211 $(COMPILE.cc) -DF `for N in $(COMIO); do echo " -D$${N}"; done` \
212 $(srcdir)/cinst.cc -o fcomio.o
213 echo dcomplex
214 if [ -n "$(PICFLAG)" ]; then \
215 $(COMPILE.cc) $(PICFLAG) -DD \
216 `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
217 $(srcdir)/cinst.cc -o pic/dcomplex.o; \
218 else true ; fi
219 $(COMPILE.cc) -DD `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
220 $(srcdir)/cinst.cc -o dcomplex.o
221 echo dcomio
222 if [ -n "$(PICFLAG)" ]; then \
223 $(COMPILE.cc) $(PICFLAG) -DD \
224 `for N in $(COMIO); do echo " -D$${N}"; done` \
225 $(srcdir)/cinst.cc -o pic/dcomio.o; \
226 else true ; fi
227 $(COMPILE.cc) -DD `for N in $(COMIO); do echo " -D$${N}"; done` \
228 $(srcdir)/cinst.cc -o dcomio.o
229 echo ldcomplex
230 if [ -n "$(PICFLAG)" ]; then \
231 $(COMPILE.cc) $(PICFLAG) -DLD \
232 `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
233 $(srcdir)/cinst.cc -o pic/ldcomplex.o; \
234 else true ; fi
235 $(COMPILE.cc) -DLD `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
236 $(srcdir)/cinst.cc -o ldcomplex.o
237 echo ldcomio
238 if [ -n "$(PICFLAG)" ]; then \
239 $(COMPILE.cc) $(PICFLAG) -DLD \
240 `for N in $(COMIO); do echo " -D$${N}"; done` \
241 $(srcdir)/cinst.cc -o pic/ldcomio.o; \
242 else true ; fi
243 $(COMPILE.cc) -DLD `for N in $(COMIO); do echo " -D$${N}"; done` \
244 $(srcdir)/cinst.cc -o ldcomio.o
6ec3cb84 245 touch bigstmp-complx
6599da04
JM
246
247.PHONY: install
248install:
249 rootme=`pwd`/ ; export rootme ; \
250 if [ -z "$(MULTISUBDIR)" ]; then \
251 cd $(srcdir); \
bb84e669 252 for FILE in $(HEADERS); do \
c3055584 253 rm -f $(gxx_include_dir)/$$FILE ; \
bb84e669 254 if [ -f stl/$$FILE ]; then \
c3055584 255 $(INSTALL_DATA) stl/$$FILE $(gxx_include_dir)/$$FILE ; \
bb84e669 256 else \
c3055584 257 $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
bb84e669 258 fi ; \
c3055584 259 chmod a-x $(gxx_include_dir)/$$FILE ; \
bb84e669
JM
260 done ; \
261 for FILE in *.h std/*.*; do \
c3055584
JL
262 rm -f $(gxx_include_dir)/$$FILE ; \
263 $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
264 chmod a-x $(gxx_include_dir)/$$FILE ; \
6599da04
JM
265 done ; \
266 cd stl; \
267 for FILE in *.h; do \
c3055584
JL
268 rm -f $(gxx_include_dir)/$$FILE ; \
269 $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
270 chmod a-x $(gxx_include_dir)/$$FILE ; \
6599da04
JM
271 done ; \
272 else true ; \
273 fi
274 rootme=`pwd`/ ; export rootme ; \
275 for FILE in $(LIBS) ; do \
276 rm -f $(INSTALLDIR)$(MULTISUBDIR)/$$FILE ; \
277 if [ $$FILE = $(SHLINK) ] ; then \
c7728988 278 ln -f -s $(SHLIB) $(INSTALLDIR)$(MULTISUBDIR)/$$FILE ; \
6599da04
JM
279 elif [ $$FILE = mshlink ]; then \
280 for FILE in $(MSHLINK) ; do \
281 rm -f $(INSTALLDIR)$(MULTISUBDIR)/$$FILE ; \
c7728988 282 ln -f -s $(SHLIB) $(INSTALLDIR)$(MULTISUBDIR)/$$FILE ; \
6599da04
JM
283 done; \
284 elif [ $$FILE = $(SHLIB) ]; then \
285 $(INSTALL_PROGRAM) $$FILE $(INSTALLDIR)$(MULTISUBDIR)/$$FILE ; \
286 : On the HP, shared libraries must be mode 555. ;\
287 chmod 555 $(INSTALLDIR)$(MULTISUBDIR)/$$FILE ; \
288 else \
289 $(INSTALL_DATA) $$FILE $(INSTALLDIR)$(MULTISUBDIR)/$$FILE ; \
290 $(RANLIB) $(INSTALLDIR)$(MULTISUBDIR)/$$FILE ; \
291 chmod a-x $(INSTALLDIR)$(MULTISUBDIR)/$$FILE ; \
292 fi ; \
293 done
294 @rootme=`pwd`/ ; export rootme ; \
295 $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
296
297.PHONY: force
298force:
299
300.PHONY: stuff
301stuff:
302 $(MAKE) clean
303 $(MAKE) -C ../libio c++clean
f4f3e8fd
JM
304 -$(MAKE) $(MAKEFLAGS) check
305 -$(MAKE) -C ../libio check
179b008f 306 -$(MAKE) -C ../../gcc check-g++
6599da04
JM
307
308stuff1:
309 $(MAKE) clean
310 $(MAKE) -C ../libio c++clean
6599da04
JM
311
312stuff2:
f4f3e8fd
JM
313 -$(MAKE) check
314 -$(MAKE) -C ../libio check
179b008f 315 -$(MAKE) -C ../../gcc check-g++
This page took 0.210565 seconds and 5 git commands to generate.