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