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