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