Commit 405e2845 authored by Graham Inggs's avatar Graham Inggs

Imported Upstream version 3.0+r147

parent e2bf95b2
This diff is collapsed.
# Copyright 2005-2010 Intel Corporation. All Rights Reserved.
# Copyright 2005-2011 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks.
#
......@@ -48,7 +48,7 @@ test: tbb tbbmalloc
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test tbb_root=$(tbb_root)
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root)
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test tbb_root=$(tbb_root)
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root)
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root)
rml: mkdir
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.rml cfg=debug tbb_root=$(tbb_root)
......
# Copyright 2005-2011 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks.
#
# Threading Building Blocks is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# Threading Building Blocks is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Threading Building Blocks; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# As a special exception, you may use this file as part of a free software
# library without restriction. Specifically, if other files instantiate
# templates or use macros or inline functions from this file, or you compile
# this file and link it with other files to produce an executable, this
# file does not by itself cause the resulting executable to be covered by
# the GNU General Public License. This exception does not however
# invalidate any other reasons why the executable file might be covered by
# the GNU General Public License.
COMPILE_ONLY = -c -MMD
PREPROC_ONLY = -E -x c++
INCLUDE_KEY = -I
DEFINE_KEY = -D
OUTPUT_KEY = -o #
OUTPUTOBJ_KEY = -o #
PIC_KEY = -fPIC
WARNING_AS_ERROR_KEY = -Werror
WARNING_KEY = -Wall
DYLIB_KEY = -shared
LIBDL = -ldl
TBB_NOSTRICT = 1
CPLUS = g++
CONLY = gcc
LIB_LINK_FLAGS = -shared
LIBS = -lpthread -ldl
C_FLAGS = $(CPLUS_FLAGS) -x c
ifeq ($(cfg), release)
CPLUS_FLAGS = -O2 -DUSE_PTHREAD -pthread
endif
ifeq ($(cfg), debug)
CPLUS_FLAGS = -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD -pthread
endif
ASM=
ASM_FLAGS=
TBB_ASM.OBJ=
ifeq (powerpc,$(arch))
CPLUS_FLAGS += -maix64 -Wl,-G
LIB_LINK_FLAGS += -maix64 -Wl,-b64 -Wl,-brtl -Wl,-G
endif
#------------------------------------------------------------------------------
# Setting assembler data.
#------------------------------------------------------------------------------
ASSEMBLY_SOURCE=ibm_aix51
ifeq (powerpc,$(arch))
TBB_ASM.OBJ = atomic_support.o
endif
#------------------------------------------------------------------------------
# End of setting assembler data.
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Setting tbbmalloc data.
#------------------------------------------------------------------------------
M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions -fno-schedule-insns2
#------------------------------------------------------------------------------
# End of setting tbbmalloc data.
#------------------------------------------------------------------------------
# Copyright 2005-2011 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks.
#
# Threading Building Blocks is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# Threading Building Blocks is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Threading Building Blocks; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# As a special exception, you may use this file as part of a free software
# library without restriction. Specifically, if other files instantiate
# templates or use macros or inline functions from this file, or you compile
# this file and link it with other files to produce an executable, this
# file does not by itself cause the resulting executable to be covered by
# the GNU General Public License. This exception does not however
# invalidate any other reasons why the executable file might be covered by
# the GNU General Public License.
ifndef arch
arch:=$(shell uname -p)
export arch
endif
ifndef runtime
gcc_version:=$(shell gcc -v 2>&1 | grep 'gcc version' | sed -e 's/^gcc version //' | sed -e 's/ .*$$//')
os_version:=$(shell uname -r)
os_kernel_version:=$(shell uname -r | sed -e 's/-.*$$//')
export runtime:=cc$(gcc_version)_kernel$(os_kernel_version)
endif
native_compiler := gcc
export compiler ?= gcc
debugger ?= gdb
CMD=$(SHELL) -c
CWD=$(shell pwd)
RM?=rm -f
RD?=rmdir
MD?=mkdir -p
NUL= /dev/null
SLASH=/
MAKE_VERSIONS=sh $(tbb_root)/build/version_info_aix.sh $(CPLUS) $(CPLUS_FLAGS) $(INCLUDES) >version_string.tmp
MAKE_TBBVARS=sh $(tbb_root)/build/generate_tbbvars.sh
ifdef LIBPATH
export LIBPATH := .:$(LIBPATH)
else
export LIBPATH := .
endif
####### Build settings ########################################################
OBJ = o
DLL = so
TBB.LST =
TBB.DEF =
TBB.DLL = libtbb$(CPF_SUFFIX)$(DEBUG_SUFFIX).$(DLL)
TBB.LIB = $(TBB.DLL)
LINK_TBB.LIB = $(TBB.LIB)
MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
MALLOC.LIB = $(MALLOC.DLL)
TBB_NOSTRICT=1
TEST_LAUNCHER=sh $(tbb_root)/build/test_launcher.sh
# Copyright 2005-2010 Intel Corporation. All Rights Reserved.
# Copyright 2005-2011 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks.
#
......@@ -25,7 +25,7 @@
# the GNU General Public License.
COMPILE_ONLY = -c -MMD
PREPROC_ONLY = -E -x c
PREPROC_ONLY = -E -x c++
INCLUDE_KEY = -I
DEFINE_KEY = -D
OUTPUT_KEY = -o #
......@@ -54,6 +54,7 @@ ASM=
ASM_FLAGS=
TBB_ASM.OBJ=
MALLOC_ASM.OBJ=
ifeq (ia64,$(arch))
# Position-independent code (PIC) is a must on IA-64, even for regular (not shared) executables
......@@ -77,6 +78,7 @@ ASSEMBLY_SOURCE=$(arch)-gas
ifeq (ia64,$(arch))
ASM=as
TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
MALLOC_ASM.OBJ = atomic_support.o lock_byte.o pause.o
endif
#------------------------------------------------------------------------------
# End of setting assembler data.
......
# Copyright 2005-2010 Intel Corporation. All Rights Reserved.
# Copyright 2005-2011 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks.
#
......@@ -69,8 +69,9 @@ OBJ = o
DLL = so
LIBEXT=so
TBB.DEF =
TBB.DLL = libtbb$(DEBUG_SUFFIX).$(DLL)
TBB.LST =
TBB.DEF =
TBB.DLL = libtbb$(CPF_SUFFIX)$(DEBUG_SUFFIX).$(DLL)
TBB.LIB = $(TBB.DLL)
LINK_TBB.LIB = $(TBB.LIB)
......
# Copyright 2005-2010 Intel Corporation. All Rights Reserved.
# Copyright 2005-2011 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks.
#
......@@ -45,11 +45,11 @@ include $(tbb_root)/build/common_rules.inc
# Define rules for making the RML server shared library and client objects.
#--------------------------------------------------------------------------
# Object files that make up RML server
# Object files that make up RML server
RML_SERVER.OBJ = rml_server.$(OBJ)
# Object files that RML clients need
RML_TBB_CLIENT.OBJ = rml_tbb.$(OBJ) dynamic_link.$(OBJ)
RML_TBB_CLIENT.OBJ = rml_tbb.$(OBJ) dynamic_link_rml.$(OBJ)
RML_OMP_CLIENT.OBJ = rml_omp.$(OBJ) omp_dynamic_link.$(OBJ)
RML.OBJ = $(RML_SERVER.OBJ) $(RML_TBB_CLIENT.OBJ) $(RML_OMP_CLIENT.OBJ)
......@@ -60,12 +60,12 @@ ifeq (linux,$(tbb_os))
RML_ASM.OBJ = $(if $(findstring ia64,$(arch)),$(TBB_ASM.OBJ))
endif
RML_TBB_DEP= cache_aligned_allocator_rml.$(OBJ) dynamic_link_rml.$(OBJ) concurrent_vector_rml.$(OBJ) tbb_misc_rml.$(OBJ)
TBB_DEP_NON_RML_TEST= cache_aligned_allocator_rml.$(OBJ) dynamic_link_rml.$(OBJ) $(RML_ASM.OBJ) tbb_misc_rml.$(OBJ)
RML_TBB_DEP= cache_aligned_allocator_rml.$(OBJ) dynamic_link_rml.$(OBJ) concurrent_vector_rml.$(OBJ) tbb_misc_rml.$(OBJ) tbb_misc_ex_rml.$(OBJ)
TBB_DEP_NON_RML_TEST= cache_aligned_allocator_rml.$(OBJ) dynamic_link_rml.$(OBJ) $(RML_ASM.OBJ) tbb_misc_rml.$(OBJ) tbb_misc_ex_rml.$(OBJ)
TBB_DEP_RML_TEST= $(RML_ASM.OBJ)
ifeq ($(cfg),debug)
RML_TBB_DEP+= spin_mutex_rml.$(OBJ)
TBB_DEP_RML_TEST+= tbb_misc_rml.$(OBJ)
RML_TBB_DEP+= spin_mutex_rml.$(OBJ)
TBB_DEP_RML_TEST+= tbb_misc_rml.$(OBJ)
endif
LIBS += $(LIBDL)
......@@ -73,7 +73,7 @@ INCLUDES += $(INCLUDE_KEY)$(RML_ROOT)/include $(INCLUDE_KEY).
T_INCLUDES = $(INCLUDES) $(INCLUDE_KEY)$(tbb_root)/src/test $(INCLUDE_KEY)$(RML_SERVER_ROOT)
# Suppress superfluous warnings for RML compilation
R_CPLUS_FLAGS = $(subst DO_ITT_NOTIFY,DO_ITT_NOTIFY=0,$(CPLUS_FLAGS_NOSTRICT)) $(WARNING_SUPPRESS) \
R_CPLUS_FLAGS = $(subst DO_ITT_NOTIFY,DO_ITT_NOTIFY=0,$(CPLUS_FLAGS)) $(WARNING_SUPPRESS) \
$(DEFINE_KEY)TBB_USE_THREADING_TOOLS=0 $(DEFINE_KEY)__TBB_RML_STATIC=1 $(DEFINE_KEY)__TBB_NO_IMPLICIT_LINKAGE=1
%.$(OBJ): %.cpp
......@@ -84,14 +84,14 @@ tbb_misc_rml.$(OBJ): version_string.tmp
RML_TEST.OBJ = test_job_automaton.$(OBJ) test_thread_monitor.$(OBJ) test_rml_tbb.$(OBJ) test_rml_omp.$(OBJ) test_rml_mixed.$(OBJ)
$(RML_TBB_DEP): %_rml.$(OBJ): %.cpp
$(CPLUS) $(COMPILE_ONLY) $(OUTPUTOBJ_KEY)$@ $(R_CPLUS_FLAGS) $(PIC_KEY) $(INCLUDES) $<
$(CPLUS) $(COMPILE_ONLY) $(OUTPUTOBJ_KEY)$@ $(R_CPLUS_FLAGS) $(PIC_KEY) $(INCLUDES) $<