1 # $NetBSD: Makefile,v 1.3 2006/11/09 20:07:15 christos Exp $
10 .if exists
(${.CURDIR
}/arch
/${MACHINE_ARCH}/defs.mk
) && ${MKGCC} != "no"
11 .
include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
19 INCSDIR
= /usr
/include/g
++
21 .
include "${.CURDIR}/../libsupc++4/Makefile.common"
23 SRCS
= ${LIBMATHSRCS} ${LIBSUPCXXSRCS} ${LIBSTDCXXSRCS}
24 # affects profiling; can't switch it off just for profiling easily.
25 #CXXFLAGS+= ${G_SECTION_FLAGS}
26 #CXXFLAGS+= -ffunction-sections -fdata-sections
27 CXXFLAGS
+= -fno-implicit-templates
-fdiagnostics-show-location
=once
28 CPPFLAGS
+= -I
${DIST}/libstdc
++-v3
/include
30 CONF
= ${DIST}/libstdc
++-v3
/config
32 #BUILDSYMLINKS+= ${CONF}/io/basic_file_stdio.cc basic_file.cc \
33 # ${CONF}/locale/generic/c_locale.cc c++locale.cc
35 GLIBCPP_INCLUDE_DIR
= ${DESTDIR}/usr
/include/g
++
37 COPTS.cp-demangle.c
= -Wno-stack-protector
38 COPTS.fstream-inst.
cc = -Wno-stack-protector
39 COPTS.locale-inst.
cc = -Wno-stack-protector
40 COPTS.misc-inst.
cc = -Wno-stack-protector
41 COPTS.ostream-inst.
cc = -Wno-stack-protector
42 COPTS.valarray-inst.
cc = -Wno-stack-protector
43 COPTS.wlocale-inst.
cc = -Wno-stack-protector
44 COPTS.concept-inst.
cc= -D_GLIBCPP_CONCEPT_CHECKS
-fimplicit-templates
45 CPPFLAGS.strstream.
cc= -I
$(GLIBCPP_INCLUDE_DIR
)/backward
-Wno-deprecated
48 MKDEPFLAGS
+= -I
$(GLIBCPP_INCLUDE_DIR
)/backward
51 .
include <bsd.subdir.mk
>
52 .
include <bsd.
info.mk
>
54 GLIBCXX_SRCDIR
= ${DIST}/libstdc
++-v3
56 codecvt_members.
cc: ${GLIBCXX_SRCDIR}/${G_CCODECVT_CC}
59 ln
-s
${GLIBCXX_SRCDIR}/${G_CCODECVT_CC} ${.TARGET
}
61 collate_members.
cc: ${GLIBCXX_SRCDIR}/${G_CCOLLATE_CC}
64 ln
-s
${GLIBCXX_SRCDIR}/${G_CCOLLATE_CC} ${.TARGET
}
66 ctype_members.
cc: ${GLIBCXX_SRCDIR}/${G_CCTYPE_CC}
69 ln
-s
${GLIBCXX_SRCDIR}/${G_CCTYPE_CC} ${.TARGET
}
71 messages_members.
cc: ${GLIBCXX_SRCDIR}/${G_CMESSAGES_CC}
74 ln
-s
${GLIBCXX_SRCDIR}/${G_CMESSAGES_CC} ${.TARGET
}
76 monetary_members.
cc: ${GLIBCXX_SRCDIR}/${G_CMONEY_CC}
79 ln
-s
${GLIBCXX_SRCDIR}/${G_CMONEY_CC} ${.TARGET
}
81 numeric_members.
cc: ${GLIBCXX_SRCDIR}/${G_CNUMERIC_CC}
84 ln
-s
${GLIBCXX_SRCDIR}/${G_CNUMERIC_CC} ${.TARGET
}
86 time_members.
cc: ${GLIBCXX_SRCDIR}/${G_CTIME_CC}
89 ln
-s
${GLIBCXX_SRCDIR}/${G_CTIME_CC} ${.TARGET
}
91 atomicity.
cc: ${G_atomicity_file}
94 ln
-s
${G_atomicity_file} ${.TARGET
}
96 c
++locale.
cc: ${GLIBCXX_SRCDIR}/${G_CLOCALE_CC}
99 ln
-s
${GLIBCXX_SRCDIR}/${G_CLOCALE_CC} ${.TARGET
}
101 basic_file.
cc: ${GLIBCXX_SRCDIR}/${G_BASIC_FILE_CC}
104 ln
-s
${GLIBCXX_SRCDIR}/${G_BASIC_FILE_CC} ${.TARGET
}
107 CLEANFILES
+= atomicity.
cc basic_file.
cc c
++locale.
cc codecvt_members.
cc
108 CLEANFILES
+= collate_members.
cc ctype_members.
cc messages_members.
cc
109 CLEANFILES
+= monetary_members.
cc numeric_members.
cc time_members.
cc
112 unwind.h
: ${G_UNWIND_H}
115 ln
-s
${G_UNWIND_H} ${.TARGET
}
116 CLEANFILES
+= unwind.h
118 .PATH
: ${DIST}/libstdc
++-v3
/src \
119 ${DIST}/libstdc
++-v3
/libmath \
120 ${DIST}/libstdc
++-v3
/libsupc
++ \
122 ${CONF}/locale
/generic \
123 ${.CURDIR
}/arch
/${MACHINE_ARCH}
125 ${OBJS}: ${.CURDIR
}/arch
/${MACHINE_ARCH}/defs.mk
127 .
include <bsd.prog.mk
> # do nothing
130 .if
(${OBJECT_FMT} == "a.out")
131 LDADD
= ${DESTDIR}/usr
/lib
/c
++rt0.o
132 DPADD
= ${DESTDIR}/usr
/lib
/c
++rt0.o