1 ## Process this file with automake to produce Makefile.in
3 ACLOCAL_AMFLAGS = -I .. -I ../config
6 ## May be used by toolexeclibdir.
7 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
9 config_path = @config_path@
10 search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir)
12 fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
13 libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
15 vpath % $(strip $(search_path))
17 AM_CPPFLAGS = $(addprefix -I, $(search_path)) -I$(top_srcdir)/../include
18 AM_CFLAGS = $(XCFLAGS)
19 AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS)
21 toolexeclib_LTLIBRARIES = libgomp.la
22 nodist_toolexeclib_HEADERS = libgomp.spec
25 # Nvidia PTX OpenACC plugin.
26 libgomp_plugin_nvptx_version_info = -version-info $(libtool_VERSION)
27 toolexeclib_LTLIBRARIES += libgomp-plugin-nvptx.la
28 libgomp_plugin_nvptx_la_SOURCES = plugin-nvptx.c
29 libgomp_plugin_nvptx_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_NVPTX_CPPFLAGS)
30 libgomp_plugin_nvptx_la_LDFLAGS = $(libgomp_plugin_nvptx_version_info) \
32 libgomp_plugin_nvptx_la_LDFLAGS += $(PLUGIN_NVPTX_LDFLAGS)
33 libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS)
34 libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static
37 libgomp_plugin_host_nonshm_version_info = -version-info $(libtool_VERSION)
38 toolexeclib_LTLIBRARIES += libgomp-plugin-host_nonshm.la
39 libgomp_plugin_host_nonshm_la_SOURCES = oacc-host.c
40 libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN
41 libgomp_plugin_host_nonshm_la_LDFLAGS = \
42 $(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags)
43 libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static
45 if LIBGOMP_BUILD_VERSIONED_SHLIB
46 # -Wc is only a libtool option.
48 PREPROCESS = $(subst -Wc$(comma), , $(COMPILE)) -E
50 libgomp.ver: $(top_srcdir)/libgomp.map
51 $(EGREP) -v '#(#| |$$)' $< | \
52 $(PREPROCESS) -P -include config.h - > $@ || (rm -f $@ ; exit 1)
54 if LIBGOMP_BUILD_VERSIONED_SHLIB_GNU
55 libgomp_version_script = -Wl,--version-script,libgomp.ver
56 libgomp_version_dep = libgomp.ver
58 if LIBGOMP_BUILD_VERSIONED_SHLIB_SUN
59 libgomp_version_script = -Wl,-M,libgomp.ver-sun
60 libgomp_version_dep = libgomp.ver-sun
61 libgomp.ver-sun : libgomp.ver \
62 $(top_srcdir)/../contrib/make_sunver.pl \
63 $(libgomp_la_OBJECTS) $(libgomp_la_LIBADD)
64 perl $(top_srcdir)/../contrib/make_sunver.pl \
66 $(libgomp_la_OBJECTS:%.lo=.libs/%.o) \
67 `echo $(libgomp_la_LIBADD) | \
68 sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
69 > $@ || (rm -f $@ ; exit 1)
72 libgomp_version_script =
75 libgomp_version_info = -version-info $(libtool_VERSION)
76 libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
78 libgomp_la_DEPENDENCIES = $(libgomp_version_dep)
79 libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS)
81 libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
82 iter_ull.c loop.c loop_ull.c ordered.c parallel.c sections.c single.c \
83 task.c team.c work.c lock.c mutex.c proc.c sem.c bar.c ptrlock.c \
84 time.c fortran.c affinity.c target.c oacc-parallel.c splay-tree.c \
85 oacc-host.c oacc-init.c oacc-mem.c oacc-async.c \
86 oacc-plugin.c oacc-cuda.c libgomp-plugin.c
89 libgomp_la_SOURCES += openacc.f90
92 nodist_noinst_HEADERS = libgomp_f.h
93 nodist_libsubinclude_HEADERS = omp.h openacc.h ../include/gomp-constants.h
95 nodist_finclude_HEADERS = omp_lib.h omp_lib.f90 omp_lib.mod omp_lib_kinds.mod \
96 openacc_lib.h openacc.f90 openacc.mod openacc_kinds.mod
99 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
101 LINK = $(LIBTOOL) --tag CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
102 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@
104 omp_lib_kinds.mod: omp_lib.mod
106 openacc_kinds.mod: openacc.mod
109 $(FC) $(FCFLAGS) -fsyntax-only $<
110 fortran.lo: libgomp_f.h
111 fortran.o: libgomp_f.h
116 # Automake Documentation:
117 # If your package has Texinfo files in many directories, you can use the
118 # variable TEXINFO_TEX to tell Automake where to find the canonical
119 # `texinfo.tex' for your package. The value of this variable should be
120 # the relative path from the current `Makefile.am' to `texinfo.tex'.
121 TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
123 # Defines info, dvi, pdf and html targets
124 MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
125 info_TEXINFOS = libgomp.texi
127 # AM_CONDITIONAL on configure option --generated-files-in-srcdir
129 STAMP_GENINSRC = stamp-geninsrc
134 # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
136 STAMP_BUILD_INFO = stamp-build-info
142 all-local: $(STAMP_GENINSRC)
144 stamp-geninsrc: libgomp.info
145 cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
148 libgomp.info: $(STAMP_BUILD_INFO)
150 stamp-build-info: libgomp.texi
151 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi
155 CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) libgomp.info
156 MAINTAINERCLEANFILES = $(srcdir)/libgomp.info