xref: /freebsd/lib/libc++/Makefile (revision 3f0164abf32b9b761e0a2cb4bdca3a8b84f156d4)
1# $FreeBSD$
2
3LIBCXXRTDIR=	${.CURDIR}/../../contrib/libcxxrt
4HDRDIR=		${.CURDIR}/../../contrib/libc++/include
5SRCDIR=		${.CURDIR}/../../contrib/libc++/src
6CXXINCLUDEDIR=	${INCLUDEDIR}/c++/v${SHLIB_MAJOR}
7
8.PATH: ${SRCDIR}
9
10LIB=		c++
11SHLIB_MAJOR=	1
12SHLIB_LDSCRIPT=	libc++.ldscript
13
14SRCS+=		algorithm.cpp\
15		bind.cpp\
16		chrono.cpp\
17		condition_variable.cpp\
18		debug.cpp\
19		exception.cpp\
20		future.cpp\
21		hash.cpp\
22		ios.cpp\
23		iostream.cpp\
24		locale.cpp\
25		memory.cpp\
26		mutex.cpp\
27		new.cpp\
28		random.cpp\
29		regex.cpp\
30		stdexcept.cpp\
31		string.cpp\
32		strstream.cpp\
33		system_error.cpp\
34		thread.cpp\
35		typeinfo.cpp\
36		utility.cpp\
37		valarray.cpp
38
39CXXRT_SRCS+=	libelftc_dem_gnu3.c\
40		terminate.cc\
41		dynamic_cast.cc\
42		memory.cc\
43		auxhelper.cc\
44		exception.cc\
45		stdexcept.cc\
46		typeinfo.cc\
47		guard.cc
48
49.for _S in ${CXXRT_SRCS}
50STATICOBJS+=	cxxrt_${_S:R}.o
51cxxrt_${_S}:
52	ln -sf ${LIBCXXRTDIR}/${_S} ${.TARGET}
53.endfor
54
55WARNS=		0
56CFLAGS+=	-I${HDRDIR} -I${LIBCXXRTDIR} -nostdlib -DLIBCXXRT
57.if empty(CXXFLAGS:M-std=*)
58CXXFLAGS+=	-std=c++0x
59.endif
60
61DPADD=		${LIBCXXRT}
62LDADD=		-lcxxrt
63LDFLAGS+=	--verbose
64INCSGROUPS=	STD EXT
65
66STD_HEADERS=	__bit_reference\
67		__config\
68		__debug\
69		__functional_03\
70		__functional_base\
71		__functional_base_03\
72		__hash_table\
73		__locale\
74		__mutex_base\
75		__split_buffer\
76		__sso_allocator\
77		__std_stream\
78		__tree\
79		__tuple\
80		__tuple_03\
81		__undef_min_max\
82		algorithm\
83		array\
84		atomic\
85		bitset\
86		cassert\
87		ccomplex\
88		cctype\
89		cerrno\
90		cfenv\
91		cfloat\
92		chrono\
93		cinttypes\
94		ciso646\
95		climits\
96		clocale\
97		cmath\
98		codecvt\
99		complex\
100		complex.h\
101		condition_variable\
102		csetjmp\
103		csignal\
104		cstdarg\
105		cstdbool\
106		cstddef\
107		cstdint\
108		cstdio\
109		cstdlib\
110		cstring\
111		ctgmath\
112		ctime\
113		cwchar\
114		cwctype\
115		deque\
116		exception\
117		forward_list\
118		fstream\
119		functional\
120		future\
121		initializer_list\
122		iomanip\
123		ios\
124		iosfwd\
125		iostream\
126		istream\
127		iterator\
128		limits\
129		list\
130		locale\
131		map\
132		memory\
133		mutex\
134		new\
135		numeric\
136		ostream\
137		queue\
138		random\
139		ratio\
140		regex\
141		scoped_allocator\
142		set\
143		sstream\
144		stack\
145		stdexcept\
146		streambuf\
147		string\
148		strstream\
149		system_error\
150		tgmath.h\
151		thread\
152		tuple\
153		type_traits\
154		typeindex\
155		typeinfo\
156		unordered_map\
157		unordered_set\
158		utility\
159		valarray\
160		vector
161RT_HEADERS=	cxxabi.h\
162		unwind.h\
163		unwind-arm.h\
164		unwind-itanium.h
165
166.for hdr in ${STD_HEADERS}
167STD+=		${HDRDIR}/${hdr}
168.endfor
169.for hdr in ${RT_HEADERS}
170STD+=		${LIBCXXRTDIR}/${hdr}
171.endfor
172STDDIR=		${CXXINCLUDEDIR}
173
174EXT_HEADERS=	__hash\
175		hash_map\
176		hash_set
177
178.for hdr in ${EXT_HEADERS}
179EXT+=		${HDRDIR}/ext/${hdr}
180.endfor
181EXTDIR=		${CXXINCLUDEDIR}/ext
182
183.include <bsd.lib.mk>
184