]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - lib/libc++/Makefile
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / lib / libc++ / Makefile
1 # $FreeBSD$
2
3 .include <bsd.own.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 DPADD=          ${LIBCXXRT}
66 LDADD=          -lcxxrt
67 LDFLAGS+=       --verbose
68 INCSGROUPS=     STD EXP EXT
69
70 STD_HEADERS=    __bit_reference\
71                 __config\
72                 __debug\
73                 __functional_03\
74                 __functional_base\
75                 __functional_base_03\
76                 __hash_table\
77                 __locale\
78                 __mutex_base\
79                 __refstring\
80                 __split_buffer\
81                 __sso_allocator\
82                 __std_stream\
83                 __tree\
84                 __tuple\
85                 __tuple_03\
86                 __undef_min_max\
87                 algorithm\
88                 array\
89                 atomic\
90                 bitset\
91                 cassert\
92                 ccomplex\
93                 cctype\
94                 cerrno\
95                 cfenv\
96                 cfloat\
97                 chrono\
98                 cinttypes\
99                 ciso646\
100                 climits\
101                 clocale\
102                 cmath\
103                 codecvt\
104                 complex\
105                 complex.h\
106                 condition_variable\
107                 csetjmp\
108                 csignal\
109                 cstdarg\
110                 cstdbool\
111                 cstddef\
112                 cstdint\
113                 cstdio\
114                 cstdlib\
115                 cstring\
116                 ctgmath\
117                 ctime\
118                 cwchar\
119                 cwctype\
120                 deque\
121                 exception\
122                 forward_list\
123                 fstream\
124                 functional\
125                 future\
126                 initializer_list\
127                 iomanip\
128                 ios\
129                 iosfwd\
130                 iostream\
131                 istream\
132                 iterator\
133                 limits\
134                 list\
135                 locale\
136                 map\
137                 memory\
138                 mutex\
139                 new\
140                 numeric\
141                 ostream\
142                 queue\
143                 random\
144                 ratio\
145                 regex\
146                 scoped_allocator\
147                 set\
148                 shared_mutex\
149                 sstream\
150                 stack\
151                 stdexcept\
152                 streambuf\
153                 string\
154                 strstream\
155                 system_error\
156                 tgmath.h\
157                 thread\
158                 tuple\
159                 type_traits\
160                 typeindex\
161                 typeinfo\
162                 unordered_map\
163                 unordered_set\
164                 utility\
165                 valarray\
166                 vector
167 RT_HEADERS=     cxxabi.h\
168                 unwind.h\
169                 unwind-arm.h\
170                 unwind-itanium.h
171
172 .for hdr in ${STD_HEADERS}
173 STD+=           ${HDRDIR}/${hdr}
174 INCSLINKS+=     ${CXXINCLUDEDIR}/${hdr} ${CXXINCLUDEDIR}/tr1/${hdr}
175 .endfor
176 .for hdr in ${RT_HEADERS}
177 STD+=           ${LIBCXXRTDIR}/${hdr}
178 .endfor
179 STDDIR=         ${CXXINCLUDEDIR}
180
181 EXP_HEADERS=    __config\
182                 dynarray\
183                 optional\
184                 string_view\
185                 type_traits\
186                 utility
187
188 .for hdr in ${EXP_HEADERS}
189 EXP+=           ${HDRDIR}/experimental/${hdr}
190 .endfor
191 EXPDIR=         ${CXXINCLUDEDIR}/experimental
192
193 EXT_HEADERS=    __hash\
194                 hash_map\
195                 hash_set
196
197 .for hdr in ${EXT_HEADERS}
198 EXT+=           ${HDRDIR}/ext/${hdr}
199 .endfor
200 EXTDIR=         ${CXXINCLUDEDIR}/ext
201
202 .if ${MK_GNUCXX} == "no" && ${COMPILER_TYPE} == "gcc"
203 CLEANFILES+=    libstdc++.so libstdc++.a
204
205 afterinstall:
206         ln -sf ${DESTDIR}${LIBDIR}/lib${LIB}.so \
207                 ${.OBJDIR}/libstdc++.so
208         ln -sf ${DESTDIR}${LIBDIR}/lib${LIB}.a \
209                 ${.OBJDIR}/libstdc++.a
210 .endif
211
212 .include <bsd.lib.mk>