]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - lib/libc++/Makefile
- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
[FreeBSD/releng/10.3.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 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                 __tuple_03\
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                 dynarray\
182                 optional\
183                 string_view\
184                 type_traits\
185                 utility
186
187 .for hdr in ${EXP_HEADERS}
188 EXP+=           ${HDRDIR}/experimental/${hdr}
189 .endfor
190 EXPDIR=         ${CXXINCLUDEDIR}/experimental
191
192 EXT_HEADERS=    __hash\
193                 hash_map\
194                 hash_set
195
196 .for hdr in ${EXT_HEADERS}
197 EXT+=           ${HDRDIR}/ext/${hdr}
198 .endfor
199 EXTDIR=         ${CXXINCLUDEDIR}/ext
200
201 .if ${MK_GNUCXX} == "no" && ${COMPILER_TYPE} == "gcc"
202 CLEANFILES+=    libstdc++.so libstdc++.a
203
204 afterinstall:
205         ln -sf ${DESTDIR}${LIBDIR}/lib${LIB}.so \
206                 ${.OBJDIR}/libstdc++.so
207         ln -sf ${DESTDIR}${LIBDIR}/lib${LIB}.a \
208                 ${.OBJDIR}/libstdc++.a
209 .endif
210
211 .include <bsd.lib.mk>