2015-07-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / libitm / Makefile.am
blob1dce82d62f13c4c4fe156cd32199d820ce7fa691
1 ## Process this file with automake to produce Makefile.in
3 ACLOCAL_AMFLAGS = -I .. -I ../config
4 SUBDIRS = testsuite
6 ## May be used by toolexeclibdir.
7 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
9 abi_version = -fabi-version=4
11 config_path = @config_path@
12 search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir)
14 fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
15 libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
17 vpath % $(strip $(search_path))
19 AM_CPPFLAGS = $(addprefix -I, $(search_path))
20 AM_CFLAGS = $(XCFLAGS)
21 AM_CXXFLAGS = $(XCFLAGS) -std=gnu++0x -funwind-tables -fno-exceptions \
22         -fno-rtti $(abi_version)
23 AM_CCASFLAGS = $(XCFLAGS)
24 AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) $(HWCAP_LDFLAGS)
26 toolexeclib_LTLIBRARIES = libitm.la
27 nodist_toolexeclib_HEADERS = libitm.spec
29 if LIBITM_BUILD_VERSIONED_SHLIB
30 if LIBITM_BUILD_VERSIONED_SHLIB_GNU
31 libitm_version_script = -Wl,--version-script,$(top_srcdir)/libitm.map
32 libitm_version_dep = $(top_srcdir)/libitm.map
33 endif
34 if LIBITM_BUILD_VERSIONED_SHLIB_SUN
35 libitm_version_script = -Wl,-M,libitm.map-sun
36 libitm_version_dep = libitm.map-sun
37 libitm.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)
46 endif
47 else
48 libitm_version_script =
49 libitm_version_dep =
50 endif
51 libitm_version_info = -version-info $(libtool_VERSION)
53 # Force link with C, not C++.  For now, while we're using C++ we don't
54 # want or need libstdc++.
55 libitm_la_DEPENDENCIES = $(libitm_version_dep)
56 libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS)
57 libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
59 libitm_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
65 if ARCH_ARM
66 libitm_la_SOURCES += hwcap.cc
67 endif
68 if ARCH_X86
69 libitm_la_SOURCES += x86_sse.cc x86_avx.cc
70 # Make sure -msse is appended at the end.
71 x86_sse.lo : override CXXFLAGS += -msse
72 endif
73 if ARCH_X86_AVX
74 # Make sure -mavx is appended at the end.
75 x86_avx.lo : override CXXFLAGS += -mavx
76 endif
78 if ARCH_FUTEX
79 libitm_la_SOURCES += futex.cc
80 endif
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'.
87 TEXINFO_TEX   = ../gcc/doc/include/texinfo.tex
89 # Defines info, dvi, pdf and html targets
90 MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
91 info_TEXINFOS = libitm.texi
93 # AM_CONDITIONAL on configure option --generated-files-in-srcdir
94 if GENINSRC
95 STAMP_GENINSRC = stamp-geninsrc
96 else
97 STAMP_GENINSRC =
98 endif
100 # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
101 if BUILD_INFO
102 STAMP_BUILD_INFO = stamp-build-info
103 else
104 STAMP_BUILD_INFO =
105 endif
108 all-local: $(STAMP_GENINSRC)
110 stamp-geninsrc: libitm.info
111         cp -p $(top_builddir)/libitm.info $(srcdir)/libitm.info
112         @touch $@
114 libitm.info: $(STAMP_BUILD_INFO)
116 stamp-build-info: libitm.texi
117         $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libitm.info $(srcdir)/libitm.texi
118         @touch $@
121 CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) libitm.info
122 MAINTAINERCLEANFILES = $(srcdir)/libitm.info