re PR target/82015 (PowerPC should check if 2nd argument to __builtin_unpackv1ti...
[official-gcc.git] / libcilkrts / Makefile.am
blob2a0fcad4c896c01568d6d50dffd06aaa3ca11fd6
1 #  Copyright (C) 2011-2016, Intel Corporation
2 #  All rights reserved.
3 #  
4 #  Redistribution and use in source and binary forms, with or without
5 #  modification, are permitted provided that the following conditions
6 #  are met:
7 #  
8 #    * Redistributions of source code must retain the above copyright
9 #      notice, this list of conditions and the following disclaimer.
10 #    * Redistributions in binary form must reproduce the above copyright
11 #      notice, this list of conditions and the following disclaimer in
12 #      the documentation and/or other materials provided with the
13 #      distribution.
14 #    * Neither the name of Intel Corporation nor the names of its
15 #      contributors may be used to endorse or promote products derived
16 #      from this software without specific prior written permission.
17 #  
18 #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 #  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 #  HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 #  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 #  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
25 #  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 #  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 #  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
28 #  WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 #  POSSIBILITY OF SUCH DAMAGE.
30 #  
31 #  *********************************************************************
32 #  
33 #  PLEASE NOTE: This file is a downstream copy of a file mainitained in
34 #  a repository at cilkplus.org. Changes made to this file that are not
35 #  submitted through the contribution process detailed at
36 #  http://www.cilkplus.org/submit-cilk-contribution will be lost the next
37 #  time that a new version is released. Changes only submitted to the
38 #  GNU compiler collection or posted to the git repository at
39 #  https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
40 #  not tracked.
41 #  
42 #  We welcome your contributions to this open source project. Thank you
43 #  for your assistance in helping us improve Cilk Plus.
45 AUTOMAKE_OPTIONS = foreign
47 # Use when building GCC
48 ACLOCAL_AMFLAGS = -I .. -I ../config
50 # Compiler and linker flags.
51 GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime -I$(top_srcdir)/runtime/config/$(config_dir) -I$(top_srcdir)/runtime/sslib  -DIN_CILK_RUNTIME=1
52 # GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for
54 # Enable Intel Cilk Plus extension
55 GENERAL_FLAGS += -fcilkplus
57 #Always generate unwind tables
58 GENERAL_FLAGS += -funwind-tables
60 AM_CFLAGS = $(XCFLAGS) $(GENERAL_FLAGS) -std=c99
61 AM_CPPFLAGS = $(GENERAL_FLAGS)
62 AM_LDFLAGS = $(XLDFLAGS)
64 # May be used by toolexeclibdir.
65 gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
67 # Target list.
68 nodist_toolexeclib_HEADERS = libcilkrts.spec
69 toolexeclib_LTLIBRARIES = libcilkrts.la
71 libcilkrts_la_SOURCES =            \
72   runtime/config/$(config_dir)/cilk-abi-vla.c           \
73   runtime/config/$(config_dir)/os-unix-sysdep.c \
74   runtime/sslib/ignore_handler_s.c    \
75   runtime/sslib/safe_lib.h            \
76   runtime/sslib/safe_lib_errno.h      \
77   runtime/sslib/safe_str_constraint.c \
78   runtime/sslib/safe_str_constraint.h \
79   runtime/sslib/safe_str_lib.h        \
80   runtime/sslib/safe_types.h          \
81   runtime/sslib/safeclib_private.h    \
82   runtime/sslib/snprintf_s.h          \
83   runtime/sslib/snprintf_support.c    \
84   runtime/sslib/strcpy_s.c            \
85   runtime/sslib/strncpy_s.c           \
86   runtime/sslib/strnlen_s.c           \
87   runtime/bug.cpp                  \
88   runtime/cilk-abi.c               \
89   runtime/cilk-abi-cilk-for.cpp    \
90   runtime/cilk-abi-vla-internal.c  \
91   runtime/cilk_api.c               \
92   runtime/cilk_fiber.cpp           \
93   runtime/cilk_fiber-unix.cpp      \
94   runtime/cilk_malloc.c            \
95   runtime/c_reducers.c             \
96   runtime/except-gcc.cpp           \
97   runtime/frame_malloc.c           \
98   runtime/full_frame.c             \
99   runtime/global_state.cpp         \
100   runtime/jmpbuf.c                 \
101   runtime/local_state.c            \
102   runtime/metacall_impl.c          \
103   runtime/os_mutex-unix.c          \
104   runtime/os-unix.c                \
105   runtime/pedigrees.c              \
106   runtime/record-replay.cpp        \
107   runtime/reducer_impl.cpp         \
108   runtime/scheduler.c              \
109   runtime/signal_node.c            \
110   runtime/spin_mutex.c             \
111   runtime/stats.c                  \
112   runtime/sysdep-unix.c            \
113   runtime/worker_mutex.c
116 # Load the $(REVISION) value.
117 include include/internal/rev.mk
119 #libcilkrts_la_LDFLAGS  = -rpath '$(libdir)'
120 libcilkrts_la_LDFLAGS = -version-info 5:0:0
121 libcilkrts_la_LDFLAGS += @lt_cv_dlopen_libs@
122 libcilkrts_la_LDFLAGS += $(AM_LDFLAGS)
124 # If we're building on Linux, use the Linux version script
125 if LINUX_LINKER_SCRIPT
126     libcilkrts_la_LDFLAGS += -Wl,--version-script,$(srcdir)/runtime/linux-symbols.ver
127 endif
129 # If we're building on MacOS, use the Mac versioning
130 if MAC_LINKER_SCRIPT
131   libcilkrts_la_LDFLAGS += -Wl,-exported_symbols_list,$(srcdir)/runtime/mac-symbols.txt
132 endif
135 # Hack for Cygwin
136 libcilkrts_la_LDFLAGS += -no-undefined
138 # C/C++ header files for Cilk.
139 # cilkincludedir = $(includedir)/cilk
140 cilkincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include/cilk
141 nodist_cilkinclude_HEADERS =       \
142   include/cilk/cilk_api.h          \
143   include/cilk/cilk_api_linux.h    \
144   include/cilk/cilk.h              \
145   include/cilk/cilk_stub.h         \
146   include/cilk/cilk_undocumented.h \
147   include/cilk/common.h            \
148   include/cilk/holder.h            \
149   include/cilk/hyperobject_base.h  \
150   include/cilk/metaprogramming.h   \
151   include/cilk/reducer_file.h      \
152   include/cilk/reducer.h           \
153   include/cilk/reducer_list.h      \
154   include/cilk/reducer_max.h       \
155   include/cilk/reducer_min.h       \
156   include/cilk/reducer_min_max.h   \
157   include/cilk/reducer_opadd.h     \
158   include/cilk/reducer_opand.h     \
159   include/cilk/reducer_opmul.h     \
160   include/cilk/reducer_opor.h      \
161   include/cilk/reducer_opxor.h     \
162   include/cilk/reducer_ostream.h   \
163   include/cilk/reducer_string.h
166 # Work around what appears to be a GNU make bug handling MAKEFLAGS
167 # values defined in terms of make variables, as is the case for CC and
168 # friends when we are called from the top level Makefile.
169 AM_MAKEFLAGS = \
170        "AR_FLAGS=$(AR_FLAGS)" \
171        "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
172        "CFLAGS=$(CFLAGS)" \
173        "CXXFLAGS=$(CXXFLAGS)" \
174        "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
175        "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
176        "INSTALL=$(INSTALL)" \
177        "INSTALL_DATA=$(INSTALL_DATA)" \
178        "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
179        "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
180        "JC1FLAGS=$(JC1FLAGS)" \
181        "LDFLAGS=$(LDFLAGS)" \
182        "LIBCFLAGS=$(LIBCFLAGS)" \
183        "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
184        "MAKE=$(MAKE)" \
185        "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
186        "PICFLAG=$(PICFLAG)" \
187        "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
188        "SHELL=$(SHELL)" \
189        "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
190        "exec_prefix=$(exec_prefix)" \
191        "infodir=$(infodir)" \
192        "libdir=$(libdir)" \
193        "prefix=$(prefix)" \
194        "includedir=$(includedir)" \
195        "AR=$(AR)" \
196        "AS=$(AS)" \
197        "LD=$(LD)" \
198        "LIBCFLAGS=$(LIBCFLAGS)" \
199        "NM=$(NM)" \
200        "PICFLAG=$(PICFLAG)" \
201        "RANLIB=$(RANLIB)" \
202        "DESTDIR=$(DESTDIR)"
204 MAKEOVERRIDES=