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}/config/io 11.PATH: ${SRCDIR}/config/locale/dragonfly 12.PATH: ${SRCDIR}/config/locale/generic 13.PATH: ${GCCDIR}/gcc 14.PATH: ${GCCDIR}/libgcc 15 16# Vendor lists shared lib version as 6, not 9. 17LIB= stdc++ 18SHLIB_MAJOR= 9 19 20CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H 21CFLAGS+= -I${.CURDIR} 22CFLAGS+= -I${.OBJDIR} 23CFLAGS+= -I${GCCDIR}/gcc 24CFLAGS+= -I${GCCDIR}/libgcc 25CFLAGS+= -I${GCCDIR}/libiberty 26CFLAGS+= -I${GCCDIR}/libcpp/include 27CXXFLAGS+= -fno-implicit-templates 28CXXFLAGS+= -fdiagnostics-show-location=once 29CXXFLAGS+= -ffunction-sections -fdata-sections 30CXXFLAGS+= -Wno-deprecated 31LDFLAGS+= -Wl,--version-script=${.CURDIR}/libstdc++-symbols.ver 32 33THRLIB= ${.OBJDIR}/../../../../lib/libpthread/libpthread.so 34LDADD+= ${THRLIB} -lm 35DPADD+= ${THRLIB} ${LIBM} 36 37# Slightly modified from libstdc++/src/c++98/Makefile.in 38# sources_1998 is the equivalent of libc_98convenience.a 39# sources_2011 is the equivalent of libc_11convenience.a 40host_sources_1998 = \ 41 atomicity.cc \ 42 codecvt_members.cc \ 43 collate_members.cc \ 44 ctype_configure_char.cc \ 45 ctype_members.cc \ 46 messages_members.cc \ 47 monetary_members.cc \ 48 numeric_members.cc \ 49 time_members.cc 50 51parallel_sources_1998 = 52 53inst_sources_1998 = \ 54 allocator-inst.cc \ 55 concept-inst.cc \ 56 ext-inst.cc \ 57 ios-inst.cc \ 58 iostream-inst.cc \ 59 istream-inst.cc \ 60 locale-inst.cc \ 61 misc-inst.cc \ 62 ostream-inst.cc \ 63 sstream-inst.cc \ 64 streambuf-inst.cc \ 65 wlocale-inst.cc 66 67host_sources_extra_1998 = \ 68 basic_file.cc \ 69 c++locale.cc \ 70 ${inst_sources_1998} \ 71 ${parallel_sources_1998} 72 73sources_1998 = \ 74 bitmap_allocator.cc \ 75 pool_allocator.cc \ 76 mt_allocator.cc \ 77 codecvt.cc \ 78 complex_io.cc \ 79 ctype.cc \ 80 globals_io.cc \ 81 hash_tr1.cc \ 82 hashtable_tr1.cc \ 83 ios.cc \ 84 ios_failure.cc \ 85 ios_init.cc \ 86 ios_locale.cc \ 87 list.cc \ 88 locale.cc \ 89 locale_init.cc \ 90 locale_facets.cc \ 91 localename.cc \ 92 math_stubs_float.cc \ 93 math_stubs_long_double.cc \ 94 stdexcept.cc \ 95 strstream.cc \ 96 tree-cxx.cc \ 97 istream.cc \ 98 streambuf.cc \ 99 valarray.cc \ 100 ${host_sources_1998} \ 101 ${host_sources_extra_1998} 102 103inst_sources_2011 = \ 104 fstream-inst.cc \ 105 string-inst.cc \ 106 wstring-inst.cc 107 108sources_2011 = \ 109 chrono.cc \ 110 condition_variable.cc \ 111 debug-cxx.cc \ 112 functexcept.cc \ 113 functional.cc \ 114 future.cc \ 115 hash_c++0x.cc \ 116 hashtable_c++0x.cc \ 117 limits.cc \ 118 mutex.cc \ 119 placeholders.cc \ 120 regex.cc \ 121 shared_ptr.cc \ 122 system_error.cc \ 123 thread.cc \ 124 ${inst_sources_2011} 125 126ldbl_compat_sources = 127parallel_compat_sources = 128 129cxx98_sources = \ 130 compatibility.cc \ 131 compatibility-debug_list.cc \ 132 compatibility-debug_list-2.cc \ 133 compatibility-list.cc \ 134 compatibility-list-2.cc \ 135 ${ldbl_compat_sources} \ 136 ${parallel_compat_sources} 137 138cxx11_sources = \ 139 compatibility-c++0x.cc \ 140 compatibility-atomic-c++0x.cc \ 141 compatibility-thread-c++0x.cc 142 143SRCS+= ${SUPCXX} \ 144 cp-demangle.c \ 145 ${sources_1998} \ 146 ${sources_2011} \ 147 ${cxx98_sources} \ 148 ${cxx11_sources} 149 150FLAGS_GROUPS= gnu0x gnu11 151gnu0x_FLAGS= -std=gnu++0x 152gnu11_FLAGS= -std=gnu++11 153gnu0x_FLAGS_FILES= eh_ptr.cc \ 154 eh_throw.cc \ 155 guard.cc \ 156 nested_exception.cc 157gnu11_FLAGS_FILES= chrono.cc \ 158 condition_variable.cc \ 159 debug-cxx.cc \ 160 functexcept.cc \ 161 functional.cc \ 162 future.cc \ 163 hash_c++0x.cc \ 164 hashtable_c++0x.cc \ 165 limits.cc \ 166 mutex.cc \ 167 placeholders.cc \ 168 regex.cc \ 169 shared_ptr.cc \ 170 system_error.cc \ 171 thread.cc \ 172 fstream-inst.cc \ 173 string-inst.cc \ 174 wstring-inst.cc \ 175 compatibility-c++0x.cc \ 176 compatibility-atomic-c++0x.cc \ 177 compatibility-thread-c++0x.cc 178 179#generated sources 180SRCS+= unwind.h \ 181 unwind-cxx.h \ 182 cxxabi_forced.h \ 183 ${CONF_HEADERS:T} 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 247unwind-cxx.h: ${SRCDIR}/libsupc++/unwind-cxx.h 248 cp ${.ALLSRC} ${.TARGET} 249 250cxxabi_forced.h: ${SRCDIR}/libsupc++/cxxabi_forced.h 251 cp ${.ALLSRC} ${.TARGET} 252 253copybits: 254 mkdir -p bits 255 256.for F in ${CONF_HEADERS} 257${F:T}: copybits 258 cp ${SRCDIR}/config/${F} bits/ 259.endfor 260 261# We can't add libiberty to the PATH because it will take the regex.o there 262# before compiling regex.cc into an object file. Just recompile 263 264cp-demangle.c: ${GCCDIR}/libiberty/${.TARGET} 265 cp ${.ALLSRC} ${.TARGET} 266 267# debug.cc, tree.cc and vec.cc are also getting pre-empted by gcc/ versions 268debug-cxx.cc: ${SRCDIR}/src/c++11/debug.cc 269 cp ${.ALLSRC} ${.TARGET} 270 271tree-cxx.cc: ${SRCDIR}/src/c++98/tree.cc 272 cp ${.ALLSRC} ${.TARGET} 273 274vec-cxx.cc: ${SRCDIR}/libsupc++/vec.cc 275 cp ${.ALLSRC} ${.TARGET} 276 277CLEANDIRS+= bits 278CLEANFILES+= atomicity.cc basic_file.cc c++locale.cc \ 279 ctype_configure_char.cc unwind.h unwind-cxx.h \ 280 cp-demangle.c debug-cxx.cc tree-cxx.cc vec-cxx.cc \ 281 cxxabi_forced.h c++config.h gthr.h gthr-default.h 282 283.include <bsd.lib.mk> 284