Makefile.am 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ## Process this file with automake to produce Makefile.in
  2. ACLOCAL_AMFLAGS = -I .. -I ../config
  3. SUBDIRS = testsuite
  4. ## May be used by toolexeclibdir.
  5. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
  6. config_path = @config_path@
  7. search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) \
  8. $(top_srcdir)/../include
  9. fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
  10. libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
  11. vpath % $(strip $(search_path))
  12. AM_CPPFLAGS = $(addprefix -I, $(search_path))
  13. AM_CFLAGS = $(XCFLAGS)
  14. AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS)
  15. toolexeclib_LTLIBRARIES = libgomp.la
  16. nodist_toolexeclib_HEADERS = libgomp.spec
  17. if LIBGOMP_BUILD_VERSIONED_SHLIB
  18. # -Wc is only a libtool option.
  19. comma = ,
  20. PREPROCESS = $(subst -Wc$(comma), , $(COMPILE)) -E
  21. libgomp.ver: $(top_srcdir)/libgomp.map
  22. $(EGREP) -v '#(#| |$$)' $< | \
  23. $(PREPROCESS) -P -include config.h - > $@ || (rm -f $@ ; exit 1)
  24. if LIBGOMP_BUILD_VERSIONED_SHLIB_GNU
  25. libgomp_version_script = -Wl,--version-script,libgomp.ver
  26. libgomp_version_dep = libgomp.ver
  27. endif
  28. if LIBGOMP_BUILD_VERSIONED_SHLIB_SUN
  29. libgomp_version_script = -Wl,-M,libgomp.ver-sun
  30. libgomp_version_dep = libgomp.ver-sun
  31. libgomp.ver-sun : libgomp.ver \
  32. $(top_srcdir)/../contrib/make_sunver.pl \
  33. $(libgomp_la_OBJECTS) $(libgomp_la_LIBADD)
  34. perl $(top_srcdir)/../contrib/make_sunver.pl \
  35. libgomp.ver \
  36. $(libgomp_la_OBJECTS:%.lo=.libs/%.o) \
  37. `echo $(libgomp_la_LIBADD) | \
  38. sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
  39. > $@ || (rm -f $@ ; exit 1)
  40. endif
  41. else
  42. libgomp_version_script =
  43. libgomp_version_dep =
  44. endif
  45. libgomp_version_info = -version-info $(libtool_VERSION)
  46. libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
  47. $(lt_host_flags)
  48. libgomp_la_DEPENDENCIES = $(libgomp_version_dep)
  49. libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS)
  50. libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
  51. iter_ull.c loop.c loop_ull.c ordered.c parallel.c sections.c single.c \
  52. task.c team.c work.c lock.c mutex.c proc.c sem.c bar.c ptrlock.c \
  53. time.c fortran.c affinity.c target.c splay-tree.c libgomp-plugin.c \
  54. oacc-parallel.c oacc-host.c oacc-init.c oacc-mem.c oacc-async.c \
  55. oacc-plugin.c oacc-cuda.c
  56. include $(top_srcdir)/plugin/Makefrag.am
  57. if USE_FORTRAN
  58. libgomp_la_SOURCES += openacc.f90
  59. endif
  60. nodist_noinst_HEADERS = libgomp_f.h
  61. nodist_libsubinclude_HEADERS = omp.h openacc.h
  62. if USE_FORTRAN
  63. nodist_finclude_HEADERS = omp_lib.h omp_lib.f90 omp_lib.mod omp_lib_kinds.mod \
  64. openacc_lib.h openacc.f90 openacc.mod openacc_kinds.mod
  65. endif
  66. LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
  67. LINK = $(LIBTOOL) --tag CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
  68. $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@
  69. omp_lib_kinds.mod: omp_lib.mod
  70. :
  71. openacc_kinds.mod: openacc.mod
  72. :
  73. openacc.mod: openacc.lo
  74. :
  75. %.mod: %.f90
  76. $(FC) $(FCFLAGS) -fsyntax-only $<
  77. fortran.lo: libgomp_f.h
  78. fortran.o: libgomp_f.h
  79. env.lo: libgomp_f.h
  80. env.o: libgomp_f.h
  81. # Automake Documentation:
  82. # If your package has Texinfo files in many directories, you can use the
  83. # variable TEXINFO_TEX to tell Automake where to find the canonical
  84. # `texinfo.tex' for your package. The value of this variable should be
  85. # the relative path from the current `Makefile.am' to `texinfo.tex'.
  86. TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
  87. # Defines info, dvi, pdf and html targets
  88. MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
  89. info_TEXINFOS = libgomp.texi
  90. # AM_CONDITIONAL on configure option --generated-files-in-srcdir
  91. if GENINSRC
  92. STAMP_GENINSRC = stamp-geninsrc
  93. else
  94. STAMP_GENINSRC =
  95. endif
  96. # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
  97. if BUILD_INFO
  98. STAMP_BUILD_INFO = stamp-build-info
  99. else
  100. STAMP_BUILD_INFO =
  101. endif
  102. all-local: $(STAMP_GENINSRC)
  103. stamp-geninsrc: libgomp.info
  104. cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
  105. @touch $@
  106. libgomp.info: $(STAMP_BUILD_INFO)
  107. stamp-build-info: libgomp.texi
  108. $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi
  109. @touch $@
  110. CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) libgomp.info
  111. MAINTAINERCLEANFILES = $(srcdir)/libgomp.info