gcc4X: rework some makefiles
[dragonfly.git] / gnu / lib / gcc47 / libstdc++ / Makefile
CommitLineData
b450dd39
JM
1.include "../Makefile.inc"
2.include "../libsupc++/Makefile.src"
3.include "Makefile.headers"
4SRCDIR= ${GCCDIR}/libstdc++-v3
5.PATH: ${SRCDIR}
6.PATH: ${SRCDIR}/libsupc++
7.PATH: ${SRCDIR}/src
8.PATH: ${SRCDIR}/src/c++11
9.PATH: ${SRCDIR}/src/c++98
10.PATH: ${SRCDIR}/libmath
11.PATH: ${SRCDIR}/config/io
12.PATH: ${SRCDIR}/config/locale/dragonfly
13.PATH: ${SRCDIR}/config/locale/generic
14.PATH: ${GCCDIR}/gcc
15.PATH: ${GCCDIR}/libgcc
16
17# Vendor lists shared lib version as 6, not 9.
18LIB= stdc++
19SHLIB_MAJOR= 9
20
21CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
22CFLAGS+= -I${.CURDIR}
23CFLAGS+= -I${.OBJDIR}
24CFLAGS+= -I${GCCDIR}/gcc
25CFLAGS+= -I${GCCDIR}/libgcc
26CFLAGS+= -I${GCCDIR}/libiberty
b450dd39 27CFLAGS+= -I${GCCDIR}/libcpp/include
b450dd39
JM
28CXXFLAGS+= -fno-implicit-templates
29CXXFLAGS+= -fdiagnostics-show-location=once
30CXXFLAGS+= -ffunction-sections -fdata-sections
31CXXFLAGS+= -Wno-deprecated
32LDFLAGS+= -Wl,--version-script=${.CURDIR}/libstdc++-symbols.ver
33
34THRLIB= ${.OBJDIR}/../../../../lib/libpthread/libpthread.so
35LDADD+= ${THRLIB} -lm
36DPADD+= ${THRLIB} ${LIBM}
37
38# Slightly modified from libstdc++/src/c++98/Makefile.in
39# sources_1998 is the equivalent of libc_98convenience.a
40# sources_2011 is the equivalent of libc_11convenience.a
41host_sources_1998 = \
42 atomicity.cc \
43 codecvt_members.cc \
44 collate_members.cc \
45 ctype_configure_char.cc \
46 ctype_members.cc \
47 messages_members.cc \
48 monetary_members.cc \
49 numeric_members.cc \
50 time_members.cc
51
52parallel_sources_1998 =
53
54inst_sources_1998 = \
55 allocator-inst.cc \
56 concept-inst.cc \
57 ext-inst.cc \
58 ios-inst.cc \
59 iostream-inst.cc \
60 istream-inst.cc \
61 locale-inst.cc \
62 misc-inst.cc \
63 ostream-inst.cc \
64 sstream-inst.cc \
65 streambuf-inst.cc \
66 wlocale-inst.cc
67
68host_sources_extra_1998 = \
69 basic_file.cc \
70 c++locale.cc \
71 ${inst_sources_1998} \
72 ${parallel_sources_1998}
73
74sources_1998 = \
75 bitmap_allocator.cc \
76 pool_allocator.cc \
77 mt_allocator.cc \
78 codecvt.cc \
79 complex_io.cc \
80 ctype.cc \
81 globals_io.cc \
82 hash_tr1.cc \
83 hashtable_tr1.cc \
84 ios.cc \
85 ios_failure.cc \
86 ios_init.cc \
87 ios_locale.cc \
88 list.cc \
89 locale.cc \
90 locale_init.cc \
91 locale_facets.cc \
92 localename.cc \
93 math_stubs_float.cc \
94 math_stubs_long_double.cc \
95 stdexcept.cc \
96 strstream.cc \
97 tree-cxx.cc \
98 istream.cc \
99 streambuf.cc \
100 valarray.cc \
101 ${host_sources_1998} \
102 ${host_sources_extra_1998}
103
104inst_sources_2011 = \
105 fstream-inst.cc \
106 string-inst.cc \
107 wstring-inst.cc
108
109sources_2011 = \
110 chrono.cc \
111 condition_variable.cc \
112 debug-cxx.cc \
113 functexcept.cc \
114 functional.cc \
115 future.cc \
116 hash_c++0x.cc \
117 hashtable_c++0x.cc \
118 limits.cc \
119 mutex.cc \
120 placeholders.cc \
121 regex.cc \
122 shared_ptr.cc \
123 system_error.cc \
124 thread.cc \
125 ${inst_sources_2011}
126
127ldbl_compat_sources =
128parallel_compat_sources =
129
130cxx98_sources = \
131 compatibility.cc \
132 compatibility-debug_list.cc \
133 compatibility-debug_list-2.cc \
134 compatibility-list.cc \
135 compatibility-list-2.cc \
136 ${ldbl_compat_sources} \
137 ${parallel_compat_sources}
138
139cxx11_sources = \
140 compatibility-c++0x.cc \
141 compatibility-atomic-c++0x.cc \
142 compatibility-thread-c++0x.cc
143
144SRCS+= ${SUPCXX} \
145 cp-demangle.c \
146 ${sources_1998} \
147 ${sources_2011} \
148 ${cxx98_sources} \
149 ${cxx11_sources}
150
151FLAGS_GROUPS= gnu0x gnu11
152gnu0x_FLAGS= -std=gnu++0x
153gnu11_FLAGS= -std=gnu++11
154gnu0x_FLAGS_FILES= eh_ptr.cc \
155 eh_throw.cc \
156 guard.cc \
157 nested_exception.cc
158gnu11_FLAGS_FILES= chrono.cc \
159 condition_variable.cc \
160 debug-cxx.cc \
161 functexcept.cc \
162 functional.cc \
163 future.cc \
164 hash_c++0x.cc \
165 hashtable_c++0x.cc \
166 limits.cc \
167 mutex.cc \
168 placeholders.cc \
169 regex.cc \
170 shared_ptr.cc \
171 system_error.cc \
172 thread.cc \
173 fstream-inst.cc \
174 string-inst.cc \
175 wstring-inst.cc \
176 compatibility-c++0x.cc \
177 compatibility-atomic-c++0x.cc \
178 compatibility-thread-c++0x.cc
179
180#generated sources
181SRCS+= unwind.h \
64ed7155 182 unwind-cxx.h \
7992527c 183 ${CONF_HEADERS:T}
b450dd39
JM
184
185HD= ${INCLUDEDIR}/c++/${GCCPOINTVER}
186
187# These sections are detailed in Makefile.headers
188# parallel section is empty, skip it
189# make buildincludes, make installincludes before make depend
190glibcxx_srcdir= ${SRCDIR}
191HSECT= std bits bits_sup backward ext ext_compat tr1 tr2 decimal \
192 c_base c_compatibility debug profile profile_impl host supc
193PBSECT= 1 2 3 4 5 6 7
194
195.for i in ${HSECT}
196INCSGROUPS+= ${i}_headers
197${i}_headersDIR= ${HD}/${${i}_builddir}
198.endfor
199
200PATHGROUP=
201.for i in ${PBSECT}
202. for k in ${pb_headers${i}}
203. if ${PATHGROUP:M${k:H:T}} == ""
204PATHGROUP+=${k:H:T}
205PATH_${k:H:T}=${k:H:T}
206. endif
207PBG_${k:H:T}+=${k}
208. endfor
209.endfor
210
211INCSGROUPS+= PBG_pb_ds
212PBG_pb_dsDIR= ${HD}/${pb_builddir}
213
214INCSGROUPS+= PBG_detail
215PBG_detailDIR= ${HD}/${pb_builddir}/detail
216
217.for k in ${PATHGROUP:Npb_ds:Ndetail}
218INCSGROUPS+= PBG_${k}
219PBG_${k}DIR= ${HD}/${pb_builddir}/detail/${PATH_${k}}
220.endfor
221
222INCSGROUPS+= host_headers_extra
223host_headers_extraDIR= ${HD}/bits
224host_headers_extraNAME_basic_file_stdio.h= basic_file.h
225host_headers_extraNAME_c_locale.h= c++locale.h
226host_headers_extraNAME_c_io_stdio.h+= c++io.h
227host_headers_extraNAME_new_allocator_base.h= c++allocator.h
228
229CONF_HEADERS= locale/generic/c++locale_internal.h \
230 abi/compatibility.h
231
232atomicity.cc: ${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h
233 cp ${.ALLSRC} ${.TARGET}
234
235ctype_configure_char.cc: ${SRCDIR}/config/os/bsd/dragonfly/${.TARGET}
236 cp ${.ALLSRC} ${.TARGET}
237
238basic_file.cc: ${SRCDIR}/config/io/basic_file_stdio.cc
239 cp ${.ALLSRC} ${.TARGET}
240
241c++locale.cc: ${SRCDIR}/config/locale/dragonfly/c_locale.cc
242 cp ${.ALLSRC} ${.TARGET}
243
244unwind.h: unwind-generic.h
245 cp ${.ALLSRC} ${.TARGET}
246
64ed7155
JM
247unwind-cxx.h: ${SRCDIR}/libsupc++/unwind-cxx.h
248 cp ${.ALLSRC} ${.TARGET}
249
b450dd39
JM
250copybits:
251 mkdir -p bits
252
253.for F in ${CONF_HEADERS}
254${F:T}: copybits
255 cp ${SRCDIR}/config/${F} bits/
256.endfor
257
258# We can't add libiberty to the PATH because it will take the regex.o there
259# before compiling regex.cc into an object file. Just recompile
260
261cp-demangle.c: ${GCCDIR}/libiberty/${.TARGET}
262 cp ${.ALLSRC} ${.TARGET}
263
8a014a40 264# debug.cc, tree.cc and vec.cc are also getting pre-empted by gcc/ versions
b450dd39
JM
265debug-cxx.cc: ${SRCDIR}/src/c++11/debug.cc
266 cp ${.ALLSRC} ${.TARGET}
267
268tree-cxx.cc: ${SRCDIR}/src/c++98/tree.cc
269 cp ${.ALLSRC} ${.TARGET}
270
8a014a40
JM
271vec-cxx.cc: ${SRCDIR}/libsupc++/vec.cc
272 cp ${.ALLSRC} ${.TARGET}
273
b450dd39
JM
274CLEANDIRS+= bits
275CLEANFILES+= atomicity.cc basic_file.cc c++locale.cc \
64ed7155 276 ctype_configure_char.cc unwind.h unwind-cxx.h \
7992527c
JM
277 cp-demangle.c debug-cxx.cc tree-cxx.cc vec-cxx.cc \
278 c++config.h gthr.h gthr-default.h
72036313 279
b450dd39 280.include <bsd.lib.mk>