1 # $NetBSD: Makefile,v 1.7 2013/11/01 18:11:49 christos Exp $
8 .
include "Makefile.inc"
13 LIBDPLIBS
+= m
${.CURDIR
}/..
/..
/..
/..
/..
/lib
/libm
20 UNSUPPORTED_COMPILER.clang
= # defined
21 CWARNFLAGS.clang
+= -Wno-logical-op-parentheses \
22 -Wno-deprecated-writable-strings
-Wno-parentheses
24 .if exists
(${.CURDIR
}/arch
/${GCC_MACHINE_ARCH}/defs.mk
) && ${MKGCC} != "no"
25 .
include "${.CURDIR}/arch/${GCC_MACHINE_ARCH}/defs.mk"
28 # by itself, libstdc++ think it is version 6, so use the same number here
29 # as this is the exact same code, and will allow us to provide this library
30 # from the base system (here), or through the gcc45 package.
34 .
endif # defined(__MINIX)
39 .
include "${.CURDIR}/../libsupc++/Makefile.common"
41 SRCS
= ${LIBSUPCXXSRCS} ${LIBSTDCXXSRCS}
42 # affects profiling; can't switch it off just for profiling easily.
43 #CXXFLAGS+= ${G_SECTION_FLAGS}
44 #CXXFLAGS+= -ffunction-sections -fdata-sections
45 CXXFLAGS
+= -fno-implicit-templates
-fdiagnostics-show-location
=once
46 CPPFLAGS
+= -I
${DIST}/libstdc
++-v3
/include
47 CPPFLAGS
+= -I
${.CURDIR
}/arch
/${GCC_MACHINE_ARCH}
48 CPPFLAGS
+= -I
${.CURDIR
}/..
/libgomp
/arch
/${GCC_MACHINE_ARCH}
50 CONF
= ${DIST}/libstdc
++-v3
/config
52 #BUILDSYMLINKS+= ${CONF}/io/basic_file_stdio.cc basic_file.cc \
53 # ${CONF}/locale/generic/c_locale.cc c++locale.cc
55 GLIBCPP_INCLUDE_DIR
= ${DESTDIR}/usr
/include/g
++
57 COPTS.cp-demangle.c
= -Wno-stack-protector
58 COPTS.fstream-inst.
cc = -Wno-stack-protector
59 COPTS.locale-inst.
cc = -Wno-stack-protector
60 COPTS.misc-inst.
cc = -Wno-stack-protector
61 COPTS.ostream-inst.
cc = -Wno-stack-protector
62 COPTS.valarray-inst.
cc = -Wno-stack-protector
63 COPTS.wlocale-inst.
cc = -Wno-stack-protector
64 COPTS.concept-inst.
cc= -D_GLIBCPP_CONCEPT_CHECKS
-fimplicit-templates
65 CPPFLAGS.strstream.
cc= -I
$(GLIBCPP_INCLUDE_DIR
)/backward
-Wno-deprecated
69 # XXX also need this for some PCHs.
70 CPPFLAGS.atomic.
cc = -std
=gnu
++0x
71 CPPFLAGS.compatibility-c
++0x.
cc = -std
=gnu
++0x
72 CPPFLAGS.functexcept.
cc = -std
=gnu
++0x
73 CPPFLAGS.hash_c
++0x.
cc = -std
=gnu
++0x
74 CPPFLAGS.hashtable_c
++0x.
cc = -std
=gnu
++0x
75 CPPFLAGS.limits.
cc = -std
=gnu
++0x
76 CPPFLAGS.system_error.
cc = -std
=gnu
++0x
77 CPPFLAGS.fstream-inst.
cc = -std
=gnu
++0x
78 CPPFLAGS.string-inst.
cc = -std
=gnu
++0x
79 CPPFLAGS.wstring-inst.
cc = -std
=gnu
++0x
80 CPPFLAGS.mutex.
cc = -std
=gnu
++0x
81 CPPFLAGS.condition_variable.
cc = -std
=gnu
++0x
82 CPPFLAGS.chrono.
cc = -std
=gnu
++0x
83 CPPFLAGS.thread.
cc = -std
=gnu
++0x
84 CPPFLAGS.future.
cc = -std
=gnu
++0x
86 CPPFLAGS.cp-demangle.
cc += -DIN_GLIBCPP_V3
87 CPPFLAGS.concept-inst.
cc += -D_GLIBCXX_CONCEPT_CHECKS
88 CPPFLAGS.parallel_list.
cc += -D_GLIBCXX_PARALLEL
89 CPPFLAGS.parallel_settings.
cc += -D_GLIBCXX_PARALLEL
90 CPPFLAGS.compatibility-parallel_list.
cc += -D_GLIBCXX_PARALLEL
94 MKDEPFLAGS
+= -I
$(GLIBCPP_INCLUDE_DIR
)/backward
97 .
include <bsd.subdir.mk
>
98 .
include <bsd.
info.mk
>
100 GLIBCXX_SRCDIR
= ${DIST}/libstdc
++-v3
102 codecvt_members.
cc: ${GLIBCXX_SRCDIR}/${G_CCODECVT_CC}
105 ln
-s
${GLIBCXX_SRCDIR}/${G_CCODECVT_CC} ${.TARGET
}
107 collate_members.
cc: ${GLIBCXX_SRCDIR}/${G_CCOLLATE_CC}
110 ln
-s
${GLIBCXX_SRCDIR}/${G_CCOLLATE_CC} ${.TARGET
}
112 ctype_members.
cc: ${GLIBCXX_SRCDIR}/${G_CCTYPE_CC}
115 ln
-s
${GLIBCXX_SRCDIR}/${G_CCTYPE_CC} ${.TARGET
}
117 messages_members.
cc: ${GLIBCXX_SRCDIR}/${G_CMESSAGES_CC}
120 ln
-s
${GLIBCXX_SRCDIR}/${G_CMESSAGES_CC} ${.TARGET
}
122 monetary_members.
cc: ${GLIBCXX_SRCDIR}/${G_CMONEY_CC}
125 ln
-s
${GLIBCXX_SRCDIR}/${G_CMONEY_CC} ${.TARGET
}
127 numeric_members.
cc: ${GLIBCXX_SRCDIR}/${G_CNUMERIC_CC}
130 ln
-s
${GLIBCXX_SRCDIR}/${G_CNUMERIC_CC} ${.TARGET
}
132 time_members.
cc: ${GLIBCXX_SRCDIR}/${G_CTIME_CC}
135 ln
-s
${GLIBCXX_SRCDIR}/${G_CTIME_CC} ${.TARGET
}
137 atomicity.
cc: ${G_atomicity_file}
140 ln
-s
${G_atomicity_file} ${.TARGET
}
142 c
++locale.
cc: ${GLIBCXX_SRCDIR}/${G_CLOCALE_CC}
145 ln
-s
${GLIBCXX_SRCDIR}/${G_CLOCALE_CC} ${.TARGET
}
147 basic_file.
cc: ${GLIBCXX_SRCDIR}/${G_BASIC_FILE_CC}
150 ln
-s
${GLIBCXX_SRCDIR}/${G_BASIC_FILE_CC} ${.TARGET
}
153 CLEANFILES
+= atomicity.
cc basic_file.
cc c
++locale.
cc codecvt_members.
cc
154 CLEANFILES
+= collate_members.
cc ctype_members.
cc messages_members.
cc
155 CLEANFILES
+= monetary_members.
cc numeric_members.
cc time_members.
cc
158 unwind.h
: ${G_UNWIND_H}
161 ln
-s
${G_UNWIND_H} ${.TARGET
}
162 CLEANFILES
+= unwind.h
164 .PATH
: ${DIST}/libstdc
++-v3
/src \
165 ${DIST}/libstdc
++-v3
/libsupc
++ \
167 ${CONF}/locale
/generic \
168 ${.CURDIR
}/arch
/${GCC_MACHINE_ARCH}
170 ${OBJS}: ${.CURDIR
}/arch
/${GCC_MACHINE_ARCH}/defs.mk
172 .
include <bsd.prog.mk
> # do nothing