1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5PACKAGE= clibs 6_LIBCXXRTDIR= ${SRCTOP}/contrib/libcxxrt 7HDRDIR= ${SRCTOP}/contrib/libc++/include 8SRCDIR= ${SRCTOP}/contrib/libc++/src 9CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} 10.if ${MACHINE_CPUARCH} == "arm" 11STATIC_CXXFLAGS+= -mlong-calls 12.endif 13 14.PATH: ${SRCDIR} 15 16LIB= c++ 17SHLIB_MAJOR= 1 18SHLIB_LDSCRIPT= libc++.ldscript 19 20SRCS+= algorithm.cpp\ 21 any.cpp\ 22 bind.cpp\ 23 chrono.cpp\ 24 condition_variable.cpp\ 25 debug.cpp\ 26 exception.cpp\ 27 future.cpp\ 28 hash.cpp\ 29 ios.cpp\ 30 iostream.cpp\ 31 locale.cpp\ 32 memory.cpp\ 33 mutex.cpp\ 34 new.cpp\ 35 optional.cpp\ 36 random.cpp\ 37 regex.cpp\ 38 shared_mutex.cpp\ 39 stdexcept.cpp\ 40 string.cpp\ 41 strstream.cpp\ 42 system_error.cpp\ 43 thread.cpp\ 44 typeinfo.cpp\ 45 utility.cpp\ 46 valarray.cpp 47 48CXXRT_SRCS+= libelftc_dem_gnu3.c\ 49 terminate.cc\ 50 dynamic_cast.cc\ 51 memory.cc\ 52 auxhelper.cc\ 53 exception.cc\ 54 stdexcept.cc\ 55 typeinfo.cc\ 56 guard.cc 57 58.for _S in ${CXXRT_SRCS} 59CLEANFILES+= cxxrt_${_S} 60STATICOBJS+= cxxrt_${_S:R}.o 61cxxrt_${_S}: ${_LIBCXXRTDIR}/${_S} .NOMETA 62 ln -sf ${.ALLSRC} ${.TARGET} 63.endfor 64 65WARNS= 0 66CFLAGS+= -isystem ${HDRDIR} -isystem ${_LIBCXXRTDIR} -nostdinc++ -nostdlib -DLIBCXXRT 67.if empty(CXXFLAGS:M-std=*) 68CXXFLAGS+= -std=c++11 69.endif 70 71LIBADD+= cxxrt 72INCSGROUPS= STD EXP EXT 73 74STD_HEADERS= __bit_reference\ 75 __bsd_locale_defaults.h\ 76 __bsd_locale_fallbacks.h\ 77 __config\ 78 __debug\ 79 __functional_03\ 80 __functional_base\ 81 __functional_base_03\ 82 __hash_table\ 83 __locale\ 84 __mutex_base\ 85 __nullptr\ 86 __refstring\ 87 __split_buffer\ 88 __sso_allocator\ 89 __std_stream\ 90 __threading_support\ 91 __tree\ 92 __tuple\ 93 __undef___deallocate\ 94 __undef_min_max\ 95 algorithm\ 96 array\ 97 atomic\ 98 bitset\ 99 cassert\ 100 ccomplex\ 101 cctype\ 102 cerrno\ 103 cfenv\ 104 cfloat\ 105 chrono\ 106 cinttypes\ 107 ciso646\ 108 climits\ 109 clocale\ 110 cmath\ 111 codecvt\ 112 complex\ 113 complex.h\ 114 condition_variable\ 115 csetjmp\ 116 csignal\ 117 cstdarg\ 118 cstdbool\ 119 cstddef\ 120 cstdint\ 121 cstdio\ 122 cstdlib\ 123 cstring\ 124 ctgmath\ 125 ctime\ 126 ctype.h\ 127 cwchar\ 128 cwctype\ 129 deque\ 130 errno.h\ 131 exception\ 132 float.h\ 133 forward_list\ 134 fstream\ 135 functional\ 136 future\ 137 initializer_list\ 138 inttypes.h\ 139 iomanip\ 140 ios\ 141 iosfwd\ 142 iostream\ 143 istream\ 144 iterator\ 145 limits\ 146 list\ 147 locale\ 148 map\ 149 math.h\ 150 memory\ 151 mutex\ 152 new\ 153 numeric\ 154 ostream\ 155 queue\ 156 random\ 157 ratio\ 158 regex\ 159 scoped_allocator\ 160 set\ 161 setjmp.h\ 162 shared_mutex\ 163 sstream\ 164 stack\ 165 stdbool.h\ 166 stddef.h\ 167 stdexcept\ 168 stdio.h\ 169 stdlib.h\ 170 streambuf\ 171 string\ 172 string.h\ 173 strstream\ 174 system_error\ 175 tgmath.h\ 176 thread\ 177 tuple\ 178 type_traits\ 179 typeindex\ 180 typeinfo\ 181 unordered_map\ 182 unordered_set\ 183 utility\ 184 valarray\ 185 vector\ 186 wchar.h\ 187 wctype.h 188RT_HEADERS= cxxabi.h\ 189 unwind.h\ 190 unwind-arm.h\ 191 unwind-itanium.h 192 193.for hdr in ${STD_HEADERS} 194STD+= ${HDRDIR}/${hdr} 195INCSLINKS+= ../${hdr} ${CXXINCLUDEDIR}/tr1/${hdr} 196.endfor 197.for hdr in ${RT_HEADERS} 198STD+= ${_LIBCXXRTDIR}/${hdr} 199.endfor 200STDDIR= ${CXXINCLUDEDIR} 201 202EXP_HEADERS= __config\ 203 __memory\ 204 algorithm\ 205 any\ 206 chrono\ 207 deque\ 208 dynarray\ 209 filesystem\ 210 forward_list\ 211 functional\ 212 iterator\ 213 list\ 214 map\ 215 memory_resource\ 216 optional\ 217 propagate_const\ 218 ratio\ 219 regex\ 220 set\ 221 string\ 222 string_view\ 223 system_error\ 224 tuple\ 225 type_traits\ 226 unordered_map\ 227 unordered_set\ 228 utility\ 229 vector 230 231.for hdr in ${EXP_HEADERS} 232EXP+= ${HDRDIR}/experimental/${hdr} 233.endfor 234EXPDIR= ${CXXINCLUDEDIR}/experimental 235 236EXT_HEADERS= __hash\ 237 hash_map\ 238 hash_set 239 240.for hdr in ${EXT_HEADERS} 241EXT+= ${HDRDIR}/ext/${hdr} 242.endfor 243EXTDIR= ${CXXINCLUDEDIR}/ext 244 245.include <bsd.lib.mk> 246