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