xref: /freebsd/lib/libc++/Makefile (revision ab00ac327a66a53edaac95b536b209db3ae2cd9f)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5PACKAGE=	clibs
6_LIBCXXRTDIR=	${SRCTOP}/contrib/libcxxrt
7HDRDIR=		${SRCTOP}/contrib/libc++/include
8SRCDIR=		${SRCTOP}/contrib/libc++/src
9CXXINCLUDEDIR=	${INCLUDEDIR}/c++/v${SHLIB_MAJOR}
10.if ${MACHINE_CPUARCH} == "arm"
11STATIC_CXXFLAGS+= -mlong-calls
12.endif
13
14.PATH: ${SRCDIR}
15
16LIB=		c++
17SHLIB_MAJOR=	1
18SHLIB_LDSCRIPT=	libc++.ldscript
19
20SRCS+=		algorithm.cpp
21SRCS+=		any.cpp
22SRCS+=		bind.cpp
23SRCS+=		chrono.cpp
24SRCS+=		condition_variable.cpp
25SRCS+=		debug.cpp
26SRCS+=		exception.cpp
27SRCS+=		future.cpp
28SRCS+=		hash.cpp
29SRCS+=		ios.cpp
30SRCS+=		iostream.cpp
31SRCS+=		locale.cpp
32SRCS+=		memory.cpp
33SRCS+=		mutex.cpp
34SRCS+=		new.cpp
35SRCS+=		optional.cpp
36SRCS+=		random.cpp
37SRCS+=		regex.cpp
38SRCS+=		shared_mutex.cpp
39SRCS+=		stdexcept.cpp
40SRCS+=		string.cpp
41SRCS+=		strstream.cpp
42SRCS+=		system_error.cpp
43SRCS+=		thread.cpp
44SRCS+=		typeinfo.cpp
45SRCS+=		utility.cpp
46SRCS+=		valarray.cpp
47SRCS+=		variant.cpp
48
49CXXRT_SRCS+=	auxhelper.cc
50CXXRT_SRCS+=	dynamic_cast.cc
51CXXRT_SRCS+=	exception.cc
52CXXRT_SRCS+=	guard.cc
53CXXRT_SRCS+=	libelftc_dem_gnu3.c
54CXXRT_SRCS+=	memory.cc
55CXXRT_SRCS+=	stdexcept.cc
56CXXRT_SRCS+=	terminate.cc
57CXXRT_SRCS+=	typeinfo.cc
58
59.for _S in ${CXXRT_SRCS}
60CLEANFILES+=	cxxrt_${_S}
61STATICOBJS+=	cxxrt_${_S:R}.o
62cxxrt_${_S}: ${_LIBCXXRTDIR}/${_S} .NOMETA
63	ln -sf ${.ALLSRC} ${.TARGET}
64.endfor
65
66WARNS=		0
67CFLAGS+=	-isystem ${HDRDIR} -isystem ${_LIBCXXRTDIR} -nostdinc++ -nostdlib -D_LIBCPP_BUILDING_LIBRARY -DLIBCXXRT
68.if empty(CXXFLAGS:M-std=*)
69CXXFLAGS+=	-std=c++11
70.endif
71
72LIBADD+=	cxxrt
73INCSGROUPS=	STD EXP EXT
74
75STD_HEADERS+=	__bit_reference
76STD_HEADERS+=	__bsd_locale_defaults.h
77STD_HEADERS+=	__bsd_locale_fallbacks.h
78STD_HEADERS+=	__config
79STD_HEADERS+=	__debug
80STD_HEADERS+=	__functional_03
81STD_HEADERS+=	__functional_base
82STD_HEADERS+=	__functional_base_03
83STD_HEADERS+=	__hash_table
84STD_HEADERS+=	__libcpp_version
85STD_HEADERS+=	__locale
86STD_HEADERS+=	__mutex_base
87STD_HEADERS+=	__nullptr
88STD_HEADERS+=	__refstring
89STD_HEADERS+=	__split_buffer
90STD_HEADERS+=	__sso_allocator
91STD_HEADERS+=	__std_stream
92STD_HEADERS+=	__string
93STD_HEADERS+=	__threading_support
94STD_HEADERS+=	__tree
95STD_HEADERS+=	__tuple
96STD_HEADERS+=	__undef_min_max
97STD_HEADERS+=	algorithm
98STD_HEADERS+=	any
99STD_HEADERS+=	array
100STD_HEADERS+=	atomic
101STD_HEADERS+=	bitset
102STD_HEADERS+=	cassert
103STD_HEADERS+=	ccomplex
104STD_HEADERS+=	cctype
105STD_HEADERS+=	cerrno
106STD_HEADERS+=	cfenv
107STD_HEADERS+=	cfloat
108STD_HEADERS+=	chrono
109STD_HEADERS+=	cinttypes
110STD_HEADERS+=	ciso646
111STD_HEADERS+=	climits
112STD_HEADERS+=	clocale
113STD_HEADERS+=	cmath
114STD_HEADERS+=	codecvt
115STD_HEADERS+=	complex
116STD_HEADERS+=	complex.h
117STD_HEADERS+=	condition_variable
118STD_HEADERS+=	csetjmp
119STD_HEADERS+=	csignal
120STD_HEADERS+=	cstdarg
121STD_HEADERS+=	cstdbool
122STD_HEADERS+=	cstddef
123STD_HEADERS+=	cstdint
124STD_HEADERS+=	cstdio
125STD_HEADERS+=	cstdlib
126STD_HEADERS+=	cstring
127STD_HEADERS+=	ctgmath
128STD_HEADERS+=	ctime
129STD_HEADERS+=	ctype.h
130STD_HEADERS+=	cwchar
131STD_HEADERS+=	cwctype
132STD_HEADERS+=	deque
133STD_HEADERS+=	errno.h
134STD_HEADERS+=	exception
135STD_HEADERS+=	float.h
136STD_HEADERS+=	forward_list
137STD_HEADERS+=	fstream
138STD_HEADERS+=	functional
139STD_HEADERS+=	future
140STD_HEADERS+=	initializer_list
141STD_HEADERS+=	inttypes.h
142STD_HEADERS+=	iomanip
143STD_HEADERS+=	ios
144STD_HEADERS+=	iosfwd
145STD_HEADERS+=	iostream
146STD_HEADERS+=	istream
147STD_HEADERS+=	iterator
148STD_HEADERS+=	limits
149STD_HEADERS+=	limits.h
150STD_HEADERS+=	list
151STD_HEADERS+=	locale
152STD_HEADERS+=	locale.h
153STD_HEADERS+=	map
154STD_HEADERS+=	math.h
155STD_HEADERS+=	memory
156STD_HEADERS+=	mutex
157STD_HEADERS+=	new
158STD_HEADERS+=	numeric
159STD_HEADERS+=	optional
160STD_HEADERS+=	ostream
161STD_HEADERS+=	queue
162STD_HEADERS+=	random
163STD_HEADERS+=	ratio
164STD_HEADERS+=	regex
165STD_HEADERS+=	scoped_allocator
166STD_HEADERS+=	set
167STD_HEADERS+=	setjmp.h
168STD_HEADERS+=	shared_mutex
169STD_HEADERS+=	sstream
170STD_HEADERS+=	stack
171STD_HEADERS+=	stdbool.h
172STD_HEADERS+=	stddef.h
173STD_HEADERS+=	stdexcept
174STD_HEADERS+=	stdint.h
175STD_HEADERS+=	stdio.h
176STD_HEADERS+=	stdlib.h
177STD_HEADERS+=	streambuf
178STD_HEADERS+=	string
179STD_HEADERS+=	string.h
180STD_HEADERS+=	string_view
181STD_HEADERS+=	strstream
182STD_HEADERS+=	system_error
183STD_HEADERS+=	tgmath.h
184STD_HEADERS+=	thread
185STD_HEADERS+=	tuple
186STD_HEADERS+=	type_traits
187STD_HEADERS+=	typeindex
188STD_HEADERS+=	typeinfo
189STD_HEADERS+=	unordered_map
190STD_HEADERS+=	unordered_set
191STD_HEADERS+=	utility
192STD_HEADERS+=	valarray
193STD_HEADERS+=	variant
194STD_HEADERS+=	vector
195STD_HEADERS+=	wchar.h
196STD_HEADERS+=	wctype.h
197
198RT_HEADERS+=	cxxabi.h
199RT_HEADERS+=	unwind-arm.h
200RT_HEADERS+=	unwind-itanium.h
201RT_HEADERS+=	unwind.h
202
203.for hdr in ${STD_HEADERS}
204STD+=		${HDRDIR}/${hdr}
205INCSLINKS+=	../${hdr} ${CXXINCLUDEDIR}/tr1/${hdr}
206.endfor
207.for hdr in ${RT_HEADERS}
208STD+=		${_LIBCXXRTDIR}/${hdr}
209.endfor
210STDDIR=		${CXXINCLUDEDIR}
211
212EXP_HEADERS+=	__config
213EXP_HEADERS+=	__memory
214EXP_HEADERS+=	algorithm
215EXP_HEADERS+=	any
216EXP_HEADERS+=	chrono
217EXP_HEADERS+=	deque
218EXP_HEADERS+=	dynarray
219EXP_HEADERS+=	filesystem
220EXP_HEADERS+=	forward_list
221EXP_HEADERS+=	functional
222EXP_HEADERS+=	iterator
223EXP_HEADERS+=	list
224EXP_HEADERS+=	map
225EXP_HEADERS+=	memory_resource
226EXP_HEADERS+=	numeric
227EXP_HEADERS+=	optional
228EXP_HEADERS+=	propagate_const
229EXP_HEADERS+=	ratio
230EXP_HEADERS+=	regex
231EXP_HEADERS+=	set
232EXP_HEADERS+=	string
233EXP_HEADERS+=	string_view
234EXP_HEADERS+=	system_error
235EXP_HEADERS+=	tuple
236EXP_HEADERS+=	type_traits
237EXP_HEADERS+=	unordered_map
238EXP_HEADERS+=	unordered_set
239EXP_HEADERS+=	utility
240EXP_HEADERS+=	vector
241
242.for hdr in ${EXP_HEADERS}
243EXP+=		${HDRDIR}/experimental/${hdr}
244.endfor
245EXPDIR=		${CXXINCLUDEDIR}/experimental
246
247EXT_HEADERS+=	__hash
248EXT_HEADERS+=	hash_map
249EXT_HEADERS+=	hash_set
250
251.for hdr in ${EXT_HEADERS}
252EXT+=		${HDRDIR}/ext/${hdr}
253.endfor
254EXTDIR=		${CXXINCLUDEDIR}/ext
255
256.include <bsd.lib.mk>
257