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