1 # Copyright (C) 1994, 1995 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.
19 OBJS
= cstringi.o stdexcepti.o cstdlibi.o cmathi.o stlinst.o
20 SUBLIBS
= $(STAMP
)-string
$(STAMP
)-complx
22 # C++ headers with no extension
23 HEADERS
= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \
24 csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \
25 cwchar cwctype string stdexcept \
26 algorithm deque list map queue set stack vector utility functional \
27 iterator memory numeric
30 SHLIB
= libstdc
++.so.
$(VERSION
)
31 SHARLIB
= libstdc
++-sh.a
33 MSHLINK
= libstdc
++.so.
`echo $(VERSION) | sed 's/\([0-9][.][0-9]\).*/\1/'`
41 #### package, host, target, and site dependent Makefile fragments come in here.
45 LIBIBERTY_DIR
= ..
/libiberty
47 LIBIBERTY_OBJS
= `cat $(LIBIBERTY_DIR)/needed-list` strerror.o
49 tooldir
= $(exec_prefix)/$(target
)
50 INSTALLDIR
= $(libdir)
52 MOSTLYCLEAN_JUNK
= *stmp-
* tlib
*.a
*.s
*.ii stdlist piclist
55 # Remove these for public releases.
56 CXXFLAGS
= -g
-O
-Wpointer-arith
-Wnested-externs
-Woverloaded-virtual
-Wbad-function-cast
-Winline
-Wwrite-strings
-Weffc
++
57 CFLAGS
= -g
-O
-Wpointer-arith
-Wnested-externs
62 stdlist
: $(IO_DIR
)/iostream.list
$(OBJS
) $(SUBLIBS
) $(LIBIBERTY_DIR
)/libiberty.a
66 for f in
`cat $(IO_DIR)/iostream.list` ; do \
67 echo
"$(IO_DIR)/$$f" >> tlist
; \
69 for f in
$(LIBIBERTY_OBJS
) ; do \
70 echo
"$(LIBIBERTY_DIR)/$$f" >> tlist
; \
77 if
[ -n
"$(PICFLAG)" ]; then \
78 sed
's,\([A-Za-z_]*\.o\),pic/\1,g' tlist
> tlist2
; \
85 $(AR
) $(AR_FLAGS
) t
$(ARLIB
) `cat stdlist`
90 $(CC
) $(LIBCXXFLAGS
) $(SHFLAGS
) -shared
-o
$(SHLIB
) `cat piclist` $(SHDEPS
)
94 $(AR
) $(AR_FLAGS
) t
$(SHARLIB
) $(SHLIB
)
95 mv t
$(SHARLIB
) $(SHARLIB
)
99 ln
-f
-s
$(SHLIB
) $(SHLINK
)
102 @
$(MAKE
) $(MSHLINK
) "SHLINK=$(MSHLINK)"
104 $(IO_DIR
)/iostream.list
: force
105 cd
$(IO_DIR
) ; $(MAKE
) $(FLAGS_TO_PASS
) iostream.list
107 $(LIBIBERTY_DIR
)/libiberty.a
:
108 cd
$(LIBIBERTY_DIR
) ; $(MAKE
) $(FLAGS_TO_PASS
)
110 STRFUNCS
= REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC \
111 EQSS EQPS EQSP NESS NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP \
112 LESS LEPS LESP GESS GEPS GESP
113 STRIO
= EXTRACT INSERT GETLINE
115 # These are here for SunOS VPATH.
116 cstringi.o
: cstringi.
cc
117 cstdlibi.o
: cstdlibi.
cc
119 stdexcepti.o
: stdexcepti.
cc
120 stlinst.o
: stlinst.
cc
122 # Later do wide strings, too.
123 stmp-string
: ${srcdir}/sinst.
cc ${srcdir}/std
/bastring.h \
124 ${srcdir}/std
/bastring.
cc ${srcdir}/std
/straits.h
125 for name in
$(STRFUNCS
) $(STRIO
); do \
127 if
[ -n
"$(PICFLAG)" ]; then \
128 $(COMPILE.
cc) $(PICFLAG
) -DC
-D
$${name} ${srcdir}/sinst.
cc \
129 -o pic
/c
$${name}.o
; \
131 if
[ $$?
-eq
0 ]; then true
; else exit
1; fi
; \
132 $(COMPILE.
cc) -DC
-D
$${name} ${srcdir}/sinst.
cc -o c
$${name}.o
; \
133 if
[ $$?
-eq
0 ]; then true
; else exit
1; fi
; \
137 bigstmp-string
: ${srcdir}/sinst.
cc ${srcdir}/std
/bastring.h \
138 ${srcdir}/std
/bastring.
cc ${srcdir}/std
/straits.h
140 if
[ -n
"$(PICFLAG)" ]; then \
141 $(COMPILE.
cc) $(PICFLAG
) -DC \
142 `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
143 $(srcdir)/sinst.
cc -o pic
/cstrmain.o
; \
145 $(COMPILE.
cc) -DC
`for N in $(STRFUNCS); do echo " -D$${N}"; done` \
146 $(srcdir)/sinst.
cc -o cstrmain.o
148 if
[ -n
"$(PICFLAG)" ]; then \
149 $(COMPILE.
cc) $(PICFLAG
) -DC \
150 `for N in $(STRIO); do echo " -D$${N}"; done` \
151 $(srcdir)/sinst.
cc -o pic
/cstrio.o
; \
153 $(COMPILE.
cc) -DC
`for N in $(STRIO); do echo " -D$${N}"; done` \
154 $(srcdir)/sinst.
cc -o cstrio.o
157 COMFUNCS
= MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
158 DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \
159 CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
160 COMIO
= EXTRACT INSERT
162 stmp-complx
: ${srcdir}/cinst.
cc ${srcdir}/std
/complext.h \
163 ${srcdir}/std
/complext.
cc ${srcdir}/std
/dcomplex.h \
164 ${srcdir}/std
/ldcomplex.h
165 for N in
$(COMFUNCS
) $(COMIO
); do \
167 if
[ -n
"$(PICFLAG)" ]; then \
168 $(COMPILE.
cc) $(PICFLAG
) -DF
-D
$${N} $(srcdir)/cinst.
cc \
171 if
[ $$?
-eq
0 ]; then true
; else exit
1; fi
; \
172 $(COMPILE.
cc) -DF
-D
$${N} ${srcdir}/cinst.
cc -o f
$${N}.o
; \
173 if
[ $$?
-eq
0 ]; then true
; else exit
1; fi
; \
175 if
[ -n
"$(PICFLAG)" ]; then \
176 $(COMPILE.
cc) $(PICFLAG
) -DD
-D
$${N} $(srcdir)/cinst.
cc \
179 if
[ $$?
-eq
0 ]; then true
; else exit
1; fi
; \
180 $(COMPILE.
cc) -DD
-D
$${N} ${srcdir}/cinst.
cc -o d
$${N}.o
; \
181 if
[ $$?
-eq
0 ]; then true
; else exit
1; fi
; \
183 if
[ -n
"$(PICFLAG)" ]; then \
184 $(COMPILE.
cc) $(PICFLAG
) -DLD
-D
$${N} $(srcdir)/cinst.
cc \
187 if
[ $$?
-eq
0 ]; then true
; else exit
1; fi
; \
188 $(COMPILE.
cc) -DLD
-D
$${N} ${srcdir}/cinst.
cc -o
ld$${N}.o
; \
189 if
[ $$?
-eq
0 ]; then true
; else exit
1; fi
; \
193 bigstmp-complx
: ${srcdir}/cinst.
cc ${srcdir}/std
/complext.h \
194 ${srcdir}/std
/complext.
cc ${srcdir}/std
/dcomplex.h \
195 ${srcdir}/std
/ldcomplex.h
197 if
[ -n
"$(PICFLAG)" ]; then \
198 $(COMPILE.
cc) $(PICFLAG
) -DF \
199 `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
200 $(srcdir)/cinst.
cc -o pic
/fcomplex.o
; \
202 $(COMPILE.
cc) -DF
`for N in $(COMFUNCS); do echo " -D$${N}"; done` \
203 $(srcdir)/cinst.
cc -o fcomplex.o
205 if
[ -n
"$(PICFLAG)" ]; then \
206 $(COMPILE.
cc) $(PICFLAG
) -DF \
207 `for N in $(COMIO); do echo " -D$${N}"; done` \
208 $(srcdir)/cinst.
cc -o pic
/fcomio.o
; \
210 $(COMPILE.
cc) -DF
`for N in $(COMIO); do echo " -D$${N}"; done` \
211 $(srcdir)/cinst.
cc -o fcomio.o
213 if
[ -n
"$(PICFLAG)" ]; then \
214 $(COMPILE.
cc) $(PICFLAG
) -DD \
215 `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
216 $(srcdir)/cinst.
cc -o pic
/dcomplex.o
; \
218 $(COMPILE.
cc) -DD
`for N in $(COMFUNCS); do echo " -D$${N}"; done` \
219 $(srcdir)/cinst.
cc -o dcomplex.o
221 if
[ -n
"$(PICFLAG)" ]; then \
222 $(COMPILE.
cc) $(PICFLAG
) -DD \
223 `for N in $(COMIO); do echo " -D$${N}"; done` \
224 $(srcdir)/cinst.
cc -o pic
/dcomio.o
; \
226 $(COMPILE.
cc) -DD
`for N in $(COMIO); do echo " -D$${N}"; done` \
227 $(srcdir)/cinst.
cc -o dcomio.o
229 if
[ -n
"$(PICFLAG)" ]; then \
230 $(COMPILE.
cc) $(PICFLAG
) -DLD \
231 `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
232 $(srcdir)/cinst.
cc -o pic
/ldcomplex.o
; \
234 $(COMPILE.
cc) -DLD
`for N in $(COMFUNCS); do echo " -D$${N}"; done` \
235 $(srcdir)/cinst.
cc -o ldcomplex.o
237 if
[ -n
"$(PICFLAG)" ]; then \
238 $(COMPILE.
cc) $(PICFLAG
) -DLD \
239 `for N in $(COMIO); do echo " -D$${N}"; done` \
240 $(srcdir)/cinst.
cc -o pic
/ldcomio.o
; \
242 $(COMPILE.
cc) -DLD
`for N in $(COMIO); do echo " -D$${N}"; done` \
243 $(srcdir)/cinst.
cc -o ldcomio.o
248 rootme
=`pwd`/ ; export rootme
; \
249 if
[ -z
"$(MULTISUBDIR)" ]; then \
251 for FILE in
$(HEADERS
); do \
252 rm -f
$(gxx_include_dir
)/$$FILE ; \
253 if
[ -f stl
/$$FILE ]; then \
254 $(INSTALL_DATA
) stl
/$$FILE $(gxx_include_dir
)/$$FILE ; \
256 $(INSTALL_DATA
) $$FILE $(gxx_include_dir
)/$$FILE ; \
258 chmod a-x
$(gxx_include_dir
)/$$FILE ; \
260 for FILE in
*.h std
/*.
*; do \
261 rm -f
$(gxx_include_dir
)/$$FILE ; \
262 $(INSTALL_DATA
) $$FILE $(gxx_include_dir
)/$$FILE ; \
263 chmod a-x
$(gxx_include_dir
)/$$FILE ; \
266 for FILE in
*.h
; do \
267 rm -f
$(gxx_include_dir
)/$$FILE ; \
268 $(INSTALL_DATA
) $$FILE $(gxx_include_dir
)/$$FILE ; \
269 chmod a-x
$(gxx_include_dir
)/$$FILE ; \
273 rootme
=`pwd`/ ; export rootme
; \
274 for FILE in
$(LIBS
) ; do \
275 rm -f
$(INSTALLDIR
)$(MULTISUBDIR
)/$$FILE ; \
276 if
[ $$FILE = $(SHLINK
) ] ; then \
277 ln
-f
-s
$(SHLIB
) $(INSTALLDIR
)$(MULTISUBDIR
)/$$FILE ; \
278 elif
[ $$FILE = mshlink
]; then \
279 for FILE in
$(MSHLINK
) ; do \
280 rm -f
$(INSTALLDIR
)$(MULTISUBDIR
)/$$FILE ; \
281 ln
-f
-s
$(SHLIB
) $(INSTALLDIR
)$(MULTISUBDIR
)/$$FILE ; \
283 elif
[ $$FILE = $(SHLIB
) ]; then \
284 $(INSTALL_PROGRAM
) $$FILE $(INSTALLDIR
)$(MULTISUBDIR
)/$$FILE ; \
285 : On the HP
, shared libraries must be mode
555.
;\
286 chmod
555 $(INSTALLDIR
)$(MULTISUBDIR
)/$$FILE ; \
288 $(INSTALL_DATA
) $$FILE $(INSTALLDIR
)$(MULTISUBDIR
)/$$FILE ; \
289 $(RANLIB
) $(INSTALLDIR
)$(MULTISUBDIR
)/$$FILE ; \
290 chmod a-x
$(INSTALLDIR
)$(MULTISUBDIR
)/$$FILE ; \
293 @rootme
=`pwd`/ ; export rootme
; \
294 $(MULTIDO
) $(FLAGS_TO_PASS
) multi-do DO
=install
302 $(MAKE
) -C ..
/libio c
++clean
303 $(MAKE
) -C ..
/libg
++ clean
304 -$(MAKE
) $(MAKEFLAGS
) check
305 -$(MAKE
) -C ..
/libio
check
306 -$(MAKE
) -C ..
/libg
++ check
307 -$(MAKE
) -C ..
/gcc check-g
++
311 $(MAKE
) -C ..
/libio c
++clean
312 $(MAKE
) -C ..
/libg
++ clean
316 -$(MAKE
) -C ..
/libio
check
317 -$(MAKE
) -C ..
/libg
++ check
318 -$(MAKE
) -C ..
/gcc check-g
++