| 1 |
# Plugins for offload execution, Makefile.am fragment. |
| 2 |
# |
| 3 |
# Copyright (C) 2014-2025 Free Software Foundation, Inc. |
| 4 |
# |
| 5 |
# Contributed by Mentor Embedded. |
| 6 |
# |
| 7 |
# This file is part of the GNU Offloading and Multi Processing Library |
| 8 |
# (libgomp). |
| 9 |
# |
| 10 |
# Libgomp is free software; you can redistribute it and/or modify it |
| 11 |
# under the terms of the GNU General Public License as published by |
| 12 |
# the Free Software Foundation; either version 3, or (at your option) |
| 13 |
# any later version. |
| 14 |
# |
| 15 |
# Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY |
| 16 |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 17 |
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 18 |
# more details. |
| 19 |
# |
| 20 |
# Under Section 7 of GPL version 3, you are granted additional |
| 21 |
# permissions described in the GCC Runtime Library Exception, version |
| 22 |
# 3.1, as published by the Free Software Foundation. |
| 23 |
# |
| 24 |
# You should have received a copy of the GNU General Public License and |
| 25 |
# a copy of the GCC Runtime Library Exception along with this program; |
| 26 |
# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
| 27 |
# <http://www.gnu.org/licenses/>. |
| 28 |
|
| 29 |
libgomp_la_LIBADD += $(DL_LIBS) |
| 30 |
|
| 31 |
if PLUGIN_NVPTX |
| 32 |
# Nvidia PTX OpenACC plugin. |
| 33 |
libgomp_plugin_nvptx_version_info = -version-info $(libtool_VERSION) |
| 34 |
toolexeclib_LTLIBRARIES += libgomp-plugin-nvptx.la |
| 35 |
libgomp_plugin_nvptx_la_SOURCES = plugin/plugin-nvptx.c |
| 36 |
libgomp_plugin_nvptx_la_CPPFLAGS = $(AM_CPPFLAGS) |
| 37 |
libgomp_plugin_nvptx_la_LDFLAGS = $(libgomp_plugin_nvptx_version_info) \ |
| 38 |
$(lt_host_flags) |
| 39 |
libgomp_plugin_nvptx_la_LIBADD = libgomp.la |
| 40 |
libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static |
| 41 |
|
| 42 |
# libgomp nvptx plugin developer's section. |
| 43 |
# |
| 44 |
# Including the GCC-shipped 'include/cuda/cuda.h' (default) vs. system <cuda.h>: |
| 45 |
#libgomp_plugin_nvptx_la_CPPFLAGS += -DPLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H |
| 46 |
#libgomp_plugin_nvptx_la_CPPFLAGS += -I[CUDA]/include |
| 47 |
# |
| 48 |
# 'dlopen'ing the CUDA Driver library (default): |
| 49 |
libgomp_plugin_nvptx_la_LIBADD += $(DL_LIBS) |
| 50 |
# ... vs. linking it: |
| 51 |
#libgomp_plugin_nvptx_la_CPPFLAGS += -DPLUGIN_NVPTX_LINK_LIBCUDA |
| 52 |
#libgomp_plugin_nvptx_la_LDFLAGS += -L[CUDA]/lib64/stubs |
| 53 |
#libgomp_plugin_nvptx_la_LIBADD += -lcuda |
| 54 |
endif |
| 55 |
|
| 56 |
if PLUGIN_GCN |
| 57 |
# AMD GCN plugin |
| 58 |
libgomp_plugin_gcn_version_info = -version-info $(libtool_VERSION) |
| 59 |
toolexeclib_LTLIBRARIES += libgomp-plugin-gcn.la |
| 60 |
libgomp_plugin_gcn_la_SOURCES = plugin/plugin-gcn.c |
| 61 |
libgomp_plugin_gcn_la_CPPFLAGS = $(AM_CPPFLAGS) \ |
| 62 |
-D_GNU_SOURCE |
| 63 |
libgomp_plugin_gcn_la_LDFLAGS = $(libgomp_plugin_gcn_version_info) \ |
| 64 |
$(lt_host_flags) |
| 65 |
libgomp_plugin_gcn_la_LIBADD = libgomp.la |
| 66 |
libgomp_plugin_gcn_la_LIBTOOLFLAGS = --tag=disable-static |
| 67 |
|
| 68 |
libgomp_plugin_gcn_la_LIBADD += $(DL_LIBS) |
| 69 |
endif |