1# $FreeBSD$ 2 3GCCDIR= ${.CURDIR}/../../../contrib/gcc 4GCCLIB= ${.CURDIR}/../../../contrib/gcclibs 5SRCDIR= ${GCCLIB}/libgomp 6 7.PATH: ${SRCDIR} ${SRCDIR}/config/posix 8 9LIB= gomp 10SHLIB_MAJOR= 1 11 12SRCS= alloc.c barrier.c critical.c env.c \ 13 error.c iter.c loop.c ordered.c parallel.c sections.c \ 14 single.c team.c work.c lock.c mutex.c proc.c sem.c \ 15 bar.c time.c fortran.c 16SRCS+= gstdint.h libgomp_f.h omp.h omp_lib.h 17 18CFLAGS+= -DHAVE_CONFIG_H 19CFLAGS+= -I${.CURDIR} -I. -I${SRCDIR} -I${SRCDIR}/config/posix 20 21VERSION_MAP= ${SRCDIR}/libgomp.map 22 23# Target-specific OpenMP configuration 24.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == i386 || \ 25 ${MACHINE_ARCH} == powerpc 26OMP_LOCK_ALIGN = 4 27OMP_LOCK_KIND= 4 28OMP_LOCK_SIZE= 4 29OMP_NEST_LOCK_ALIGN= 4 30OMP_NEST_LOCK_KIND= 8 31OMP_NEST_LOCK_SIZE= 8 32.else 33OMP_LOCK_ALIGN = 8 34OMP_LOCK_KIND= 8 35OMP_LOCK_SIZE= 8 36OMP_NEST_LOCK_ALIGN= 8 37OMP_NEST_LOCK_KIND= 8 38OMP_NEST_LOCK_SIZE= 16 39.endif 40 41gstdint.h: 42 echo '#include <sys/types.h>' > ${.TARGET} 43 echo '#include <stdint.h>' >> ${.TARGET} 44CLEANFILES+= gstdint.h 45 46.for HFILE in libgomp_f.h omp.h omp_lib.h 47${HFILE}: ${SRCDIR}/${HFILE}.in 48 sed -e 's/@OMP_LOCK_ALIGN@/${OMP_LOCK_ALIGN}/g' \ 49 -e 's/@OMP_LOCK_KIND@/${OMP_LOCK_KIND}/g' \ 50 -e 's/@OMP_LOCK_SIZE@/${OMP_LOCK_SIZE}/g' \ 51 -e 's/@OMP_NEST_LOCK_ALIGN@/${OMP_NEST_LOCK_ALIGN}/g' \ 52 -e 's/@OMP_NEST_LOCK_KIND@/${OMP_NEST_LOCK_KIND}/g' \ 53 -e 's/@OMP_NEST_LOCK_SIZE@/${OMP_NEST_LOCK_SIZE}/g' \ 54 < ${.ALLSRC} > ${.TARGET} 55CLEANFILES+= ${HFILE} 56.endfor 57 58.include <bsd.lib.mk> 59