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