xref: /dflybsd-src/gnu/lib/gcc47/libstdc++/Makefile (revision 3c5816455043c5788a6e96397194d0f9fdc622f8)
1b450dd39SJohn Marino.include "../Makefile.inc"
2b450dd39SJohn Marino.include "../libsupc++/Makefile.src"
3b450dd39SJohn Marino.include "Makefile.headers"
4b450dd39SJohn MarinoSRCDIR=	${GCCDIR}/libstdc++-v3
5b450dd39SJohn Marino.PATH:	${SRCDIR}
6b450dd39SJohn Marino.PATH:	${SRCDIR}/libsupc++
7b450dd39SJohn Marino.PATH:	${SRCDIR}/src
8b450dd39SJohn Marino.PATH:	${SRCDIR}/src/c++11
9b450dd39SJohn Marino.PATH:	${SRCDIR}/src/c++98
10b450dd39SJohn Marino.PATH:	${SRCDIR}/config/io
11b450dd39SJohn Marino.PATH:	${SRCDIR}/config/locale/dragonfly
12b450dd39SJohn Marino.PATH:	${SRCDIR}/config/locale/generic
13b450dd39SJohn Marino.PATH:	${GCCDIR}/gcc
14b450dd39SJohn Marino.PATH:	${GCCDIR}/libgcc
15b450dd39SJohn Marino
16b450dd39SJohn Marino# Vendor lists shared lib version as 6, not 9.
17b450dd39SJohn MarinoLIB=		stdc++
18b450dd39SJohn MarinoSHLIB_MAJOR=	9
19b450dd39SJohn Marino
20b450dd39SJohn MarinoCFLAGS+=	-DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
21b450dd39SJohn MarinoCFLAGS+=	-I${.CURDIR}
22b450dd39SJohn MarinoCFLAGS+=	-I${.OBJDIR}
23b450dd39SJohn MarinoCFLAGS+=	-I${GCCDIR}/gcc
24b450dd39SJohn MarinoCFLAGS+=	-I${GCCDIR}/libgcc
25b450dd39SJohn MarinoCFLAGS+=	-I${GCCDIR}/libiberty
26b450dd39SJohn MarinoCFLAGS+=	-I${GCCDIR}/libcpp/include
27b450dd39SJohn MarinoCXXFLAGS+=	-fno-implicit-templates
28b450dd39SJohn MarinoCXXFLAGS+=	-fdiagnostics-show-location=once
29b450dd39SJohn MarinoCXXFLAGS+=	-ffunction-sections -fdata-sections
30b450dd39SJohn MarinoCXXFLAGS+=	-Wno-deprecated
31b450dd39SJohn MarinoLDFLAGS+=	-Wl,--version-script=${.CURDIR}/libstdc++-symbols.ver
32b450dd39SJohn Marino
33b450dd39SJohn MarinoTHRLIB= 	${.OBJDIR}/../../../../lib/libpthread/libpthread.so
34b450dd39SJohn MarinoLDADD+= 	${THRLIB} -lm
35b450dd39SJohn MarinoDPADD+= 	${THRLIB} ${LIBM}
36b450dd39SJohn Marino
37b450dd39SJohn Marino# Slightly modified from libstdc++/src/c++98/Makefile.in
38b450dd39SJohn Marino# sources_1998 is the equivalent of libc_98convenience.a
39b450dd39SJohn Marino# sources_2011 is the equivalent of libc_11convenience.a
40b450dd39SJohn Marinohost_sources_1998 = \
41b450dd39SJohn Marino	atomicity.cc \
42b450dd39SJohn Marino	codecvt_members.cc \
43b450dd39SJohn Marino	collate_members.cc \
44b450dd39SJohn Marino	ctype_configure_char.cc \
45b450dd39SJohn Marino	ctype_members.cc \
46b450dd39SJohn Marino	messages_members.cc \
47b450dd39SJohn Marino	monetary_members.cc \
48b450dd39SJohn Marino	numeric_members.cc \
49b450dd39SJohn Marino	time_members.cc
50b450dd39SJohn Marino
51b450dd39SJohn Marinoparallel_sources_1998 =
52b450dd39SJohn Marino
53b450dd39SJohn Marinoinst_sources_1998 = \
54b450dd39SJohn Marino	allocator-inst.cc \
55b450dd39SJohn Marino	concept-inst.cc \
56b450dd39SJohn Marino	ext-inst.cc \
57b450dd39SJohn Marino	ios-inst.cc \
58b450dd39SJohn Marino	iostream-inst.cc \
59b450dd39SJohn Marino	istream-inst.cc \
60b450dd39SJohn Marino	locale-inst.cc \
61b450dd39SJohn Marino	misc-inst.cc \
62b450dd39SJohn Marino	ostream-inst.cc \
63b450dd39SJohn Marino	sstream-inst.cc \
64b450dd39SJohn Marino	streambuf-inst.cc \
65b450dd39SJohn Marino	wlocale-inst.cc
66b450dd39SJohn Marino
67b450dd39SJohn Marinohost_sources_extra_1998 = \
68b450dd39SJohn Marino	basic_file.cc \
69b450dd39SJohn Marino	c++locale.cc \
70b450dd39SJohn Marino	${inst_sources_1998} \
71b450dd39SJohn Marino	${parallel_sources_1998}
72b450dd39SJohn Marino
73b450dd39SJohn Marinosources_1998 = \
74b450dd39SJohn Marino	bitmap_allocator.cc \
75b450dd39SJohn Marino	pool_allocator.cc \
76b450dd39SJohn Marino	mt_allocator.cc \
77b450dd39SJohn Marino	codecvt.cc \
78b450dd39SJohn Marino	complex_io.cc \
79b450dd39SJohn Marino	ctype.cc \
80b450dd39SJohn Marino	globals_io.cc \
81b450dd39SJohn Marino	hash_tr1.cc \
82b450dd39SJohn Marino	hashtable_tr1.cc \
83b450dd39SJohn Marino	ios.cc \
84b450dd39SJohn Marino	ios_failure.cc \
85b450dd39SJohn Marino	ios_init.cc \
86b450dd39SJohn Marino	ios_locale.cc \
87b450dd39SJohn Marino	list.cc \
88b450dd39SJohn Marino	locale.cc \
89b450dd39SJohn Marino	locale_init.cc \
90b450dd39SJohn Marino	locale_facets.cc \
91b450dd39SJohn Marino	localename.cc \
92b450dd39SJohn Marino	math_stubs_float.cc \
93b450dd39SJohn Marino	math_stubs_long_double.cc \
94b450dd39SJohn Marino	stdexcept.cc \
95b450dd39SJohn Marino	strstream.cc \
96b450dd39SJohn Marino	tree-cxx.cc \
97b450dd39SJohn Marino	istream.cc \
98b450dd39SJohn Marino	streambuf.cc \
99b450dd39SJohn Marino	valarray.cc \
100b450dd39SJohn Marino	${host_sources_1998} \
101b450dd39SJohn Marino	${host_sources_extra_1998}
102b450dd39SJohn Marino
103b450dd39SJohn Marinoinst_sources_2011 = \
104b450dd39SJohn Marino	fstream-inst.cc \
105b450dd39SJohn Marino	string-inst.cc \
106b450dd39SJohn Marino	wstring-inst.cc
107b450dd39SJohn Marino
108b450dd39SJohn Marinosources_2011 = \
109b450dd39SJohn Marino	chrono.cc \
110b450dd39SJohn Marino	condition_variable.cc \
111b450dd39SJohn Marino	debug-cxx.cc \
112b450dd39SJohn Marino	functexcept.cc \
113b450dd39SJohn Marino	functional.cc \
114b450dd39SJohn Marino	future.cc \
115b450dd39SJohn Marino	hash_c++0x.cc \
116b450dd39SJohn Marino	hashtable_c++0x.cc \
117b450dd39SJohn Marino	limits.cc \
118b450dd39SJohn Marino	mutex.cc \
119b450dd39SJohn Marino	placeholders.cc \
120b450dd39SJohn Marino	regex.cc \
121b450dd39SJohn Marino	shared_ptr.cc \
122b450dd39SJohn Marino	system_error.cc \
123b450dd39SJohn Marino	thread.cc \
124b450dd39SJohn Marino	${inst_sources_2011}
125b450dd39SJohn Marino
126b450dd39SJohn Marinoldbl_compat_sources =
127b450dd39SJohn Marinoparallel_compat_sources =
128b450dd39SJohn Marino
129b450dd39SJohn Marinocxx98_sources = \
130b450dd39SJohn Marino	compatibility.cc \
131b450dd39SJohn Marino	compatibility-debug_list.cc \
132b450dd39SJohn Marino	compatibility-debug_list-2.cc \
133b450dd39SJohn Marino	compatibility-list.cc \
134b450dd39SJohn Marino	compatibility-list-2.cc \
135b450dd39SJohn Marino	${ldbl_compat_sources} \
136b450dd39SJohn Marino	${parallel_compat_sources}
137b450dd39SJohn Marino
138b450dd39SJohn Marinocxx11_sources = \
139b450dd39SJohn Marino	compatibility-c++0x.cc \
140b450dd39SJohn Marino	compatibility-atomic-c++0x.cc \
141b450dd39SJohn Marino	compatibility-thread-c++0x.cc
142b450dd39SJohn Marino
143b450dd39SJohn MarinoSRCS+=	${SUPCXX} \
144b450dd39SJohn Marino	cp-demangle.c \
145b450dd39SJohn Marino	${sources_1998} \
146b450dd39SJohn Marino	${sources_2011} \
147b450dd39SJohn Marino	${cxx98_sources} \
148b450dd39SJohn Marino	${cxx11_sources}
149b450dd39SJohn Marino
150b450dd39SJohn MarinoFLAGS_GROUPS=		gnu0x gnu11
151b450dd39SJohn Marinognu0x_FLAGS=		-std=gnu++0x
152b450dd39SJohn Marinognu11_FLAGS=		-std=gnu++11
153b450dd39SJohn Marinognu0x_FLAGS_FILES=	eh_ptr.cc \
154b450dd39SJohn Marino			eh_throw.cc \
155b450dd39SJohn Marino			guard.cc \
156b450dd39SJohn Marino			nested_exception.cc
157b450dd39SJohn Marinognu11_FLAGS_FILES=	chrono.cc \
158b450dd39SJohn Marino			condition_variable.cc \
159b450dd39SJohn Marino			debug-cxx.cc \
160b450dd39SJohn Marino			functexcept.cc \
161b450dd39SJohn Marino			functional.cc \
162b450dd39SJohn Marino			future.cc \
163b450dd39SJohn Marino			hash_c++0x.cc \
164b450dd39SJohn Marino			hashtable_c++0x.cc \
165b450dd39SJohn Marino			limits.cc \
166b450dd39SJohn Marino			mutex.cc \
167b450dd39SJohn Marino			placeholders.cc \
168b450dd39SJohn Marino			regex.cc \
169b450dd39SJohn Marino			shared_ptr.cc \
170b450dd39SJohn Marino			system_error.cc \
171b450dd39SJohn Marino			thread.cc \
172b450dd39SJohn Marino			fstream-inst.cc \
173b450dd39SJohn Marino			string-inst.cc \
174b450dd39SJohn Marino			wstring-inst.cc \
175b450dd39SJohn Marino			compatibility-c++0x.cc \
176b450dd39SJohn Marino			compatibility-atomic-c++0x.cc \
177b450dd39SJohn Marino			compatibility-thread-c++0x.cc
178b450dd39SJohn Marino
179b450dd39SJohn Marino#generated sources
180b450dd39SJohn MarinoSRCS+=	unwind.h \
18164ed7155SJohn Marino	unwind-cxx.h \
182*3c581645Szrj	cxxabi_forced.h
183b450dd39SJohn Marino
184b450dd39SJohn MarinoHD=	${INCLUDEDIR}/c++/${GCCPOINTVER}
185b450dd39SJohn Marino
186b450dd39SJohn Marino# These sections are detailed in Makefile.headers
187b450dd39SJohn Marino# parallel section is empty, skip it
188b450dd39SJohn Marino# make buildincludes, make installincludes before make depend
189b450dd39SJohn Marinoglibcxx_srcdir=	${SRCDIR}
190b450dd39SJohn MarinoHSECT=	std bits bits_sup backward ext ext_compat tr1 tr2 decimal \
191b450dd39SJohn Marino	c_base c_compatibility debug profile profile_impl host supc
192b450dd39SJohn MarinoPBSECT=	1 2 3 4 5 6 7
193b450dd39SJohn Marino
194b450dd39SJohn Marino.for i in ${HSECT}
195b450dd39SJohn MarinoINCSGROUPS+=	 	${i}_headers
196b450dd39SJohn Marino${i}_headersDIR= 	${HD}/${${i}_builddir}
197b450dd39SJohn Marino.endfor
198b450dd39SJohn Marino
199b450dd39SJohn MarinoPATHGROUP=
200b450dd39SJohn Marino.for i in ${PBSECT}
201b450dd39SJohn Marino.  for k in ${pb_headers${i}}
202b450dd39SJohn Marino.    if ${PATHGROUP:M${k:H:T}} == ""
203b450dd39SJohn MarinoPATHGROUP+=${k:H:T}
204b450dd39SJohn MarinoPATH_${k:H:T}=${k:H:T}
205b450dd39SJohn Marino.    endif
206b450dd39SJohn MarinoPBG_${k:H:T}+=${k}
207b450dd39SJohn Marino.  endfor
208b450dd39SJohn Marino.endfor
209b450dd39SJohn Marino
210b450dd39SJohn MarinoINCSGROUPS+=		PBG_pb_ds
211b450dd39SJohn MarinoPBG_pb_dsDIR=		${HD}/${pb_builddir}
212b450dd39SJohn Marino
213b450dd39SJohn MarinoINCSGROUPS+=		PBG_detail
214b450dd39SJohn MarinoPBG_detailDIR=		${HD}/${pb_builddir}/detail
215b450dd39SJohn Marino
216b450dd39SJohn Marino.for k in ${PATHGROUP:Npb_ds:Ndetail}
217b450dd39SJohn MarinoINCSGROUPS+=		PBG_${k}
218b450dd39SJohn MarinoPBG_${k}DIR=		${HD}/${pb_builddir}/detail/${PATH_${k}}
219b450dd39SJohn Marino.endfor
220b450dd39SJohn Marino
221b450dd39SJohn MarinoINCSGROUPS+=		host_headers_extra
222b450dd39SJohn Marinohost_headers_extraDIR=	${HD}/bits
223b450dd39SJohn Marinohost_headers_extraNAME_basic_file_stdio.h=	basic_file.h
224b450dd39SJohn Marinohost_headers_extraNAME_c_locale.h=		c++locale.h
225b450dd39SJohn Marinohost_headers_extraNAME_c_io_stdio.h+=		c++io.h
226b450dd39SJohn Marinohost_headers_extraNAME_new_allocator_base.h=	c++allocator.h
227b450dd39SJohn Marino
228b450dd39SJohn Marinoatomicity.cc: ${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h
229b450dd39SJohn Marino	cp ${.ALLSRC} ${.TARGET}
230b450dd39SJohn Marino
231b450dd39SJohn Marinoctype_configure_char.cc: ${SRCDIR}/config/os/bsd/dragonfly/${.TARGET}
232b450dd39SJohn Marino	cp ${.ALLSRC} ${.TARGET}
233b450dd39SJohn Marino
234b450dd39SJohn Marinobasic_file.cc: ${SRCDIR}/config/io/basic_file_stdio.cc
235b450dd39SJohn Marino	cp ${.ALLSRC} ${.TARGET}
236b450dd39SJohn Marino
237b450dd39SJohn Marinoc++locale.cc: ${SRCDIR}/config/locale/dragonfly/c_locale.cc
238b450dd39SJohn Marino	cp ${.ALLSRC} ${.TARGET}
239b450dd39SJohn Marino
240b450dd39SJohn Marinounwind.h: unwind-generic.h
241b450dd39SJohn Marino	cp ${.ALLSRC} ${.TARGET}
242b450dd39SJohn Marino
24364ed7155SJohn Marinounwind-cxx.h: ${SRCDIR}/libsupc++/unwind-cxx.h
24464ed7155SJohn Marino	cp ${.ALLSRC} ${.TARGET}
24564ed7155SJohn Marino
246eb73e8d8SJohn Marinocxxabi_forced.h: ${SRCDIR}/libsupc++/cxxabi_forced.h
247eb73e8d8SJohn Marino	cp ${.ALLSRC} ${.TARGET}
248eb73e8d8SJohn Marino
249b450dd39SJohn Marino# We can't add libiberty to the PATH because it will take the regex.o there
250b450dd39SJohn Marino# before compiling regex.cc into an object file.  Just recompile
251b450dd39SJohn Marino
252b450dd39SJohn Marinocp-demangle.c: ${GCCDIR}/libiberty/${.TARGET}
253b450dd39SJohn Marino	cp ${.ALLSRC} ${.TARGET}
254b450dd39SJohn Marino
2558a014a40SJohn Marino# debug.cc, tree.cc and vec.cc are also getting pre-empted by gcc/ versions
256b450dd39SJohn Marinodebug-cxx.cc: ${SRCDIR}/src/c++11/debug.cc
257b450dd39SJohn Marino	cp ${.ALLSRC} ${.TARGET}
258b450dd39SJohn Marino
259b450dd39SJohn Marinotree-cxx.cc: ${SRCDIR}/src/c++98/tree.cc
260b450dd39SJohn Marino	cp ${.ALLSRC} ${.TARGET}
261b450dd39SJohn Marino
2628a014a40SJohn Marinovec-cxx.cc: ${SRCDIR}/libsupc++/vec.cc
2638a014a40SJohn Marino	cp ${.ALLSRC} ${.TARGET}
2648a014a40SJohn Marino
265b450dd39SJohn MarinoCLEANFILES+=	atomicity.cc basic_file.cc c++locale.cc \
26664ed7155SJohn Marino		ctype_configure_char.cc unwind.h unwind-cxx.h \
2677992527cSJohn Marino		cp-demangle.c debug-cxx.cc tree-cxx.cc vec-cxx.cc \
268eb73e8d8SJohn Marino		cxxabi_forced.h c++config.h gthr.h gthr-default.h
26972036313SJohn Marino
270b450dd39SJohn Marino.include <bsd.lib.mk>
271