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