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