b94ce6c6d544b8b3300ec81a8dcc8ce71a7a7709
[dragonfly.git] / gnu / lib / gcc47 / libstdc++ / Makefile
1 .include "../Makefile.inc"
2 .include "../libsupc++/Makefile.src"
3 .include "Makefile.headers"
4 SRCDIR= ${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.
18 LIB=            stdc++
19 SHLIB_MAJOR=    9
20
21 CFLAGS+=        -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
22 CFLAGS+=        -I${.CURDIR}
23 CFLAGS+=        -I${.OBJDIR}
24 CFLAGS+=        -I${GCCDIR}/gcc
25 CFLAGS+=        -I${GCCDIR}/libgcc
26 CFLAGS+=        -I${GCCDIR}/libiberty
27 CFLAGS+=        -I${GCCDIR}/include
28 CFLAGS+=        -I${GCCDIR}/libcpp/include
29 CFLAGS+=        -I${SRCDIR}/include
30 CFLAGS+=        -I${SRCDIR}/include/std
31 CFLAGS+=        -I${SRCDIR}/include/c_std
32 CFLAGS+=        -I${SRCDIR}/include/c_global
33 CFLAGS+=        -I${SRCDIR}/include/backward
34 CXXFLAGS+=      -fno-implicit-templates
35 CXXFLAGS+=      -fdiagnostics-show-location=once
36 CXXFLAGS+=      -ffunction-sections -fdata-sections
37 CXXFLAGS+=      -Wno-deprecated
38 LDFLAGS+=       -Wl,--version-script=${.CURDIR}/libstdc++-symbols.ver
39
40 THRLIB=         ${.OBJDIR}/../../../../lib/libpthread/libpthread.so
41 LDADD+=         ${THRLIB} -lm
42 DPADD+=         ${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
47 host_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
58 parallel_sources_1998 =
59
60 inst_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
74 host_sources_extra_1998 = \
75         basic_file.cc \
76         c++locale.cc \
77         ${inst_sources_1998} \
78         ${parallel_sources_1998}
79
80 sources_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
110 inst_sources_2011 = \
111         fstream-inst.cc \
112         string-inst.cc \
113         wstring-inst.cc
114
115 sources_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
133 ldbl_compat_sources = 
134 parallel_compat_sources = 
135
136 cxx98_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
145 cxx11_sources = \
146         compatibility-c++0x.cc \
147         compatibility-atomic-c++0x.cc \
148         compatibility-thread-c++0x.cc
149
150 SRCS+=  ${SUPCXX} \
151         cp-demangle.c \
152         ${sources_1998} \
153         ${sources_2011} \
154         ${cxx98_sources} \
155         ${cxx11_sources}
156
157 FLAGS_GROUPS=           gnu0x gnu11
158 gnu0x_FLAGS=            -std=gnu++0x
159 gnu11_FLAGS=            -std=gnu++11
160 gnu0x_FLAGS_FILES=      eh_ptr.cc \
161                         eh_throw.cc \
162                         guard.cc \
163                         nested_exception.cc
164 gnu11_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
187 SRCS+=  unwind.h \
188         ${CONF_HEADERS:T} \
189         bits/gthr.h \
190         bits/gthr-default.h \
191         bits/c++config.h
192
193 HD=     ${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
198 glibcxx_srcdir= ${SRCDIR}
199 HSECT=  std bits bits_sup backward ext ext_compat tr1 tr2 decimal \
200         c_base c_compatibility debug profile profile_impl host supc
201 PBSECT= 1 2 3 4 5 6 7
202         
203 .for i in ${HSECT}
204 INCSGROUPS+=            ${i}_headers
205 ${i}_headersDIR=        ${HD}/${${i}_builddir}
206 .endfor
207
208 PATHGROUP=
209 .for i in ${PBSECT}
210 .  for k in ${pb_headers${i}}
211 .    if ${PATHGROUP:M${k:H:T}} == ""
212 PATHGROUP+=${k:H:T}
213 PATH_${k:H:T}=${k:H:T}
214 .    endif
215 PBG_${k:H:T}+=${k}
216 .  endfor
217 .endfor
218
219 INCSGROUPS+=            PBG_pb_ds
220 PBG_pb_dsDIR=           ${HD}/${pb_builddir}
221
222 INCSGROUPS+=            PBG_detail
223 PBG_detailDIR=          ${HD}/${pb_builddir}/detail
224
225 .for k in ${PATHGROUP:Npb_ds:Ndetail}
226 INCSGROUPS+=            PBG_${k}
227 PBG_${k}DIR=            ${HD}/${pb_builddir}/detail/${PATH_${k}}
228 .endfor
229
230 INCSGROUPS+=            host_headers_extra
231 host_headers_extraDIR=  ${HD}/bits
232 host_headers_extraNAME_basic_file_stdio.h=      basic_file.h
233 host_headers_extraNAME_c_locale.h=              c++locale.h
234 host_headers_extraNAME_c_io_stdio.h+=           c++io.h
235 host_headers_extraNAME_new_allocator_base.h=    c++allocator.h
236
237 CONF_HEADERS=   locale/generic/c++locale_internal.h \
238                 abi/compatibility.h
239
240 atomicity.cc: ${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h
241         cp ${.ALLSRC} ${.TARGET}
242
243 ctype_configure_char.cc: ${SRCDIR}/config/os/bsd/dragonfly/${.TARGET}
244         cp ${.ALLSRC} ${.TARGET}
245
246 basic_file.cc: ${SRCDIR}/config/io/basic_file_stdio.cc
247         cp ${.ALLSRC} ${.TARGET}
248
249 c++locale.cc: ${SRCDIR}/config/locale/dragonfly/c_locale.cc
250         cp ${.ALLSRC} ${.TARGET}
251
252 unwind.h: unwind-generic.h
253         cp ${.ALLSRC} ${.TARGET}
254
255 copybits:
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
266 cp-demangle.c: ${GCCDIR}/libiberty/${.TARGET}
267         cp ${.ALLSRC} ${.TARGET}
268
269 # debug.cc and tree.cc are also getting pre-empted by gcc/ versions
270 debug-cxx.cc: ${SRCDIR}/src/c++11/debug.cc
271         cp ${.ALLSRC} ${.TARGET}
272
273 tree-cxx.cc: ${SRCDIR}/src/c++98/tree.cc
274         cp ${.ALLSRC} ${.TARGET}
275
276 CLEANDIRS+=     bits
277 CLEANFILES+=    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
281 depend all: bits/c++config.h
282
283 .include <bsd.lib.mk>