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 65DPADD= ${LIBCXXRT} 66LDADD= -lcxxrt 67LDFLAGS+= --verbose 68INCSGROUPS= STD EXP EXT 69 70STD_HEADERS= __bit_reference\ 71 __config\ 72 __debug\ 73 __functional_03\ 74 __functional_base\ 75 __functional_base_03\ 76 __hash_table\ 77 __locale\ 78 __mutex_base\ 79 __split_buffer\ 80 __sso_allocator\ 81 __std_stream\ 82 __tree\ 83 __tuple\ 84 __tuple_03\ 85 __undef_min_max\ 86 algorithm\ 87 array\ 88 atomic\ 89 bitset\ 90 cassert\ 91 ccomplex\ 92 cctype\ 93 cerrno\ 94 cfenv\ 95 cfloat\ 96 chrono\ 97 cinttypes\ 98 ciso646\ 99 climits\ 100 clocale\ 101 cmath\ 102 codecvt\ 103 complex\ 104 complex.h\ 105 condition_variable\ 106 csetjmp\ 107 csignal\ 108 cstdarg\ 109 cstdbool\ 110 cstddef\ 111 cstdint\ 112 cstdio\ 113 cstdlib\ 114 cstring\ 115 ctgmath\ 116 ctime\ 117 cwchar\ 118 cwctype\ 119 deque\ 120 exception\ 121 forward_list\ 122 fstream\ 123 functional\ 124 future\ 125 initializer_list\ 126 iomanip\ 127 ios\ 128 iosfwd\ 129 iostream\ 130 istream\ 131 iterator\ 132 limits\ 133 list\ 134 locale\ 135 map\ 136 memory\ 137 mutex\ 138 new\ 139 numeric\ 140 ostream\ 141 queue\ 142 random\ 143 ratio\ 144 regex\ 145 scoped_allocator\ 146 set\ 147 shared_mutex\ 148 sstream\ 149 stack\ 150 stdexcept\ 151 streambuf\ 152 string\ 153 strstream\ 154 system_error\ 155 tgmath.h\ 156 thread\ 157 tuple\ 158 type_traits\ 159 typeindex\ 160 typeinfo\ 161 unordered_map\ 162 unordered_set\ 163 utility\ 164 valarray\ 165 vector 166RT_HEADERS= cxxabi.h\ 167 unwind.h\ 168 unwind-arm.h\ 169 unwind-itanium.h 170 171.for hdr in ${STD_HEADERS} 172STD+= ${HDRDIR}/${hdr} 173INCSLINKS+= ${CXXINCLUDEDIR}/${hdr} ${CXXINCLUDEDIR}/tr1/${hdr} 174.endfor 175.for hdr in ${RT_HEADERS} 176STD+= ${LIBCXXRTDIR}/${hdr} 177.endfor 178STDDIR= ${CXXINCLUDEDIR} 179 180EXP_HEADERS= dynarray\ 181 optional 182 183.for hdr in ${EXP_HEADERS} 184EXP+= ${HDRDIR}/experimental/${hdr} 185.endfor 186EXPDIR= ${CXXINCLUDEDIR}/experimental 187 188EXT_HEADERS= __hash\ 189 hash_map\ 190 hash_set 191 192.for hdr in ${EXT_HEADERS} 193EXT+= ${HDRDIR}/ext/${hdr} 194.endfor 195EXTDIR= ${CXXINCLUDEDIR}/ext 196 197.if ${MK_GNUCXX} == "no" && ${COMPILER_TYPE} == "gcc" 198CLEANFILES+= libstdc++.so libstdc++.a 199 200afterinstall: 201 ln -sf ${DESTDIR}${LIBDIR}/lib${LIB}.so \ 202 ${.OBJDIR}/libstdc++.so 203 ln -sf ${DESTDIR}${LIBDIR}/lib${LIB}.a \ 204 ${.OBJDIR}/libstdc++.a 205.endif 206 207.include <bsd.lib.mk> 208