xref: /dragonfly/gnu/lib/gcc80/libgomp/Makefile (revision ec21d9fb)
1CFLAGS+=	-I${.CURDIR}
2CFLAGS+=	-I${.OBJDIR}
3.include "../Makefile.inc"
4
5.PATH: ${GCCDIR}/libgomp
6#.PATH: ${GCCDIR}/libgomp/config/bsd
7.PATH: ${GCCDIR}/libgomp/config/posix
8
9CFLAGS+=	-DHAVE_CONFIG_H
10CFLAGS+=	-I${GCCDIR}/libgomp
11CFLAGS+=	-I${GCCDIR}/libgomp/config/posix
12CFLAGS+=	-I${GCCDIR}/libgcc
13VERSION_MAP=	libgomp.ver
14
15LIB=		gomp
16SHLIB_MAJOR=	1
17
18LDADD=		-lpthread
19DPADD=		${LIBPTHREAD}
20
21# From build/x86_64-portbld-dragonfly5.1/libgomp/Makefile
22libgomp_la_SOURCES = alloc.c atomic.c barrier.c critical.c env.c \
23	error.c icv.c icv-device.c iter.c iter_ull.c loop.c loop_ull.c \
24	ordered.c parallel.c sections.c single.c task.c team.c work.c \
25	lock.c proc.c sem.c bar.c time.c fortran.c \
26	affinity.c target.c splay-tree.c libgomp-plugin.c \
27	oacc-parallel.c oacc-host.c oacc-init.c oacc-mem.c \
28	oacc-async.c oacc-plugin.c oacc-cuda.c priority_queue.c
29
30SRCS=	${libgomp_la_SOURCES}
31
32# empty sources (Everything is in the header.)
33#SRCS+=	mutex.c ptrlock.c
34
35# On gcc80 this is from Makefile.x86-64, but there is only one platform now
36# Values recorded in <build-dir>/libgomp/config.log
37# x86-64 platform
38
39OMP_LOCK_25_ALIGN=	8
40OMP_LOCK_25_KIND=	8
41OMP_LOCK_25_SIZE=	8
42OMP_LOCK_ALIGN=		8
43OMP_LOCK_KIND=		8
44OMP_LOCK_SIZE=		8
45OMP_NEST_LOCK_25_ALIGN= 8
46OMP_NEST_LOCK_25_KIND=	8
47OMP_NEST_LOCK_25_SIZE=	16
48OMP_NEST_LOCK_ALIGN=	8
49OMP_NEST_LOCK_KIND=	8
50OMP_NEST_LOCK_SIZE=	24
51
52# tail of former Makefile.x86-64
53
54INCSGROUPS=	hd_libdata hd_lib
55hd_libdataDIR=	/usr/libdata/gcc${GCCSHORTVER}
56hd_libDIR=	/usr/lib/gcc${GCCSHORTVER}
57
58hd_libdata=	omp.h
59hd_lib=		libgomp.spec
60
61libgomp_f.h: ${GCCDIR}/libgomp/libgomp_f.h.in
62	sed -e 's/@OMP_LOCK_25_ALIGN@/${OMP_LOCK_25_ALIGN}/g' \
63	    -e 's/@OMP_LOCK_25_KIND@/${OMP_LOCK_25_KIND}/g' \
64	    -e 's/@OMP_LOCK_25_SIZE@/${OMP_LOCK_25_SIZE}/g' \
65	    -e 's/@OMP_LOCK_ALIGN@/${OMP_LOCK_ALIGN}/g' \
66	    -e 's/@OMP_LOCK_KIND@/${OMP_LOCK_KIND}/g' \
67	    -e 's/@OMP_LOCK_SIZE@/${OMP_LOCK_SIZE}/g' \
68	    -e 's/@OMP_NEST_LOCK_25_ALIGN@/${OMP_NEST_LOCK_25_ALIGN}/g' \
69	    -e 's/@OMP_NEST_LOCK_25_KIND@/${OMP_NEST_LOCK_25_KIND}/g' \
70	    -e 's/@OMP_NEST_LOCK_25_SIZE@/${OMP_NEST_LOCK_25_SIZE}/g' \
71	    -e 's/@OMP_NEST_LOCK_ALIGN@/${OMP_NEST_LOCK_ALIGN}/g' \
72	    -e 's/@OMP_NEST_LOCK_KIND@/${OMP_NEST_LOCK_KIND}/g' \
73	    -e 's/@OMP_NEST_LOCK_SIZE@/${OMP_NEST_LOCK_SIZE}/g' \
74	    < ${.ALLSRC} > ${.TARGET}
75
76omp.h: ${GCCDIR}/libgomp/omp.h.in
77	sed -e 's/@OMP_LOCK_SIZE@/${OMP_LOCK_SIZE}/g' \
78	    -e 's/@OMP_LOCK_ALIGN@/${OMP_LOCK_ALIGN}/g' \
79	    -e 's/@OMP_NEST_LOCK_SIZE@/${OMP_NEST_LOCK_SIZE}/g' \
80	    -e 's/@OMP_NEST_LOCK_ALIGN@/${OMP_NEST_LOCK_ALIGN}/g' \
81	    < ${.ALLSRC} > ${.TARGET}
82
83omp_lib.h: ${GCCDIR}/libgomp/omp_lib.h.in
84	sed -e 's/@OMP_LOCK_KIND@/${OMP_LOCK_KIND}/g' \
85	    -e 's/@OMP_NEST_LOCK_KIND@/${OMP_NEST_LOCK_KIND}/g' \
86	    < ${.ALLSRC} > ${.TARGET}
87
88libgomp.ver: ${GCCDIR}/libgomp/libgomp.map
89	sed -e '/#/d' < ${.ALLSRC} > ${.TARGET}
90
91libgomp.spec:
92	echo "*link_gomp: -lgomp %{static: }" > ${.TARGET}
93
94GEND_FILES=	libgomp_f.h omp.h omp_lib.h libgomp.ver libgomp.spec
95CLEANFILES=	${GEND_FILES}
96
97depend all:	${GEND_FILES}
98
99.include <bsd.lib.mk>
100