Makefile revision 1.4
1# $NetBSD: Makefile,v 1.4 2015/09/23 03:39:30 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 42GOMP_MACHINE_ARCH?= ${MACHINE_ARCH:S/earmv5/earm/} 43ARCHDIR= ${.CURDIR}/arch/${GOMP_MACHINE_ARCH} 44 45CPPFLAGS+= \ 46 -DHAVE_CONFIG_H \ 47 -I${DIST}/libgomp \ 48 -I${DIST}/libgomp/config/posix \ 49 -I${DIST}/libgcc \ 50 -I${ARCHDIR} 51CFLAGS+=-pthread 52 53CWARNFLAGS.clang+= -Wno-conversion 54 55# libgomp is 1.0 is in GCC 4.5, and 1.1 in 4.8 since it added more symbols 56SHLIB_MAJOR= 1 57SHLIB_MINOR= 1 58 59LDFLAGS+= -Wl,--version-script,${DIST}/libgomp/libgomp.map 60 61.if ${GOMP_MACHINE_ARCH} == ${MACHINE_ARCH:S/earmv5/earm/} 62# This is where GCC looks for it. 63FILES= libgomp.spec 64FILESDIR= ${LIBDIR} 65 66INCS= omp.h 67INCSDIR= /usr/include/gcc-4.8 68.endif 69 70.else # } else { 71libinstall:: 72.endif # } 73 74.include <bsd.lib.mk> 75 76COPTS+= -Wno-stack-protector 77 78.PATH: ${ARCHDIR} ${DIST}/libgomp ${DIST}/libgomp/config/posix 79