#The following variables can be set by the user: # #NAME - the name of the plugin (project name|dll name). # #EXT - extension of the plugin executable (dll by default). # #DOCS - a list of additional files that need to copied to the target folder. # #ADDOUTDIR - you can set it to /dir if the target folder for the plugin # is a folder inside the default target folder. # This is used in multiarc for building *.fmt. # #USERCPP - user defined switches for the compiler (added after the default # ones). # #CPP_UNALIGN - use 1byte alignment insead of 8bytes in 32bit compiling # #ADDOBJDIR - you can set it to /dir if the temporary folder for the plugin # compiled files is a folder inside the default temporary folder. # This is used in ftp for building *.fll. # #DEF_NAME - name of DEF-file (maybe with path, but always without extension). # If unspecifiedn used $(NAME). # This is used in ftp for building *.fll. # #RC_NAME - name of RC-file (maybe with path, but always without extension). # If unspecifiedn used $(NAME). # This is used in ftp for building *.fll. # #LINK_OBJS - a list of target *.obj files # #LINK_DEP - additional dependents for link rule (e.g. prebuild library) # #DEBUG - set if a debug build is needed # #ANSI - set for ansi build # #ULINK - set if you want to use ulink for linking # #NEEDENTRY - set if you want to disable the /noentry link flag # #NEEDDEFLIB - set if you want to disable the /nodefaultlib link flag # #EXCLUDECRT - set if you do not want to link with common/crt lib. # #AMD64 - set for x64 build # or #CPU=AMD64 - for x64 build # #IA64 - set for IA64 build # or #CPU=IA64 - for IA64 build # #(we try to autodetect if not set) # #VC - set Visual C++ version (VC=8 - 2005, VC=9 - 2008, VC=10 - 2010) (we try to autodetect if not set) # #NO_RELEASE_PDB - set to disable pdb generation for release # !if defined(AMD64) || "$(CPU)" == "AMD64" || "$(PLATFORM)" == "X64" || "$(PLATFORM)" == "x64" !undef AMD64 !undef CPU AMD64=1 CPU=AMD64 !elseif defined(IA64) || "$(CPU)" == "IA64" || "$(PLATFORM)" == "Itanium" !undef IA64 !undef CPU IA64=1 CPU=IA64 !endif !if !defined(VC) && defined(_NMAKE_VER) !if "$(_NMAKE_VER)">"9" VC=9 !elseif "$(_NMAKE_VER)">"8" VC=8 !elseif "$(_NMAKE_VER)">"10" VC=10 !else #default VC=9 !endif !endif !ifndef RC_NAME RC_NAME=$(NAME) !endif !ifndef DEF_NAME DEF_NAME=$(NAME) !endif !ifndef DEBUG DIRNAME=final !else DIRNAME=debug !endif !ifndef ANSI DIRSUFF = W !endif !ifdef AMD64 DIRBIT = 64 !elseif defined(IA64) DIRBIT = IA64 !else DIRBIT = 32 !endif WORKDIR = $(DIRNAME).$(DIRBIT)$(DIRSUFF).vc !ifdef INSTALL OUTDIR=$(INSTALL) !else OUTDIR=$(WORKDIR) !endif OBJDIR = $(WORKDIR)\obj$(ADDOBJDIR) !ifndef COMMON COMMON = ..\common !endif !ifdef ANSI COMINC = $(COMMON)\ascii !else COMINC = $(COMMON)\unicode CPP_WIDE = /DUNICODE /D_UNICODE RC_WIDE = /dUNICODE !endif !ifndef EXT EXT = dll !endif DLLNAME = $(NAME).$(EXT) DLLFULLNAME = $(OUTDIR)$(ADDOUTDIR)\$(DLLNAME) !ifdef ANSI DEF = $(DEF_NAME).vc$(ULN_DEF).def !else DEF = $(DEF_NAME)W.vc$(ULN_DEF).def !endif MAP = $(OUTDIR)$(ADDOUTDIR)\$(NAME).map RES = $(OBJDIR)\$(NAME).res AFLAGS = /nologo /c /Fo"$(OBJDIR)\\" CPPFLAGS = /nologo $(MP) /c /W3 /Gy /GF /J /GS- /Gr /GR- /EHs-c- /LD /I"$(COMMON)" /I"$(COMINC)" $(ENV_INC_OPT) $(CPP_WIDE) /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /D_CRT_NON_CONFORMING_SWPRINTFS /D_WIN32_WINNT=0x0502 $(USERCPP) /Fo"$(OBJDIR)\\" /Fd"$(OBJDIR)\\" !ifndef DEBUG CPPFLAGS=$(CPPFLAGS) /DNDEBUG /O2 !else CPPFLAGS=$(CPPFLAGS) /DDEBUG /Od !endif !ifndef NO_RELEASE_PDB CPPFLAGS=$(CPPFLAGS) /Zi !endif !ifdef AMD64 COMMONLIB = $(COMMON)\libCRT64.lib ULOUT=-Tpd+ !elseif defined(IA64) COMMONLIB = $(COMMON)\libCRTIA64.lib ULOUT=-Tpd+ !else COMMONLIB = $(COMMON)\libCRT.lib !ifdef CPP_UNALIGN CPP_ALIGN=/Zp1 !endif CPPFLAGS=$(CPPFLAGS) $(CPP_ALIGN) ULOUT=-Tpd -Re !endif !ifdef EXCLUDECRT !undef COMMONLIB !endif LIBS = $(COMMONLIB) chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib Netapi32.lib version.lib oleaut32.lib wbemuuid.lib !ifdef _BIN_PATH_ !ifndef _ML_PATH_ _ML_PATH_=$(_BIN_PATH_) !endif !ifndef _CL_PATH_ _CL_PATH_=$(_BIN_PATH_) !endif !ifndef _RC_PATH_ _RC_PATH_=$(_BIN_PATH_) !endif !ifndef _LINK_PATH_ _LINK_PATH_=$(_BIN_PATH_) !endif !endif !ifndef ULINK LNK=$(_LINK_PATH_)link.exe !ifndef NEEDENTRY NOENTRY = /noentry !endif !ifndef NEEDDEFLIB NODEFLIB = /nodefaultlib !endif !if !defined(CPU) SUBSYSTEM=/subsystem:windows,5.0 !endif LINK_FLAGS=$(SUBSYSTEM) /nologo /dll /release /dynamicbase /merge:.rdata=.text $(NOENTRY) $(NODEFLIB) $(ENV_LIB_OPT) /def:"$(DEF)" /map:"$(MAP)" /out:"$(DLLFULLNAME)" !ifndef NO_RELEASE_PDB LINK_FLAGS=$(LINK_FLAGS) /debug !endif !ifndef DEBUG LINK_FLAGS=$(LINK_FLAGS) /incremental:no /OPT:REF /OPT:ICF !endif !else LNK=$(_ULINK_PATH_)ulink.exe +- !ifndef NEEDENTRY NOENTRY = -e- !endif !ifndef NEEDDEFLIB NODEFLIB = -n !endif LINK_FLAGS=-q $(ULOUT) $(ULN_DELAY) -Gz -m- -v -Gh -Gh- $(NOENTRY) $(NODEFLIB) /ZD:"$(DEF)" /ZM:"$(MAP)" /ZO:"$(DLLFULLNAME)" $(ENV_LIB_OPT) !endif !ifndef AS AS=$(_ML_PATH_)ml.exe !endif !ifndef CC CC=$(_CL_PATH_)cl.exe !endif !ifndef LIBR LIBR=$(_LINK_PATH_)lib.exe !endif !ifndef RC RC=$(_RC_PATH)rc.exe !endif !if !defined(SRC_PATHS_DEFINED) && defined(__MAKE__) .path.asm=. .path.cpp=. .path.c=. .path.hpp=. .path.h=. .path.rc=. .path.def=. !endif