]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libc++/Makefile
Merge libc++ trunk r291476, update Makefile, ObsoleteFiles.inc and
[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_min_max\
96                 algorithm\
97                 any\
98                 array\
99                 atomic\
100                 bitset\
101                 cassert\
102                 ccomplex\
103                 cctype\
104                 cerrno\
105                 cfenv\
106                 cfloat\
107                 chrono\
108                 cinttypes\
109                 ciso646\
110                 climits\
111                 clocale\
112                 cmath\
113                 codecvt\
114                 complex\
115                 complex.h\
116                 condition_variable\
117                 csetjmp\
118                 csignal\
119                 cstdarg\
120                 cstdbool\
121                 cstddef\
122                 cstdint\
123                 cstdio\
124                 cstdlib\
125                 cstring\
126                 ctgmath\
127                 ctime\
128                 ctype.h\
129                 cwchar\
130                 cwctype\
131                 deque\
132                 errno.h\
133                 exception\
134                 float.h\
135                 forward_list\
136                 fstream\
137                 functional\
138                 future\
139                 initializer_list\
140                 inttypes.h\
141                 iomanip\
142                 ios\
143                 iosfwd\
144                 iostream\
145                 istream\
146                 iterator\
147                 limits\
148                 limits.h\
149                 list\
150                 locale\
151                 locale.h\
152                 map\
153                 math.h\
154                 memory\
155                 mutex\
156                 new\
157                 numeric\
158                 optional\
159                 ostream\
160                 queue\
161                 random\
162                 ratio\
163                 regex\
164                 scoped_allocator\
165                 set\
166                 setjmp.h\
167                 shared_mutex\
168                 sstream\
169                 stack\
170                 stdbool.h\
171                 stddef.h\
172                 stdexcept\
173                 stdint.h\
174                 stdio.h\
175                 stdlib.h\
176                 streambuf\
177                 string\
178                 string.h\
179                 string_view\
180                 strstream\
181                 system_error\
182                 tgmath.h\
183                 thread\
184                 tuple\
185                 type_traits\
186                 typeindex\
187                 typeinfo\
188                 unordered_map\
189                 unordered_set\
190                 utility\
191                 valarray\
192                 variant\
193                 vector\
194                 wchar.h\
195                 wctype.h
196 RT_HEADERS=     cxxabi.h\
197                 unwind.h\
198                 unwind-arm.h\
199                 unwind-itanium.h
200
201 .for hdr in ${STD_HEADERS}
202 STD+=           ${HDRDIR}/${hdr}
203 INCSLINKS+=     ../${hdr} ${CXXINCLUDEDIR}/tr1/${hdr}
204 .endfor
205 .for hdr in ${RT_HEADERS}
206 STD+=           ${_LIBCXXRTDIR}/${hdr}
207 .endfor
208 STDDIR=         ${CXXINCLUDEDIR}
209
210 EXP_HEADERS=    __config\
211                 __memory\
212                 algorithm\
213                 any\
214                 chrono\
215                 deque\
216                 dynarray\
217                 filesystem\
218                 forward_list\
219                 functional\
220                 iterator\
221                 list\
222                 map\
223                 memory_resource\
224                 numeric\
225                 optional\
226                 propagate_const\
227                 ratio\
228                 regex\
229                 set\
230                 string\
231                 string_view\
232                 system_error\
233                 tuple\
234                 type_traits\
235                 unordered_map\
236                 unordered_set\
237                 utility\
238                 vector
239
240 .for hdr in ${EXP_HEADERS}
241 EXP+=           ${HDRDIR}/experimental/${hdr}
242 .endfor
243 EXPDIR=         ${CXXINCLUDEDIR}/experimental
244
245 EXT_HEADERS=    __hash\
246                 hash_map\
247                 hash_set
248
249 .for hdr in ${EXT_HEADERS}
250 EXT+=           ${HDRDIR}/ext/${hdr}
251 .endfor
252 EXTDIR=         ${CXXINCLUDEDIR}/ext
253
254 .include <bsd.lib.mk>