Home | History | Annotate | Line # | Download | only in libgomp
Makefile revision 1.22
      1 #	$NetBSD: Makefile,v 1.22 2019/02/03 12:11:11 mrg Exp $
      2 
      3 # build GCC's libgomp, so that -fopenmp works.
      4 
      5 # XXX
      6 NOLINT=	# defined
      7 
      8 .include <bsd.own.mk>
      9 
     10 .if !defined(NO_LIBGOMP)	# {
     11 
     12 DIST=	${GCCDIST}
     13 
     14 LIB=	gomp
     15 # XXX mknative-gcc should pull out libgomp_la_SOURCES
     16 SRCS= \
     17 	alloc.c atomic.c barrier.c critical.c env.c error.c \
     18 	icv.c icv-device.c iter.c iter_ull.c loop.c loop_ull.c ordered.c \
     19 	parallel.c sections.c single.c task.c team.c work.c lock.c mutex.c \
     20 	proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c target.c \
     21 	splay-tree.c libgomp-plugin.c oacc-parallel.c oacc-host.c oacc-init.c \
     22 	oacc-mem.c oacc-async.c oacc-plugin.c oacc-cuda.c priority_queue.c
     23 
     24 
     25 GOMP_MACHINE_ARCH?=	${MACHINE_ARCH:S/earmv5/earm/}
     26 ARCHDIR=		${.CURDIR}/arch/${GOMP_MACHINE_ARCH}
     27 
     28 CPPFLAGS+= \
     29 	-DHAVE_CONFIG_H \
     30 	-I${DIST}/libgomp \
     31 	-I${DIST}/libgomp/config/posix \
     32 	-I${DIST}/libgcc \
     33 	-I${DIST}/include \
     34 	-I${ARCHDIR}
     35 CFLAGS+=-pthread
     36 
     37 CWARNFLAGS.clang+=	-Wno-conversion
     38 
     39 SHLIB_MAJOR=	2
     40 SHLIB_MINOR=	0
     41 
     42 LDFLAGS+=	-Wl,--version-script,${DIST}/libgomp/libgomp.map
     43 
     44 .if ${GOMP_MACHINE_ARCH} == ${MACHINE_ARCH:S/earmv5/earm/}
     45 # This is where GCC looks for it.
     46 FILES=		libgomp.spec
     47 FILESDIR=	${LIBDIR}
     48 
     49 INCS=		omp.h openacc.h
     50 INCSDIR=	${GCC_INCSDIR}
     51 .endif
     52 
     53 .else			# } else {
     54 libinstall::
     55 .endif			# }
     56 
     57 .include <bsd.lib.mk>
     58 
     59 COPTS+=	-Wno-stack-protector -Wno-missing-prototypes
     60 COPTS.oacc-mem.c+= -Wno-pointer-arith
     61 
     62 COPTS.lock.c+=		-Wno-error=incompatible-pointer-types
     63 COPTS.target.c+=	-Wno-error=pointer-arith
     64 
     65 
     66 .PATH:	${ARCHDIR} ${DIST}/libgomp ${DIST}/libgomp/config/posix
     67