1 # Makefile.am -- libhsail-rt library Makefile.
3 # Starting point copied from libcilkrts:
5 # Copyright (C) 2011, 2013, Intel Corporation
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
13 # * Redistributions of source code must retain the above copyright
14 # notice, this list of conditions and the following disclaimer.
15 # * Redistributions in binary form must reproduce the above copyright
16 # notice, this list of conditions and the following disclaimer in
17 # the documentation and/or other materials provided with the
19 # * Neither the name of Intel Corporation nor the names of its
20 # contributors may be used to endorse or promote products derived
21 # from this software without specific prior written permission.
24 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
31 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
34 # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 # POSSIBILITY OF SUCH DAMAGE.
37 # libhsail-rt modifications:
38 # Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
39 # for General Processor Tech.
40 # Use of this source code is governed by a BSD-style
41 # license that can be found in the LICENSE file.
43 # Process this file with autoreconf to produce Makefile.in.
45 AUTOMAKE_OPTIONS = foreign subdir-objects
47 gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
49 MAINT_CHARSET = latin1
51 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
53 ACLOCAL_AMFLAGS = -I .. -I ../config
55 WARN_CFLAGS = $(WARN_FLAGS) $(WERROR)
57 # -I/-D flags to pass when compiling.
58 AM_CPPFLAGS = -I$(srcdir)/rt -I$(srcdir)/include/internal
61 -I $(srcdir)/../include \
62 -I $(srcdir)/../libgcc \
63 -I $(MULTIBUILDTOP)../../gcc/include $(PTH_CFLAGS)
65 toolexeclib_LTLIBRARIES = libhsail-rt.la
81 libhsail_rt_la_SOURCES = $(runtime_files)
82 libhsail_rt_la_LDFLAGS = -rpath '$(libdir)'
84 # Work around what appears to be a GNU make bug handling MAKEFLAGS
85 # values defined in terms of make variables, as is the case for CC and
86 # friends when we are called from the top level Makefile.
88 "AR_FLAGS=$(AR_FLAGS)" \
89 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
91 "CXXFLAGS=$(CXXFLAGS)" \
92 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
93 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
94 "INSTALL=$(INSTALL)" \
95 "INSTALL_DATA=$(INSTALL_DATA)" \
96 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
97 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
98 "JC1FLAGS=$(JC1FLAGS)" \
99 "LDFLAGS=$(LDFLAGS)" \
100 "LIBCFLAGS=$(LIBCFLAGS)" \
101 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
103 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
104 "PICFLAG=$(PICFLAG)" \
105 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
107 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
108 "exec_prefix=$(exec_prefix)" \
109 "infodir=$(infodir)" \
112 "includedir=$(includedir)" \
116 "LIBCFLAGS=$(LIBCFLAGS)" \
118 "PICFLAG=$(PICFLAG)" \