Blame Makerules/Target.LINUX.GNU.MIPS64

Packit Service 3470d1
# BEGIN_ICS_COPYRIGHT8 ****************************************
Packit Service 3470d1
# 
Packit Service 3470d1
# Copyright (c) 2015, Intel Corporation
Packit Service 3470d1
# 
Packit Service 3470d1
# Redistribution and use in source and binary forms, with or without
Packit Service 3470d1
# modification, are permitted provided that the following conditions are met:
Packit Service 3470d1
# 
Packit Service 3470d1
#     * Redistributions of source code must retain the above copyright notice,
Packit Service 3470d1
#       this list of conditions and the following disclaimer.
Packit Service 3470d1
#     * Redistributions in binary form must reproduce the above copyright
Packit Service 3470d1
#       notice, this list of conditions and the following disclaimer in the
Packit Service 3470d1
#       documentation and/or other materials provided with the distribution.
Packit Service 3470d1
#     * Neither the name of Intel Corporation nor the names of its contributors
Packit Service 3470d1
#       may be used to endorse or promote products derived from this software
Packit Service 3470d1
#       without specific prior written permission.
Packit Service 3470d1
# 
Packit Service 3470d1
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Packit Service 3470d1
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit Service 3470d1
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Packit Service 3470d1
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
Packit Service 3470d1
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit Service 3470d1
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Packit Service 3470d1
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Packit Service 3470d1
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Packit Service 3470d1
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit Service 3470d1
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit Service 3470d1
# 
Packit Service 3470d1
# END_ICS_COPYRIGHT8   ****************************************
Packit Service 3470d1
# suffixes and commands to build targets for:
Packit Service 3470d1
# BUILD_TARGET_OS=LINUX
Packit Service 3470d1
# BUILD_TARGET_TOOLCHAIN=GNU
Packit Service 3470d1
# BUILD_TARGET=MIPS64
Packit Service 3470d1
# Target specific defines for building LINUX target using GNU tools
Packit Service 3470d1
Packit Service 3470d1
SHLIB_VERSION		?= 0.0
Packit Service 3470d1
LIB_PREFIX			= $(BUILDDIR)/lib
Packit Service 3470d1
SHLIB_SUFFIX		= .so
Packit Service 3470d1
SHLIB_VERSION_SUFFIX= .so.$(SHLIB_VERSION)
Packit Service 3470d1
ARLIB_SUFFIX		= .a
Packit Service 3470d1
EXE_SUFFIX			= 
Packit Service 3470d1
OBJ_SUFFIX			= .o
Packit Service 3470d1
ifdef BUILD_26
Packit Service 3470d1
KOBJ_SUFFIX			= .ko
Packit Service 3470d1
else
Packit Service 3470d1
KOBJ_SUFFIX			= .o
Packit Service 3470d1
endif
Packit Service 3470d1
EXP_SUFFIX			= .exp
Packit Service 3470d1
RES_SUFFIX			= .res
Packit Service 3470d1
PRE_SUFFIX			= .pre
Packit Service 3470d1
Packit Service 3470d1
# Paths:
Packit Service 3470d1
# let compiler default inclusion of /usr/include, otherwise g++ builds broken
Packit Service 3470d1
SYS_INCLUDE_DIRS = 
Packit Service 3470d1
SYS_LIB_DIRS	 =
Packit Service 3470d1
Packit Service 3470d1
SBTOOLS_PATH	 = /usr/local/sbtools/x86-linux-rh7.2/mips-linux-2.3.1/bin
Packit Service 3470d1
Packit Service 3470d1
CC			= $(SBTOOLS_PATH)gcc
Packit Service 3470d1
CCC			= g++
Packit Service 3470d1
LD			= ld
Packit Service 3470d1
LINT		= lint
Packit Service 3470d1
AR			= ar
Packit Service 3470d1
NM			= nm
Packit Service 3470d1
Packit Service 3470d1
include $(TL_DIR)/Makerules/Defs.GNU
Packit Service 3470d1
Packit Service 3470d1
# for GNU we set an soname on shared libraries
Packit Service 3470d1
SHLIB_SONAME=$(notdir $(CMD_TARGETS_SHLIB))
Packit Service 3470d1
Packit Service 3470d1
# C/C++ compilation
Packit Service 3470d1
# ----------------------------
Packit Service 3470d1
# -fcheck-new does the opposite of what the manual implies.
Packit Service 3470d1
# -fcheck-new DISABLES the run-time test of return value from new
Packit Service 3470d1
CMACH		= -DTARGET_CPU_FAMILY_X86 -Wall -DCPU_BE -fno-strict-aliasing
Packit Service 3470d1
CCMACH		= $(CMACH) -fcheck-new -Wno-ctor-dtor-privacy
Packit Service 3470d1
CSYS		=
Packit Service 3470d1
CCSYS		= $(CSYS)
Packit Service 3470d1
CCLIBS		= 
Packit Service a61c04
release_CCOPT_Flags	?=-O
Packit Service 3470d1
debug_CCOPT_Flags	=
Packit Service 3470d1
# Assemble the optimization flags based upon desired build configuration.
Packit Service 3470d1
CCOPT		= $($(strip $(BUILD_CONFIG))_CCOPT_Flags) -DLINUX -Dlinux -D__LINUX__
Packit Service 3470d1
# for now assume C++ flags are valid on C compiler
Packit Service 3470d1
COPT 		= $(CCOPT)
Packit Service 3470d1
release_CCDEBUG_Flags	=
Packit Service 3470d1
release_CDEBUG_Flags	=
Packit Service 3470d1
debug_CCDEBUG_Flags	=-g -DIB_DEBUG -DIB_TRACE $(CCPROJDEBUG) $(CCLOCALDEBUG)
Packit Service 3470d1
debug_CDEBUG_Flags	=-g -DIB_DEBUG -DIB_TRACE $(CPROJDEBUG) $(CLOCALDEBUG)
Packit Service 3470d1
# Assemble the debug flags based upon desired build configuration.
Packit Service 3470d1
CCDEBUG		= $($(strip $(BUILD_CONFIG))_CCDEBUG_Flags)
Packit Service 3470d1
CDEBUG		= $($(strip $(BUILD_CONFIG))_CDEBUG_Flags)
Packit Service 3470d1
Packit Service 3470d1
# linking
Packit Service 3470d1
# ----------------------------
Packit Service 3470d1
LDMACH		= 
Packit Service 3470d1
LDSYS		=
Packit Service 3470d1
MKSHLIB		= $(CCC) $(CCDEBUG) $(COPT) -shared
Packit Service 3470d1
ifeq "$(strip $(LIBFILES))" ""
Packit Service 3470d1
MKARLIB		= $(AR) crus$(space)
Packit Service 3470d1
else
Packit Service 3470d1
MKARLIB		= $(MAKETOOLS_DIR)/mkarlib.sh $(AR) crus$(space)
Packit Service 3470d1
endif
Packit Service 3470d1
MKPARTIAL	= $(LD) -r -o
Packit Service 3470d1
Packit Service 3470d1
LDLIBSRCH	+= $(foreach lib,$(LD_LIB_DIRS),-Xlinker -rpath-link -Xlinker $(lib))
Packit Service 3470d1
SYSLIBS		= -lpthread
Packit Service 3470d1
LDLIBS		= -Xlinker --start-group $(foreach lib,$(LOCALLIBS) $(LOCALDEPLIBS) $(MODLIBS) $(MODDEPLIBS) $(PROJLIBS) $(PROJDEPLIBS),-l$(lib)) -Xlinker --end-group $(SYSLIBS)