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