1# Copyright (c) 2005-2020 Intel Corporation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15COMPILE_ONLY = -c -xMMD -errtags
16PREPROC_ONLY = -E -xMMD
17INCLUDE_KEY = -I
18DEFINE_KEY = -D
19OUTPUT_KEY = -o #
20OUTPUTOBJ_KEY = -o #
21PIC_KEY = -KPIC
22DYLIB_KEY = -G
23LIBDL = -ldl
24# WARNING_AS_ERROR_KEY = -errwarn=%all
25WARNING_AS_ERROR_KEY = Warning as error
26# Supported Solaris Studio* 12.2 and above, remove ',inlasmpnu' in the line below to build by compiler prior Solaris Studio* 12.2
27WARNING_SUPPRESS = -erroff=unassigned,attrskipunsup,badargtype2w,badbinaryopw,wbadasg,wvarhidemem,inlasmpnu
28tbb_strict=0
29
30CPLUS = CC
31CONLY = cc
32
33OPENMP_FLAG = -xopenmp
34LIB_LINK_FLAGS = -G -R . -M$(tbb_root)/build/suncc.map.pause
35LINK_FLAGS += -M$(tbb_root)/build/suncc.map.pause
36LIBS = -lpthread -lrt -R .
37C_FLAGS = $(CPLUS_FLAGS)
38
39#TODO: the $(stdlib) instead of hard-wiring STLPort
40ifeq ($(cfg), release)
41        CPLUS_FLAGS = -mt -xO2 -g -library=stlport4 -DUSE_PTHREAD $(WARNING_SUPPRESS)
42endif
43ifeq ($(cfg), debug)
44        CPLUS_FLAGS = -mt -DTBB_USE_DEBUG -g -library=stlport4 -DUSE_PTHREAD $(WARNING_SUPPRESS)
45endif
46
47ASM=
48ASM_FLAGS=
49
50TBB_ASM.OBJ=
51
52ifeq (intel64,$(arch))
53    CPLUS_FLAGS += -m64
54    ASM_FLAGS += -m64
55    LIB_LINK_FLAGS += -m64
56endif
57
58ifeq (ia32,$(arch))
59    CPLUS_FLAGS += -m32
60    LIB_LINK_FLAGS += -m32
61endif
62
63# TODO: verify whether -m64 implies V9 on relevant Sun Studio versions
64#       (those that handle gcc assembler syntax)
65ifeq (sparc,$(arch))
66    CPLUS_FLAGS    += -m64
67    LIB_LINK_FLAGS += -m64
68endif
69
70export TBB_CUSTOM_VARS_SH=export CXXFLAGS="-I$${TBBROOT}/include -library=stlport4 $(CXXFLAGS) -M$${TBBROOT}/build/suncc.map.pause"
71export TBB_CUSTOM_VARS_CSH=setenv CXXFLAGS "-I$${TBBROOT}/include -library=stlport4 $(CXXFLAGS) -M$${TBBROOT}/build/suncc.map.pause"
72
73#------------------------------------------------------------------------------
74# Setting assembler data.
75#------------------------------------------------------------------------------
76ASSEMBLY_SOURCE=$(arch)-fbe
77#------------------------------------------------------------------------------
78# End of setting assembler data.
79#------------------------------------------------------------------------------
80
81#------------------------------------------------------------------------------
82# Setting tbbmalloc data.
83#------------------------------------------------------------------------------
84M_INCLUDES = $(INCLUDES) -I$(MALLOC_ROOT) -I$(MALLOC_SOURCE_ROOT)
85M_CPLUS_FLAGS = $(CPLUS_FLAGS)
86#------------------------------------------------------------------------------
87# End of setting tbbmalloc data.
88#------------------------------------------------------------------------------
89