Home | History | Annotate | Line # | Download | only in libgomp
Makefile revision 1.18
      1 #	$NetBSD: Makefile,v 1.18 2018/02/03 19:27:15 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 SRCS= \
     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 	priority_queue.c
     52 
     53 
     54 GOMP_MACHINE_ARCH?=	${MACHINE_ARCH:S/earmv5/earm/}
     55 ARCHDIR=		${.CURDIR}/arch/${GOMP_MACHINE_ARCH}
     56 
     57 CPPFLAGS+= \
     58 	-DHAVE_CONFIG_H \
     59 	-I${DIST}/libgomp \
     60 	-I${DIST}/libgomp/config/posix \
     61 	-I${DIST}/libgcc \
     62 	-I${DIST}/include \
     63 	-I${ARCHDIR}
     64 CFLAGS+=-pthread
     65 
     66 CWARNFLAGS.clang+=	-Wno-conversion
     67 
     68 # libgomp is 1.0 is in GCC 4.5, and 1.1 in 4.8 since it added more symbols
     69 # XXXGCC5 -- marking 1.2 for GCC 5.3 for now
     70 SHLIB_MAJOR=	1
     71 SHLIB_MINOR=	2
     72 
     73 LDFLAGS+=	-Wl,--version-script,${DIST}/libgomp/libgomp.map
     74 
     75 .if ${GOMP_MACHINE_ARCH} == ${MACHINE_ARCH:S/earmv5/earm/}
     76 # This is where GCC looks for it.
     77 FILES=		libgomp.spec
     78 FILESDIR=	${LIBDIR}
     79 
     80 INCS=		omp.h openacc.h
     81 INCSDIR=	/usr/include/gcc-6
     82 .endif
     83 
     84 .else			# } else {
     85 libinstall::
     86 .endif			# }
     87 
     88 .include <bsd.lib.mk>
     89 
     90 COPTS+=	-Wno-stack-protector -Wno-missing-prototypes
     91 COPTS.oacc-mem.c+= -Wno-pointer-arith
     92 
     93 .PATH:	${ARCHDIR} ${DIST}/libgomp ${DIST}/libgomp/config/posix
     94