PR target/52261
[official-gcc.git] / libitm / Makefile.am
blobe754ccc770469442ac6cbecc34eaacbe9ec87482
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 x86_sse.lo : XCFLAGS += -msse
71 endif
72 if ARCH_X86_AVX
73 x86_avx.lo : XCFLAGS += -mavx
74 endif
76 if ARCH_FUTEX
77 libitm_la_SOURCES += futex.cc
78 endif
80 # Automake Documentation:
81 # If your package has Texinfo files in many directories, you can use the
82 # variable TEXINFO_TEX to tell Automake where to find the canonical
83 # `texinfo.tex' for your package. The value of this variable should be
84 # the relative path from the current `Makefile.am' to `texinfo.tex'.
85 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 = libitm.texi
91 # AM_CONDITIONAL on configure option --generated-files-in-srcdir
92 if GENINSRC
93 STAMP_GENINSRC = stamp-geninsrc
94 else
95 STAMP_GENINSRC =
96 endif
98 # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
99 if BUILD_INFO
100 STAMP_BUILD_INFO = stamp-build-info
101 else
102 STAMP_BUILD_INFO =
103 endif
106 all-local: $(STAMP_GENINSRC)
108 stamp-geninsrc: libitm.info
109         cp -p $(top_builddir)/libitm.info $(srcdir)/libitm.info
110         @touch $@
112 libitm.info: $(STAMP_BUILD_INFO)
114 stamp-build-info: libitm.texi
115         $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libitm.info $(srcdir)/libitm.texi
116         @touch $@
119 CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) libitm.info
120 MAINTAINERCLEANFILES = $(srcdir)/libitm.info