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