Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

#	$NetBSD: Makefile,v 1.13 2019/05/06 23:20:51 christos Exp $

LIB=		c++
WARNS=		4
NOLINT=		# defined

.include <bsd.init.mk>

.PATH: ${LIBCXX_SRCDIR}/src

SRCS=	algorithm.cpp bind.cpp chrono.cpp condition_variable.cpp debug.cpp \
	exception.cpp future.cpp hash.cpp ios.cpp iostream.cpp locale.cpp \
	memory.cpp mutex.cpp new.cpp optional.cpp random.cpp regex.cpp \
	shared_mutex.cpp stdexcept.cpp \
	string.cpp strstream.cpp system_error.cpp thread.cpp \
	utility.cpp valarray.cpp
# typeinfo.cc: prefer libcxxrt's version

LIBCXXRT_SRCS+= \
	auxhelper.cc dynamic_cast.cc exception.cc guard.cc \
	stdexcept.cc terminate.cc typeinfo.cc libelftc_dem_gnu3.c
# cxa_atexit.c: Solaris-only
# memory.cc: already provided by libc++'s new.cpp

.for src in ${LIBCXXRT_SRCS}
rt_${src}: ${LIBCXXRT_SRCDIR}/src/${src}
	cp ${LIBCXXRT_SRCDIR}/src/${src} rt_${src}

SRCS+=		rt_${src}
DPSRCS+=	rt_${src}
CLEANFILES+=	rt_${src}
.endfor

.include <bsd.own.mk>

CPPFLAGS+=	-nostdinc++ -cxx-isystem ${LIBCXX_SRCDIR}/include -I${LIBCXXRT_SRCDIR}/src
CPPFLAGS+=	-DLIBCXXRT
CXXFLAGS+=	-std=c++11

CWARNFLAGS.gcc+=	-Wno-error

CWARNFLAGS.clang+=	-Wno-error=unused-variable -Wno-error=missing-noreturn
CWARNFLAGS.clang+=	-Wno-error=missing-prototypes -Wno-error=sometimes-uninitialized
CWARNFLAGS.clang+=	-Wno-error=missing-field-initializers -Wno-error=switch
CWARNFLAGS.clang+=	-Wno-error=implicit-exception-spec-mismatch

# with SSP and FORTIFY, on earm...
COPTS.rt_libelftc_dem_gnu3.c += ${${ACTIVE_CC} == "clang":? -Wno-error=builtin-memcpy-chk-size :}

.if ${MKSANITIZER} != "yes"
LDFLAGS+=	-Wl,-z,defs
.endif

.if !empty(MACHINE_ARCH:Marm*) || !empty(MACHINE_ARCH:Mearm*)
CWARNFLAGS+=		-Wno-atomic-alignment
.endif

.include <bsd.lib.mk>