windows-nt/Source/XPSP1/NT/inetsrv/iis/config/common/sources.vip
2020-09-26 16:20:57 +08:00

318 lines
9.4 KiB
Plaintext

#
# sources.vip
#
# Common sources directives for all of Viper.
# The line
#
# !include "$(NTMAKEENV)\sources.vip"
#
# should be the first line in all of Viper's sources files
#
# Bob Atkinson
# April, 1997
MAJORCOMP =mts
SUBSYSTEM_VERSION =4.00
USE_PDB_TO_COMPILE =1
USE_MAPSYM =1
NT_UP =0
!ifndef KERNELMODE
#######################################################################################
#
# User mode: Do not Use the DLL version of the C runtime
#
CRTLIBS =
#######################################################################################
#
# User mode: Set the DLL entry point as sent to the linker
#
DLLENTRY =_DllMainCRTStartup
!else
#######################################################################################
#
# Kernel mode: Use the auxiliary kernel mode C runtime support
#
!if $(AMD64) || $(386)
CRTLIBS =$(SDK_LIB_PATH)\libcntpr.lib
!endif
!endif
#######################################################################################
#
# As we don't want any proxy or stub files (at least for now;
# an interesting idea to add same!) we make the file names
# used for these file to be nul. MIDL_OPTIMIZATION is a macro
# that happens to get passed through LAST (!) to the MIDL compiler,
# allowing us to override pretty much anything that makefile.def
# is doing instead.
#
# REVIEW: Make this a better flag, something like VIPER_MIDL_FLAGS
# Some of this has now been done, but many sources files
# should be updated.
#
MIDL_DEFAULT_OPTIMIZATION =/Oicf
MIDL_HEADER_AND_IID =$(MIDL_DEFAULT_OPTIMIZATION) /dlldata nul /proxy nul
MIDL_HEADER_ONLY =$(MIDL_DEFAULT_OPTIMIZATION) /iid nul /dlldata nul /proxy nul
MIDL_EVERYTHING =$(MIDL_DEFAULT_OPTIMIZATION)
# This is the macro that the IDL build line actually sees. It's
# last on the command line, so takes precedence.
#
MIDL_OPTIMIZATION =$(MIDL_DEFAULT_OPTIMIZATION) $(VIPER_MIDL_FLAGS)
# If you want in your sources file to control which files MIDL generates, then
# set the VIPER_MIDL_FLAGS macro. The following:
#
# VIPER_MIDL_FLAGS =$(MIDL_HEADER_ONLY)
# VIPER_MIDL_FLAGS =$(MIDL_HEADER_AND_IID)
# VIPER_MIDL_FLAGS =$(MIDL_EVERYTHING)
#
# are the common settings, though fancier ones are possible by setting various
# of the generated files to be built to the file named 'nul'. The default is
# to only emit the header; if you want for example the typelib you need to override.
#
VIPER_MIDL_FLAGS =$(MIDL_HEADER_ONLY)
#######################################################################################
#
# Generate stack checking calls in the checked builds. A custom
# __chkstk is linked to expose uses of uninitialized local variables.
#
VIPDEBUGLIBS =
USE_STACK_CHECK =
!if $(FREEBUILD) || defined(KERNELMODE)
!else
!if $(386)
VIPDEBUGLIBS = $(VIPLIBS)\chkstk.lib
USE_STACK_CHECK = /Ge
!endif #386
!endif #FREEBUILD
#######################################################################################
#
# Set DDKBUILDENV
#
!if $(FREEBUILD)
DDKBUILDENV = Free
!else
DDKBUILDENV = Checked
!endif
#
# Set DEBUG,_DEBUG
#
!if $(FREEBUILD)
USE_MSVCRT = 1
!else
C_DEFINES = $(C_DEFINES) -D_DEBUG=1 -DDEBUG=1
DEBUG_CRTS = 1
USE_LIBCMT = 1
!endif
#
# Set COFFBASE_TXT_FILE
#
COFFBASE_TXT_FILE = $(VIPBASE)\common\coffbase.txt
# If you need to link a library that is built by Viper itself,
# then use (for example)
#
# $(VIPLIBS)\util.lib
#
# as the name of said library. If you need a special non-Viper library,
# use
# $(SDK_LIB_PATH)\oldnames.lib
#
VIPLIBS = $(VIPBASE)\bin\$(TARGET_DIRECTORY)\$(DDKBUILDENV)
#
# When linking Win32 DLLs and EXEs, we have a standard set of libraries that
# we use. For a DLL (aka DYNLINK) you don't have to say anything special in
# your SOURCES file to get these, as the definition of WIN32DLL_LIBS below
# takes care of that. However, for EXEs you'll have to do something special,
# like
# UMLIBS = $(VIPWIN32_LIBS)
#
# However, depending on your situation, TARGETLIBS or LINKLIBS might be more
# appropriate. See Build.Hlp for info.
#
# We must be sure to link against thunk libs before any Win32 libs.
# Viper binaries that must run on both Win95 and NT must link against the
# thunks. Those rare few that are NT-only can chose to not do so by setting
#
# VIPTHUNKLIBS =
#
# in their Sources file.
#
# Components that use the shared version of MFC (and not MFCSubs) need to stay
# away from using our own version of heap allocation (malloc, free, etc). To do so
# they should define
#
# VIPPERFLIBS =
#
# in their Sources file.
#
VIPTHUNKLIBS =
VIPPERFLIBS =
VIPWIN32_LIBS =$(VIPTHUNKLIBS) $(VIPPERFLIBS) $(VIPDEBUGLIBS)
VIPWIN32_LIBS =$(VIPWIN32_LIBS) $(SDK_LIB_PATH)\user32.lib $(SDK_LIB_PATH)\kernel32.lib $(SDK_LIB_PATH)\gdi32.lib
VIPWIN32_LIBS =$(VIPWIN32_LIBS) $(SDK_LIB_PATH)\ole32.lib $(SDK_LIB_PATH)\oleaut32.lib $(SDK_LIB_PATH)\atl.lib
VIPWIN32_LIBS =$(VIPWIN32_LIBS) $(SDK_LIB_PATH)\uuid.lib $(SDK_LIB_PATH)\advapi32.lib $(SDK_LIB_PATH)\rpcndr.lib
VIPWIN32_LIBS =$(VIPWIN32_LIBS) $(SDK_LIB_PATH)\rpcrt4.lib $(SDK_LIB_PATH)\rpcns4.lib
VIPWIN32_LIBS =$(VIPWIN32_LIBS) $(SDK_LIB_PATH)\comctl32.lib $(SDK_LIB_PATH)\netapi32.lib
#
# By setting WIN32DLL_LIBs we set the default for DYNLINK to be what we want
# so you don't have to say anything special in sources
#
WIN32DLL_LIBS =$(VIPWIN32_LIBS)
#######################################################################################
#
# Set our include paths to be the tree of 'inc'lude directories above
# us. Each is assumed, if it exists, to be a include directory of increasingly
# greater degree of public disclosure.
#
!if ($(IA64) || $(AMD64))
#
# The 64 bit targets need to use the updated CRT includes. The reason they aren't
# merged is that we'd need to go to a newer compiler, and the newer compiler breaks
# MORE stuff. Note that this makes things look in a "more global" directory before looking
# in a local directory.
#
INCLUDES=$(VIPBASE)\inc64;$(VIPBASE)\inc64\ntos;$(VIPBASE)\inc64\mfc;.\inc;.;..\inc;..\..\inc;..\..\..\inc;..\..\..\..\inc;
!else
INCLUDES=.\inc;.;..\inc;..\..\inc;..\..\..\inc;..\..\..\..\inc;
!endif
#######################################################################################
#
# Setup paths indicating where targets should be built to.
#
TARGETVIPBIN = $(VIPBASE)\bin
TARGETVIPBIN_NS = $(VIPBASE)\bin.ns
TARGETVIPLIB = $(VIPBASE)\bin
#######################################################################################
#
# Control the extraction of .dbg files and the use of incremental linking.
#
# .dbg files are produced only on the build machine, not on developers' workstations.
# When produced, the are placed in the Symbols subdirectory of the build directory,
# e.g.:
# \viper\bin\i386\checked\Symbols\...
#
# Incremental linking is used only in checked builds, and only not on the build machine
# (using incremental linking requires the use of .PDBs).
#
# When splitsym'ing DLL/EXEs, we also copy the .PDBs for mere libraries.
# The binaries are copied over to a non-split folder so that we have a copy of the non-split
# binaries too
!ifndef VIPER_BUILD_MACHINE
VIPER_BUILD_MACHINE =0
!endif
!if $(VIPER_BUILD_MACHINE)
NTDBGFILES =1
_NTTREE =$(TARGETVIPBIN)\$(TARGET_DIRECTORY)\$(DDKBUILDENV)
_NTTREE_NS =$(TARGETVIPBIN_NS)\$(TARGET_DIRECTORY)\$(DDKBUILDENV)
CUSTOM_BINPLACE_CMD =xcopy $@ $(_NTTREE_NS) && xcopy $(@R).pdb $(_NTTREE_NS) && splitsym -a $(BINPLACE_DBGFLAGS_NT) $@
!undef USE_PDB
!undef USE_INCREMENTAL_LINKING
PLACE_LIBRARY_PDB =$(_NTTREE)\Symbols
!else
USE_PDB =1
! if $(FREEBUILD)
! undef USE_INCREMENTAL_LINKING
! else
USE_INCREMENTAL_LINKING =1
! endif
!endif
#######################################################################################
#
# Various forms of exception handling that we can use
#
!if ($(AMD64) || $(386) || $(IA64))
FULLCXXEH = /EHs- /EHa /EHc-
SYNCCXXEH = /EHs /EHa- /EHc-
SEHONLY = /EHs- /EHa- /EHc-
!ELSE
! error Unknown CPU type
!endif
# Set the default exception handling paradigm. In a local Sources file you
# can use, eg, to override
#
# EXCEPTION_HANDLING = $(FULLCXXEH)
#
EXCEPTION_HANDLING = $(SYNCCXXEH)
#######################################################################################
#
# Allow minimal rebuild in the checked builds
#
!if $(FREEBUILD)
!else
USE_INCREMENTAL_COMPILING=1
!endif
#######################################################################################
#
# The actual set of flags passed to the compiler. Set VIPER_C_FLAGS if you
# want something special.
#
USER_C_FLAGS = $(EXCEPTION_HANDLING) $(USE_STACK_CHECK) $(VIPER_C_FLAGS)
#######################################################################################
#
# Allow custom resource compiler flags for viper
#
RCOPTIONS = $(RCOPTIONS) $(VIPER_RCOPTIONS)
#######################################################################################
#
# Use a global warning-control file.
#
COMPILER_WARNINGS =/FIWarningControl.h
#######################################################################################
#
# We have a pair of global version files on which .res files should depend.
#
!undef DEFAULT_VERSION_FILE
MASTER_VERSION_FILE =$(VIPBASE)\src\inc\version\__official__.ver $(VIPBASE)\src\inc\version\__private__.ver