summaryrefslogtreecommitdiff
path: root/lib/libcxxabi/Makefile
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2016-09-04 12:48:35 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2016-09-04 12:48:35 +0000
commitf9d08bf685d1f548cb3959a9871de918fe458665 (patch)
tree208f5992ced7761cca2e432851d7cf8af4ee0448 /lib/libcxxabi/Makefile
parent26e4f75f9bd0047e6ef6ed09da8591347eba01d8 (diff)
Add makefiles to compile libc++, libc++abi and libunwind.
Tweaks from pascal@ ok guenther@ kettenis@
Diffstat (limited to 'lib/libcxxabi/Makefile')
-rw-r--r--lib/libcxxabi/Makefile89
1 files changed, 89 insertions, 0 deletions
diff --git a/lib/libcxxabi/Makefile b/lib/libcxxabi/Makefile
new file mode 100644
index 00000000000..cff5841be9e
--- /dev/null
+++ b/lib/libcxxabi/Makefile
@@ -0,0 +1,89 @@
+# $OpenBSD: Makefile,v 1.1 2016/09/04 12:48:34 patrick Exp $
+
+HDRDIR= ${.CURDIR}/include
+SRCDIR= ${.CURDIR}/src
+SHDRDIR= ${.CURDIR}/../libcxx/include
+UHDRDIR= ${.CURDIR}/../libunwind/include
+CXXINCLUDEDIR= /usr/include/c++/v1
+
+.PATH: ${SRCDIR} ${.CURDIR}/../libunwind/src
+
+CXX=eg++
+
+LIB= c++abi
+
+SRCS+= abort_message.cpp\
+ cxa_aux_runtime.cpp\
+ cxa_default_handlers.cpp\
+ cxa_demangle.cpp\
+ cxa_exception.cpp\
+ cxa_exception_storage.cpp\
+ cxa_guard.cpp\
+ cxa_handlers.cpp\
+ cxa_new_delete.cpp\
+ cxa_personality.cpp\
+ cxa_thread_atexit.cpp\
+ cxa_unexpected.cpp\
+ cxa_vector.cpp\
+ cxa_virtual.cpp\
+ exception.cpp\
+ private_typeinfo.cpp\
+ stdexcept.cpp\
+ typeinfo.cpp\
+ Unwind-EHABI.cpp\
+ Unwind-sjlj.c\
+ UnwindLevel1-gcc-ext.c\
+ UnwindLevel1.c\
+ UnwindRegistersRestore.S\
+ UnwindRegistersSave.S\
+ libunwind.cpp
+
+CPPFLAGS+= -I${SHDRDIR} -I${HDRDIR} -I${UHDRDIR}
+CXXFLAGS+= -nostdlib -funwind-tables
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++11
+.endif
+
+STD_HEADERS= cxxabi.h \
+ __cxxabi_config.h
+
+.for hdr in ${STD_HEADERS}
+STD+= ${hdr} ${HDRDIR}/${hdr}
+.endfor
+STDDIR= ${CXXINCLUDEDIR}
+
+STD_UHEADERS= libunwind.h \
+ __libunwind_config.h \
+ unwind.h
+
+.for hdr in ${STD_UHEADERS}
+USTD+= ${hdr} ${UHDRDIR}/${hdr}
+.endfor
+USTDDIR= ${CXXINCLUDEDIR}
+
+MACHO_HEADERS=compact_unwind_encoding.h
+
+.for hdr in ${MACHO_HEADERS}
+MACHO+= ${hdr} ${UHDRDIR}/mach-o/${hdr}
+.endfor
+MACHODIR= ${CXXINCLUDEDIR}/mach-o
+
+includes:
+ @echo installing ${STD_HEADERS}
+ ${INSTALL} -d -m 755 ${DESTDIR}/${STDDIR};
+. for hdr src in ${STD}
+ cmp -s ${src} ${DESTDIR}/${STDDIR}/${hdr} || \
+ ${INSTALL} ${INSTALL_COPY} -m 444 ${src} ${DESTDIR}/${STDDIR}/${hdr};
+. endfor
+ ${INSTALL} -d -m 755 ${DESTDIR}/${USTDDIR};
+. for hdr src in ${USTD}
+ cmp -s ${src} ${DESTDIR}/${USTDDIR}/${hdr} || \
+ ${INSTALL} ${INSTALL_COPY} -m 444 ${src} ${DESTDIR}/${USTDDIR}/${hdr};
+. endfor
+ ${INSTALL} -d -m 755 ${DESTDIR}/${MACHODIR};
+. for hdr src in ${MACHO}
+ cmp -s ${src} ${DESTDIR}/${MACHODIR}/${hdr} || \
+ ${INSTALL} ${INSTALL_COPY} -m 444 ${src} ${DESTDIR}/${MACHODIR}/${hdr};
+. endfor
+
+.include <bsd.lib.mk>