1# Makefile.am -- libhsail-rt library Makefile. 2 3# Starting point copied from libcilkrts: 4# @copyright 5# Copyright (C) 2011, 2013, Intel Corporation 6# All rights reserved. 7# 8# @copyright 9# Redistribution and use in source and binary forms, with or without 10# modification, are permitted provided that the following conditions 11# are met: 12# 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 18# distribution. 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. 22# 23# @copyright 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. 36 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. 42 43# Process this file with autoreconf to produce Makefile.in. 44 45AUTOMAKE_OPTIONS = foreign subdir-objects 46 47gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) 48 49MAINT_CHARSET = latin1 50 51mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs 52 53ACLOCAL_AMFLAGS = -I .. -I ../config 54 55WARN_CFLAGS = $(WARN_FLAGS) $(WERROR) 56 57# -I/-D flags to pass when compiling. 58AM_CPPFLAGS = -I$(srcdir)/rt -I$(srcdir)/include/internal 59 60AM_CFLAGS = \ 61 -I $(srcdir)/../include \ 62 -I $(srcdir)/../libgcc \ 63 -I $(MULTIBUILDTOP)../../gcc/include $(PTH_CFLAGS) 64 65toolexeclib_LTLIBRARIES = libhsail-rt.la 66 67runtime_files = \ 68 rt/arithmetic.c \ 69 rt/atomics.c \ 70 rt/bitstring.c \ 71 rt/fbarrier.c \ 72 rt/fp16.c \ 73 rt/misc.c \ 74 rt/multimedia.c \ 75 rt/queue.c \ 76 rt/sat_arithmetic.c \ 77 rt/segment.c \ 78 rt/workitems.c \ 79 rt/fibers.c 80 81libhsail_rt_la_SOURCES = $(runtime_files) 82libhsail_rt_la_LDFLAGS = -rpath '$(libdir)' 83 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. 87AM_MAKEFLAGS = \ 88 "AR_FLAGS=$(AR_FLAGS)" \ 89 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ 90 "CFLAGS=$(CFLAGS)" \ 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)" \ 102 "MAKE=$(MAKE)" \ 103 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ 104 "PICFLAG=$(PICFLAG)" \ 105 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ 106 "SHELL=$(SHELL)" \ 107 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ 108 "exec_prefix=$(exec_prefix)" \ 109 "infodir=$(infodir)" \ 110 "libdir=$(libdir)" \ 111 "prefix=$(prefix)" \ 112 "includedir=$(includedir)" \ 113 "AR=$(AR)" \ 114 "AS=$(AS)" \ 115 "LD=$(LD)" \ 116 "LIBCFLAGS=$(LIBCFLAGS)" \ 117 "NM=$(NM)" \ 118 "PICFLAG=$(PICFLAG)" \ 119 "RANLIB=$(RANLIB)" \ 120 "DESTDIR=$(DESTDIR)" 121 122MAKEOVERRIDES= 123