|
Packit |
857059 |
# BEGIN_ICS_COPYRIGHT8 ****************************************
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# Copyright (c) 2015, Intel Corporation
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# Redistribution and use in source and binary forms, with or without
|
|
Packit |
857059 |
# modification, are permitted provided that the following conditions are met:
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# * Redistributions of source code must retain the above copyright notice,
|
|
Packit |
857059 |
# this list of conditions and the following disclaimer.
|
|
Packit |
857059 |
# * Redistributions in binary form must reproduce the above copyright
|
|
Packit |
857059 |
# notice, this list of conditions and the following disclaimer in the
|
|
Packit |
857059 |
# documentation and/or other materials provided with the distribution.
|
|
Packit |
857059 |
# * Neither the name of Intel Corporation nor the names of its contributors
|
|
Packit |
857059 |
# may be used to endorse or promote products derived from this software
|
|
Packit |
857059 |
# without specific prior written permission.
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Packit |
857059 |
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit |
857059 |
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Packit |
857059 |
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
Packit |
857059 |
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit |
857059 |
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Packit |
857059 |
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Packit |
857059 |
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Packit |
857059 |
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit |
857059 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# END_ICS_COPYRIGHT8 ****************************************
|
|
Packit |
857059 |
# suffixes and commands to build targets for:
|
|
Packit |
857059 |
# BUILD_TARGET_OS=WIN32
|
|
Packit |
857059 |
# BUILD_TARGET_TOOLCHAIN=WIN32
|
|
Packit |
857059 |
# BUILD_TARGET=WIN32
|
|
Packit |
857059 |
# Target specific defines for building WIN32 Target using WIN32 tools (visual C++)
|
|
Packit |
857059 |
|
|
Packit |
857059 |
SHLIB_VERSION ?= 0.0
|
|
Packit |
857059 |
LIB_PREFIX = $(BUILDDIR)/
|
|
Packit |
857059 |
SHLIB_SUFFIX = .dll
|
|
Packit |
857059 |
SHLIB_VERSION_SUFFIX= .dll # or .$(SHLIB_VERSION).dll
|
|
Packit |
857059 |
ARLIB_SUFFIX = .lib
|
|
Packit |
857059 |
EXE_SUFFIX = .exe
|
|
Packit |
857059 |
OBJ_SUFFIX = .obj
|
|
Packit |
857059 |
EXP_SUFFIX = .exp
|
|
Packit |
857059 |
RES_SUFFIX = .res
|
|
Packit |
857059 |
PRE_SUFFIX = .pre
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Paths:
|
|
Packit |
857059 |
SYS_INCLUDE_DIRS=
|
|
Packit |
857059 |
SYS_LIB_DIRS =
|
|
Packit |
857059 |
|
|
Packit |
857059 |
REGISTER?=
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Basic Commands:
|
|
Packit |
857059 |
#RUNDOS = $(TOOLS_DIR)/rundos.exe
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Compilation/Build Commands and flags:
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Browse Compiler
|
|
Packit |
857059 |
# ----------------------------
|
|
Packit |
857059 |
BSC = bscmake.exe
|
|
Packit |
857059 |
BSCSYS = /nologo /n
|
|
Packit |
857059 |
BSCLOCAL = # Empty by default
|
|
Packit |
857059 |
BSCFLAGS = $(BSCSYS) $(BSCENV) $(BSCPROJ) $(BSCMOD) $(BSCLOCAL) /o
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# C/C++ compilation
|
|
Packit |
857059 |
# ----------------------------
|
|
Packit |
857059 |
CC = cl.exe
|
|
Packit |
857059 |
CCC = cl.exe
|
|
Packit |
857059 |
LINT = lint # TBD
|
|
Packit |
857059 |
# convert include dirs to windows paths so Windows tools can understand
|
|
Packit |
857059 |
# however use forward slashes so make is not confused
|
|
Packit |
857059 |
CINCSRCH = $(foreach inc,$(CINCLUDE_DIRS),/I $(subst \,/,$(shell cygpath -w $(inc))))
|
|
Packit |
857059 |
#CANSI = /D "__STDC__=1"
|
|
Packit |
857059 |
CANSI =
|
|
Packit |
857059 |
CPIC =
|
|
Packit |
857059 |
CCPIC =
|
|
Packit |
857059 |
CMACH = /D TARGET_CPU_FAMILY_X86 /D WIN32 /D CPU_LE
|
|
Packit |
857059 |
CCEXH = /GX
|
|
Packit |
857059 |
CCNOEXH = /GX-
|
|
Packit |
857059 |
CCRTTI = /GR
|
|
Packit |
857059 |
CCNORTTI = /GR-
|
|
Packit |
857059 |
CSHARED =
|
|
Packit |
857059 |
CCSHARED =
|
|
Packit |
857059 |
CCLIBS =
|
|
Packit |
857059 |
ifdef PCH_TARGET
|
|
Packit |
857059 |
PCHFLAGS = $(addprefix /YX /Fp,$(PCH_TARGET))
|
|
Packit |
857059 |
endif
|
|
Packit |
857059 |
# Define all variations of C/CC compiler flags.
|
|
Packit |
857059 |
# Subsystem based flags
|
|
Packit |
857059 |
none_CC_Flags =
|
|
Packit |
857059 |
console_CC_Flags =/D "_CONSOLE" /D "_MBCS"
|
|
Packit |
857059 |
windows_CC_Flags =/D "_WINDOWS"
|
|
Packit |
857059 |
# Build_Config and UseMFC based flags
|
|
Packit |
857059 |
common_CC_Flags =/D "STRICT" /nologo /W3 $(PCHFLAGS) /Fo /Fd /FR /FD
|
|
Packit |
857059 |
release_none_CC_Flags =$(common_CC_Flags) /Zi /D "NDEBUG"
|
|
Packit |
857059 |
release_no_mfc_CC_Flags =$(common_CC_Flags) /Zi /D "NDEBUG" /ML
|
|
Packit |
857059 |
release_shared_CC_Flags =$(common_CC_Flags) /Zi /D "NDEBUG" /MD /D "_AFXDLL"
|
|
Packit |
857059 |
release_static_CC_Flags =$(common_CC_Flags) /Zi /D "NDEBUG" /MT
|
|
Packit |
857059 |
debug_none_CC_Flags =$(common_CC_Flags) /Gm /Zi /D "IB_DEBUG" /D "_DEBUG" /D "DEBUG" /D "IB_TRACE"
|
|
Packit |
857059 |
debug_no_mfc_CC_Flags =$(common_CC_Flags) /Gm /Zi /D "IB_DEBUG" /D "_DEBUG" /D "DEBUG" /D "IB_TRACE" /MLd
|
|
Packit |
857059 |
debug_shared_CC_Flags =$(common_CC_Flags) /Gm /Zi /D "IB_DEBUG" /D "_DEBUG" /D "DEBUG" /D "IB_TRACE" /MDd /D "_AFXDLL"
|
|
Packit |
857059 |
debug_static_CC_Flags =$(common_CC_Flags) /Gm /Zi /D "IB_DEBUG" /D "_DEBUG" /D "DEBUG" /D "IB_TRACE" /MTd
|
|
Packit |
857059 |
# Config based flags for debug options
|
|
Packit |
857059 |
release_CCDEBUG_Flags =
|
|
Packit |
857059 |
debug_CCDEBUG_Flags = $(CCPROJDEBUG) $(CCLOCALDEBUG)
|
|
Packit |
857059 |
release_CDEBUG_Flags =
|
|
Packit |
857059 |
debug_CDEBUG_Flags = $(CPROJDEBUG) $(CLOCALDEBUG)
|
|
Packit |
857059 |
# Assemble the compiler flags based upon desired build configuration.
|
|
Packit |
857059 |
CCSYS =$($(strip $(SUBSYSTEM))_CC_Flags)\
|
|
Packit |
857059 |
$($(strip $(BUILD_CONFIG))_$(strip $(USEMFC))_CC_Flags) \
|
|
Packit |
857059 |
$($(strip $(BUILD_CONFIG))_CCDEBUG_Flags)
|
|
Packit |
857059 |
# for now assume most C++ flags are valid on C compiler
|
|
Packit |
857059 |
CSYS =$($(strip $(SUBSYSTEM))_CC_Flags)\
|
|
Packit |
857059 |
$($(strip $(BUILD_CONFIG))_$(strip $(USEMFC))_CC_Flags) \
|
|
Packit |
857059 |
$($(strip $(BUILD_CONFIG))_CDEBUG_Flags)
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Define all variations of the C/CC compiler optimization flags.
|
|
Packit |
857059 |
# Config based flags for optimization options
|
|
Packit |
857059 |
release_CCOPT_Flags =/O2
|
|
Packit |
857059 |
debug_CCOPT_Flags =/Od
|
|
Packit |
857059 |
# Assemble the optimization flags based upon desired build configuration.
|
|
Packit |
857059 |
CCOPT = $($(strip $(BUILD_CONFIG))_CCOPT_Flags)
|
|
Packit |
857059 |
# for now assume C++ flags are valid on C compiler
|
|
Packit |
857059 |
COPT = $(CCOPT)
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# linking
|
|
Packit |
857059 |
# ----------------------------
|
|
Packit |
857059 |
LD = link.exe
|
|
Packit |
857059 |
LDMACH = /machine:I386
|
|
Packit |
857059 |
# convert lib dirs to windows paths so Windows tools can understand
|
|
Packit |
857059 |
# however use forward slashes so make is not confused
|
|
Packit |
857059 |
LDLIBSRCH = $(foreach lib,$(LD_LIB_DIRS),/libpath:"$(subst \,/,$(shell cygpath -w $(lib)))")
|
|
Packit |
857059 |
LDSTRIP =
|
|
Packit |
857059 |
# the /debug option causes creation of the pdb file, however it does increase
|
|
Packit |
857059 |
# the exe file size significantly
|
|
Packit |
857059 |
LDPDB_RELEASE = /debug /pdbtype:sept /debugtype:both
|
|
Packit |
857059 |
LDPDB_DEBUG = /debug /pdbtype:sept /debugtype:both
|
|
Packit |
857059 |
LDOUTPUT = /out:
|
|
Packit |
857059 |
# Windows does not use -l
|
|
Packit |
857059 |
# DLLs and static libraries use a .lib file to link against
|
|
Packit |
857059 |
LDLIBS = $(foreach lib,$(LOCALLIBS) $(LOCALDEPLIBS) $(MODLIBS) $(MODDEPLIBS) $(PROJLIBS) $(PROJDEPLIBS),$(lib).lib) $(SYSLIBS)
|
|
Packit |
857059 |
LDSTATIC =/noshared
|
|
Packit |
857059 |
# Define all variations of linker flags.
|
|
Packit |
857059 |
none_LD_Flags =
|
|
Packit |
857059 |
console_LD_Flags =/subsystem:console
|
|
Packit |
857059 |
windows_LD_Flags =/subsystem:windows
|
|
Packit |
857059 |
common_LD_Flags =/nologo
|
|
Packit |
857059 |
release_LD_Flags =$(common_LD_Flags) /incremental:no $(LDPDB_RELEASE)
|
|
Packit |
857059 |
debug_LD_Flags =$(common_LD_Flags) /incremental:no $(LDPDB_DEBUG)
|
|
Packit |
857059 |
# Assemble the linker flags based upon desired build configuration.
|
|
Packit |
857059 |
LDSYS =$($(strip $(strip $(SUBSYSTEM)))_LD_Flags) $($(strip $(BUILD_CONFIG))_LD_Flags)
|
|
Packit |
857059 |
# Specify the default Microsoft WIN32 libs to link, if any.
|
|
Packit |
857059 |
# WIN32 libraries based on UseMFC selection
|
|
Packit |
857059 |
none_SYSLIBS =
|
|
Packit |
857059 |
no_mfc_SYSLIBS =kernel32.lib user32.lib gdi32.lib winspool.lib\
|
|
Packit |
857059 |
comdlg32.lib advapi32.lib shell32.lib ole32.lib\
|
|
Packit |
857059 |
oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
|
|
Packit |
857059 |
shared_SYSLIBS =
|
|
Packit |
857059 |
static_SYSLIBS =
|
|
Packit |
857059 |
# Assemble the Common libraries based upon desired MFC configuration.
|
|
Packit |
857059 |
SYSLIBS =$($(strip $(USEMFC))_SYSLIBS)
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Lexical Analyzer Generator
|
|
Packit |
857059 |
# --------------------------
|
|
Packit |
857059 |
#LEX_LIB = fl # TBD
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# makedepend
|
|
Packit |
857059 |
# ----------------------------
|
|
Packit |
857059 |
MAKEDEPEND = $(SHELL) $(MAKETOOLS_DIR)/makewin32depend.sh
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# IDL Compiler
|
|
Packit |
857059 |
# ----------------------------
|
|
Packit |
857059 |
MIDL = midl.exe
|
|
Packit |
857059 |
MIDLSYS = /ms_ext /c_ext /win32 /nologo
|
|
Packit |
857059 |
MIDLLOCAL = # Empty by default
|
|
Packit |
857059 |
MIDLFLAGS = $(MIDLSYS) $(MIDLENV) $(MIDLPROJ) $(MIDLMOD) $(MIDLLOCAL) $(CINCSRCH)
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# targets to build from IDLFILE during INCLUDES phase
|
|
Packit |
857059 |
IDL_HEADERS = $(IDLFILE:.idl=.h)
|
|
Packit |
857059 |
IDL_OTHER = $(IDLFILE:.idl=_i.c) $(IDLFILE:.idl=_p.c) \
|
|
Packit |
857059 |
$(IDLFILE:.idl=_dlldata.c) $(IDLFILE:.idl=.tlb)
|
|
Packit |
857059 |
IDL_TARGETS = $(IDL_HEADERS) $(IDL_OTHER)
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# building libraries
|
|
Packit |
857059 |
# ----------------------------
|
|
Packit |
857059 |
MKARLIB = link.exe -lib /nologo /out:
|
|
Packit |
857059 |
MKPARTIAL = link.exe /nologo /r /out:
|
|
Packit |
857059 |
MKIMPLIB = link.exe -lib /nologo /def:"$(DEFFILE)" $(IMPLIBLOCAL) /out:
|
|
Packit |
857059 |
MKSHLIB = link.exe /nologo /dll
|
|
Packit |
857059 |
# Only add the /def option to the MKSHLIB link command if there is a .def file and no import
|
|
Packit |
857059 |
# library is being created.
|
|
Packit |
857059 |
ifneq "$(DEFFILE)" ""
|
|
Packit |
857059 |
ifeq "$(strip $(LIB_TARGETS_EXP))" ""
|
|
Packit |
857059 |
MKSHLIB+=/def:"$(DEFFILE)"
|
|
Packit |
857059 |
endif # LIB_TARGETS_EXP
|
|
Packit |
857059 |
endif # DEFFILE
|
|
Packit |
857059 |
ifeq "$(strip $(LIBFILES))" ""
|
|
Packit |
857059 |
ARLIBS=
|
|
Packit |
857059 |
else
|
|
Packit |
857059 |
ARLIBS=$(foreach lib, $(LIBFILES), $(subst \,/,$(shell cygpath -w $(MOD_LIB_DIR)/$(LIB_PREFIX)$(lib)$(ARLIB_SUFFIX))))
|
|
Packit |
857059 |
endif
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# updating registry
|
|
Packit |
857059 |
# ----------------------------
|
|
Packit |
857059 |
REGEXE = $(REGISTER)$(MAKETOOLS_DIR)/regexe.bat
|
|
Packit |
857059 |
REGDLL = $(REGISTER)$(MAKETOOLS_DIR)/regdll.bat
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# resource compiler
|
|
Packit |
857059 |
# ----------------------------
|
|
Packit |
857059 |
RSC = rc.exe
|
|
Packit |
857059 |
# this defines the "CodePage" (ie. character set) which the text is in
|
|
Packit |
857059 |
RSCMACH = /l 0x409
|
|
Packit |
857059 |
# Define all variations of resource compiler flags.
|
|
Packit |
857059 |
none_RSC_Flags =
|
|
Packit |
857059 |
release_RSC_Flags =/D "NDEBUG"
|
|
Packit |
857059 |
nodebug_RSC_Flags =/D "NDEBUG"
|
|
Packit |
857059 |
debug_RSC_Flags =/D "_DEBUG" /D "DEBUG"
|
|
Packit |
857059 |
# Assemble the resource compiler flags based upon desired build configuration.
|
|
Packit |
857059 |
RSCLOCAL = # Empty by default
|
|
Packit |
857059 |
RSCSYS = $($(strip $(BUILD_CONFIG))_RSC_Flags)
|
|
Packit |
857059 |
# stupid RSC compiler uses /i instead of /I for include paths
|
|
Packit |
857059 |
RSCINCSRCH = $(foreach inc,$(CINCLUDE_DIRS),/i $(subst \,/,$(shell cygpath -w $(inc))))
|
|
Packit |
857059 |
RSCFLAGS= $(RSCMACH) $(RSCSYS) $(RSCENV) $(RSCPROJ) $(RSCMOD) $(RSCLOCAL) $(RSCINCSRCH)
|