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