Makefile.am 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. abi_version = -fabi-version=4
  7. config_path = @config_path@
  8. search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir)
  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_CXXFLAGS = $(XCFLAGS) -std=gnu++0x -funwind-tables -fno-exceptions \
  15. -fno-rtti $(abi_version)
  16. AM_CCASFLAGS = $(XCFLAGS)
  17. AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) $(HWCAP_LDFLAGS)
  18. toolexeclib_LTLIBRARIES = libitm.la
  19. nodist_toolexeclib_HEADERS = libitm.spec
  20. if LIBITM_BUILD_VERSIONED_SHLIB
  21. if LIBITM_BUILD_VERSIONED_SHLIB_GNU
  22. libitm_version_script = -Wl,--version-script,$(top_srcdir)/libitm.map
  23. libitm_version_dep = $(top_srcdir)/libitm.map
  24. endif
  25. if LIBITM_BUILD_VERSIONED_SHLIB_SUN
  26. libitm_version_script = -Wl,-M,libitm.map-sun
  27. libitm_version_dep = libitm.map-sun
  28. libitm.map-sun : $(top_srcdir)/libitm.map \
  29. $(top_srcdir)/../contrib/make_sunver.pl \
  30. $(libitm_la_OBJECTS) $(libitm_la_LIBADD)
  31. perl $(top_srcdir)/../contrib/make_sunver.pl \
  32. $(top_srcdir)/libitm.map \
  33. $(libitm_la_OBJECTS:%.lo=.libs/%.o) \
  34. `echo $(libitm_la_LIBADD) | \
  35. sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
  36. > $@ || (rm -f $@ ; exit 1)
  37. endif
  38. else
  39. libitm_version_script =
  40. libitm_version_dep =
  41. endif
  42. libitm_version_info = -version-info $(libtool_VERSION)
  43. # Force link with C, not C++. For now, while we're using C++ we don't
  44. # want or need libstdc++.
  45. libitm_la_DEPENDENCIES = $(libitm_version_dep)
  46. libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS)
  47. libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
  48. libitm_la_SOURCES = \
  49. aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc barrier.cc beginend.cc \
  50. clone.cc eh_cpp.cc local.cc \
  51. query.cc retry.cc rwlock.cc useraction.cc util.cc \
  52. sjlj.S tls.cc method-serial.cc method-gl.cc method-ml.cc
  53. if ARCH_ARM
  54. libitm_la_SOURCES += hwcap.cc
  55. endif
  56. if ARCH_X86
  57. libitm_la_SOURCES += x86_sse.cc x86_avx.cc
  58. # Make sure -msse is appended at the end.
  59. x86_sse.lo : override CXXFLAGS += -msse
  60. endif
  61. if ARCH_X86_AVX
  62. # Make sure -mavx is appended at the end.
  63. x86_avx.lo : override CXXFLAGS += -mavx
  64. endif
  65. if ARCH_FUTEX
  66. libitm_la_SOURCES += futex.cc
  67. endif
  68. # Automake Documentation:
  69. # If your package has Texinfo files in many directories, you can use the
  70. # variable TEXINFO_TEX to tell Automake where to find the canonical
  71. # `texinfo.tex' for your package. The value of this variable should be
  72. # the relative path from the current `Makefile.am' to `texinfo.tex'.
  73. TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
  74. # Defines info, dvi, pdf and html targets
  75. MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
  76. info_TEXINFOS = libitm.texi
  77. # AM_CONDITIONAL on configure option --generated-files-in-srcdir
  78. if GENINSRC
  79. STAMP_GENINSRC = stamp-geninsrc
  80. else
  81. STAMP_GENINSRC =
  82. endif
  83. # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
  84. if BUILD_INFO
  85. STAMP_BUILD_INFO = stamp-build-info
  86. else
  87. STAMP_BUILD_INFO =
  88. endif
  89. all-local: $(STAMP_GENINSRC)
  90. stamp-geninsrc: libitm.info
  91. cp -p $(top_builddir)/libitm.info $(srcdir)/libitm.info
  92. @touch $@
  93. libitm.info: $(STAMP_BUILD_INFO)
  94. stamp-build-info: libitm.texi
  95. $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libitm.info $(srcdir)/libitm.texi
  96. @touch $@
  97. CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) libitm.info
  98. MAINTAINERCLEANFILES = $(srcdir)/libitm.info