📄 basemake.inc
字号:
#----------------------------------------------------------------------------
#
# Description:
# Make File Header for BackOffice Software Development Kit
#
# Copyright:
# Copyright 1986 - 1998 Microsoft Corporation. All Rights Reserved.
#
#----------------------------------------------------------------------------
!ifndef BASEMAKE_INCLUDED # Prevent multiple inclusions
BASEMAKE_INCLUDED = 1
#*********************************************
#
# Parameter Checking and Defaults
#
#*********************************************
!ifndef Proj
! ERROR Component name (Proj) has not been defined.
!endif
!ifndef INCLUDE
! ERROR INCLUDE variable is empty; must include at least system include directory
!endif
!ifndef LIB
! ERROR LIB variable is empty; must include at least system lib directory
!endif
!if defined(clean)
$(Proj): Clean
!else
$(Proj): All
!endif
!if defined(nodebug)
BLDTYPE=Retail
!endif
!if "$(BLDTYPE)" == "Retail" | "$(BLDTYPE)" == "RETAIL" | "$(BLDTYPE)" == "retail" | "$(BLDTYPE)" == "RTL" | "$(BLDTYPE)" == "rtl"
BLDTYPE1=Retail
!else if "$(BLDTYPE)" == "Profile" | "$(BLDTYPE)" == "PROFILE" | "$(BLDTYPE)" == "profile"
BLDTYPE1=Profile
!else if "$(BLDTYPE)" == "Debug" | "$(BLDTYPE)" == "DEBUG" | "$(BLDTYPE)" == "debug" | "$(BLDTYPE)" == "DBG" | "$(BLDTYPE)" == "dbg"
BLDTYPE1=Debug
!else ifndef BLDTYPE
BLDTYPE1=Debug
!else
! ERROR BLDTYPE must be either Retail, Profile or Debug.
!endif
!if "$(BLDTYPE1)" == "Retail"
nodebug=1
!endif
!ifndef PLATFORM
PLATFORM=Win32
!endif
!ifndef CALL
CALL=C
!endif
!ifndef PACK
PACK=YES
!endif
!ifndef LOG
LOG=YES
!endif
!ifndef WARNING_LEVEL
WARNING_LEVEL=3
!endif
!ifndef CPU
!ifndef PROCESSOR_ARCHITECTURE
!ERROR CPU and PROCESSOR_ARCHITECTURE variables are empty; at least one must be defined
!endif
CPU=$(PROCESSOR_ARCHITECTURE)
!if "$(CPU)"=="x86" | "$(CPU)"=="X86"
CPU = i386
!endif
!endif
!ifndef APPVER
APPVER=4.0
!endif
!ifndef USE_EXCHANGE
!include <win32.mak>
!endif
# Save build args for any recursive nmakes
BLDARGS= BLDTYPE=$(BLDTYPE) PLATFORM=$(PLATFORM) LOG=$(LOG) CPU=$(CPU)
#*********************************************
#
# Paths
#
#*********************************************
!ifndef BKOFFICE
!ifdef PROJROOT
BKOFFICE=$(PROJROOT)\ # must add trailing backslash
!else
BKOFFICE=\BkOffice\ # assume a reasonable default
!endif
!endif
!ifdef MAKEDIRS
MkDest=
!include $(MAKEDIRS)
!else
ResDir=.
ObjDir=.\$(PLATFORM)\$(BLDTYPE1)
IncDir=$(BKOFFICE)Include
LibDir=$(BKOFFICE)Lib
INCLUDE=$(ObjDir);$(IncDir);$(INCLUDE);
LIB=$(LibDir);$(LIB);
# Win95 doesn't support "&" on command line
MkDest=@for %d in ($(PLATFORM) $(ObjDir)) do @$(COMSPEC) /c if not exist %d md %d
!endif
#*********************************************
#
# Tools
#
#*********************************************
MAKEEXE = nmake
IMPLIB = lib
CC = cl
LIBU = lib
LINK = link
RC = rc
MC = mc
HC = start /wait hcrtf
#*********************************************
#
# Flags
#
#*********************************************
# CL is for all C and C++ files
# -WX Warnings as errors
# -J char becomes unsigned char
#
CL=$(cflags) -c -W$(WARNING_LEVEL) -J -Fo$@ /nologo $(CL)
# LFLAGS is for all links
LFLAGS=-NOLOGO -NODEFAULTLIB -machine:$(CPU) -out:$@ -INCREMENTAL:NO -PDB:NONE $(LFLAGS)
# DLLFLAGS is for linking DLLs
DLLFLAGS=-DLL -map:$(ObjDir)\$(@B).map $(DLLFLAGS)
# LIBFLAGS is for making libraries
LIBFLAGS=-NOLOGO -MACHINE:$(CPU) -out:$@ $(LIBFLAGS)
# RFLAGS is for Windows resources
RFLAGS= -I$(ResDir) -fo$@ -DWIN32 $(noansi) -r -D_WIN32 $(RFLAGS)
# MFLAGS is for the message compiler
MFLAGS=-v -c -s -h $(ObjDir) -r $(ObjDir) -x $(ObjDir) $(MFLAGS)
# MRFLAGS is for the resource compiler when used after the message compiler
MRFLAGS=-l 409 -r -x -i$(ObjDir) $(MRFLAGS)
# HFLAGS is for the help compiler
HFLAGS=-xn
#---------------------------------------------
# Calling convention Flag
#---------------------------------------------
!if "$(CALL)"=="PASCAL"
CL=-Gc $(CL)
!endif
#---------------------------------------------
# Function Packaging Flag
#---------------------------------------------
!if "$(PACK)" == "YES"
CL=-Gy $(CL)
cDefines=-Gy $(cDefines)
!endif
#---------------------------------------------
# Output Redirection
#---------------------------------------------
!if "$(LOG)" == "NO"
LogCmd=
!else
LogCmd= >> $(ObjDir)\$(Proj).Out
!endif
#---------------------------------------------
# Optimization Flags
#---------------------------------------------
!if "$(BLDTYPE1)" == "Retail"
CL=-O2 $(CL)
!else if "$(BLDTYPE1)" == "Profile"
CL=-Od -Z7 -Gh $(CL)
!else
CL=-Od -Z7 $(CL)
!endif
#---------------------------------------------
# PLATFORM specific Flags
#---------------------------------------------
!if "$(CPU)" == "I386"
CL = $(CL) -D_X86_=1
scall = -Gz
lflags = $(lflags) -align:0x1000
!endif
!if "$(CPU)" == "MIPS"
CL = $(CL) -D_MIPS_=1
scall =
!endif
!if "$(CPU)" == "PPC"
CL = $(CL) -D_PPC_=1
scall =
lflags = $(lflags) -ignore:4078
!endif
!if "$(CPU)" == "ALPHA"
CL = $(CL) -D_ALPHA_=1
scall =
!endif
#---------------------------------------------
# Windows version
#---------------------------------------------
!if "$(APPVER)" == "4.0"
CL = $(CL) -DWINVER=0x0400
rflags=$(rflags) -DWINVER=0x0400
!endif
#---------------------------------------------
# Additional MFC Flags
#---------------------------------------------
# Note: we are only using MFC for Exchange Admin
# extension dlls, which must be statically linked to MFC.
!ifdef Use_MFC
CL= $(CL) /GX /DSTRICT /DWIN32 /D_WINDOWS /D_MBCS /D_WINDLL
CL= $(CL) /D_USRDLL -D_AFX_NO_BSTR_SUPPORT /D_AFXDLL
!if "$(BLDTYPE1)"=="Debug"
CL= $(CL) /D_DEBUG
!endif
!ifdef crtdll # Use DLL CRT? (which is multithreaded)
crtflags = -MD$(DbgLibFlag) $(crtflags)
!elseif defined(crtst) && !defined(crtflags) # use Single Threaded CRT?
crtflags = -ML$(DbgLibFlag) $(crtflags)
!elseif defined(crtmt) # use Multithreaded CRT?
crtflags = -MT$(DbgLibFlag) $(crtflags)
!else # default to crtdll
crtflags = -MD$(DbgLibFlag) $(crtflags)
!endif # ifdef crtdll/else crtst/crtmt/else
!endif
#---------------------------------------------
# Build Type Flags (Retail/Debug)
#---------------------------------------------
!if "$(BLDTYPE1)"=="Retail"
CL=-DSHIP $(CL)
LFLAGS = $(LFLAGS) -RELEASE
!else if "$(BLDTYPE1)"=="Profile"
CL=-DDEBUG -DTEST -DPROFILE $(CL)
LFLAGS = $(LFLAGS) -DEBUG:mapped,partial -DEBUGTYPE:coff -PROFILE
libs = $(libs) CAP.LIB
!else
CL=-DDEBUG -DTEST $(CL)
LFLAGS = $(LFLAGS) -debug:full -debugtype:cv
!endif
#---------------------------------------------
# Determine CRT Flags
#---------------------------------------------
!ifdef crtdll # Use DLL CRT? (which is multithreaded)
crtflags = -DWIN32 $(noansi) -D_WIN32 -D_MT -D_DLL
!elseif defined(crtst) && !defined(crtflags) # use Single Threaded CRT?
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -