xref: /freebsd/lib/libomp/Makefile (revision b88cc53d4ddda4486683ee2121f131b10ed21c30)
1# $FreeBSD$
2
3SHLIB_NAME=	libomp.so
4
5OMPSRC=		${SRCTOP}/contrib/openmp/runtime/src
6ITTSRC=		${OMPSRC}/thirdparty/ittnotify
7.PATH:		${OMPSRC}
8.PATH:		${ITTSRC}
9
10SRCS+=		ittnotify_static.c
11SRCS+=		kmp_affinity.cpp
12SRCS+=		kmp_alloc.cpp
13SRCS+=		kmp_atomic.cpp
14SRCS+=		kmp_barrier.cpp
15SRCS+=		kmp_cancel.cpp
16SRCS+=		kmp_csupport.cpp
17SRCS+=		kmp_debug.cpp
18SRCS+=		kmp_dispatch.cpp
19SRCS+=		kmp_environment.cpp
20SRCS+=		kmp_error.cpp
21SRCS+=		kmp_ftn_cdecl.cpp
22SRCS+=		kmp_ftn_extra.cpp
23SRCS+=		kmp_global.cpp
24SRCS+=		kmp_gsupport.cpp
25SRCS+=		kmp_i18n.cpp
26SRCS+=		kmp_io.cpp
27SRCS+=		kmp_itt.cpp
28SRCS+=		kmp_lock.cpp
29SRCS+=		kmp_runtime.cpp
30SRCS+=		kmp_sched.cpp
31SRCS+=		kmp_settings.cpp
32SRCS+=		kmp_str.cpp
33SRCS+=		kmp_taskdeps.cpp
34SRCS+=		kmp_tasking.cpp
35SRCS+=		kmp_taskq.cpp
36SRCS+=		kmp_threadprivate.cpp
37SRCS+=		kmp_utility.cpp
38SRCS+=		kmp_version.cpp
39SRCS+=		kmp_wait_release.cpp
40SRCS+=		ompt-general.cpp
41SRCS+=		z_Linux_asm.S
42SRCS+=		z_Linux_util.cpp
43INCS+=		omp.h
44
45WARNS?=		1
46
47CFLAGS+=	-D__STDC_CONSTANT_MACROS
48CFLAGS+=	-D__STDC_FORMAT_MACROS
49CFLAGS+=	-D__STDC_LIMIT_MACROS
50CFLAGS+=	-I${.CURDIR}
51CFLAGS+=	-I${OMPSRC}
52CFLAGS+=	-I${ITTSRC}
53CFLAGS+=	-ffunction-sections
54CFLAGS+=	-fdata-sections
55CXXFLAGS+=	-fvisibility-inlines-hidden
56CXXFLAGS+=	-fno-exceptions
57CXXFLAGS+=	-fno-rtti
58CXXSTD=		c++11
59
60LDFLAGS+=	-Wl,--warn-shared-textrel
61LDFLAGS+=	-Wl,--gc-sections
62LDFLAGS+=	-Wl,-z,noexecstack
63LDFLAGS+=	-Wl,-fini=__kmp_internal_end_fini
64LDFLAGS+=	-Wl,-soname,libomp.so
65
66VERSION_MAP=	${OMPSRC}/exports_so.txt
67
68LIBADD+=	pthread
69LIBADD+=	m
70
71SYMLINKS+=	${SHLIB_NAME} ${LIBDIR}/libgomp.so
72
73.include <bsd.lib.mk>
74