Home | History | Annotate | Line # | Download | only in libgomp
Makefile revision 1.17
      1 #	$NetBSD: Makefile,v 1.17 2018/02/02 20:57:53 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 
     52 
     53 GOMP_MACHINE_ARCH?=	${MACHINE_ARCH:S/earmv5/earm/}
     54 ARCHDIR=		${.CURDIR}/arch/${GOMP_MACHINE_ARCH}
     55 
     56 CPPFLAGS+= \
     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}
     63 CFLAGS+=-pthread
     64 
     65 CWARNFLAGS.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
     69 SHLIB_MAJOR=	1
     70 SHLIB_MINOR=	2
     71 
     72 LDFLAGS+=	-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.
     76 FILES=		libgomp.spec
     77 FILESDIR=	${LIBDIR}
     78 
     79 INCS=		omp.h openacc.h
     80 INCSDIR=	/usr/include/gcc-6
     81 .endif
     82 
     83 .else			# } else {
     84 libinstall::
     85 .endif			# }
     86 
     87 .include <bsd.lib.mk>
     88 
     89 COPTS+=	-Wno-stack-protector -Wno-missing-prototypes
     90 COPTS.oacc-mem.c+= -Wno-pointer-arith
     91 
     92 .PATH:	${ARCHDIR} ${DIST}/libgomp ${DIST}/libgomp/config/posix
     93