Makefile revision 1.6
1#	$NetBSD: Makefile,v 1.6 2017/07/23 01:11:58 mrg Exp $
2
3# build GCC's libgomp, so that -fopenmp works.
4
5# XXX
6NOLINT=	# defined
7
8.include <bsd.own.mk>
9
10.if !defined(NO_LIBGOMP)	# {
11
12DIST=	${GCCDIST}
13
14LIB=	gomp
15SRCS= \
16	alloc.c \
17	barrier.c \
18	critical.c \
19	env.c \
20	error.c \
21	iter.c \
22	iter_ull.c \
23	loop.c \
24	loop_ull.c \
25	ordered.c \
26	parallel.c \
27	sections.c \
28	single.c \
29	task.c \
30	team.c \
31	work.c \
32	lock.c \
33	mutex.c \
34	proc.c \
35	sem.c \
36	bar.c \
37	ptrlock.c \
38	time.c \
39	fortran.c \
40	affinity.c \
41	target.c \
42	splay-tree.c \
43	libgomp-plugin.c \
44	oacc-parallel.c \
45	oacc-host.c \
46	oacc-init.c \
47	oacc-mem.c \
48	oacc-async.c \
49	oacc-plugin.c \
50	oacc-cuda.c
51
52
53GOMP_MACHINE_ARCH?=	${MACHINE_ARCH:S/earmv5/earm/}
54ARCHDIR=		${.CURDIR}/arch/${GOMP_MACHINE_ARCH}
55
56CPPFLAGS+= \
57	-DHAVE_CONFIG_H \
58	-I${DIST}/libgomp \
59	-I${DIST}/libgomp/config/posix \
60	-I${DIST}/libgcc \
61	-I${DIST}/include \
62	-I${ARCHDIR}
63CFLAGS+=-pthread
64
65CWARNFLAGS.clang+=	-Wno-conversion
66
67# libgomp is 1.0 is in GCC 4.5, and 1.1 in 4.8 since it added more symbols
68# XXXGCC5 -- marking 1.2 for GCC 5.3 for now
69SHLIB_MAJOR=	1
70SHLIB_MINOR=	2
71
72LDFLAGS+=	-Wl,--version-script,${DIST}/libgomp/libgomp.map
73
74.if ${GOMP_MACHINE_ARCH} == ${MACHINE_ARCH:S/earmv5/earm/}
75# This is where GCC looks for it.
76FILES=		libgomp.spec
77FILESDIR=	${LIBDIR}
78
79INCS=		omp.h openacc.h
80INCSDIR=	/usr/include/gcc-5
81.endif
82
83.else			# } else {
84libinstall::
85.endif			# }
86
87.include <bsd.lib.mk>
88
89COPTS+=	-Wno-stack-protector -Wno-missing-prototypes
90COPTS.oacc-mem.c+= -Wno-pointer-arith
91
92.PATH:	${ARCHDIR} ${DIST}/libgomp ${DIST}/libgomp/config/posix
93