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