📄 makefile
字号:
# NMAKE Makefile for Windows NT/Windows 95# D. Feinleib 7/92 <t-davefe@microsoft.com># H. Gessau 9/93 <henryg@kullmar.kullmar.se># J. Lee 8/95 (johnnyl@microsoft.com)# C. Spieler 03/99## Last revised: 20 Feb 2005## Tested with VC++ 2.0 for NT for MIPS and Alpha, Visual C++ 2.2 for Intel CPUs# Revision tested with VC++ 5.0 and 6.0 for Intel CPUs## Nmake macros for building Win32 applications# To build with debug info use 'nmake debug=1'!IFNDEF debugNODEBUG=1!ENDIF!ifdef NOASMAPPLY_ASMCRC=0!else!ifdef USEASMAPPLY_ASMCRC=1!endif!endif!ifdef USEZLIB!undef DLLSTANDALONE!undef USEASMAPPLY_ASMCRC=0!endif!ifndef APPLY_ASMCRC#default ASM CRC code (inline asm in C source) for now...APPLY_ASMCRC=1!endif!ifndef USE_IZTIMEZONE#default: do not use the IZ timezone replacementUSE_IZTIMEZONE=0!endif!IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "x86"CPU = i386!ENDIF!IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "MIPS"CPU = $(PROCESSOR_ARCHITECTURE)!ENDIF!IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"CPU = $(PROCESSOR_ARCHITECTURE)!ENDIF!IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "PPC"CPU = $(PROCESSOR_ARCHITECTURE)!ENDIF!IF "$(CPU)" == ""CPU = i386!ENDIF!include <ntwin32.mak># special subdirectory for the static library binaries, to separate them# from other binaries (including dll import library file)OBDIR = ow32libOB = $(OBDIR)/# object filesOBJU1 = unzip.obj $(CRC32).obj crctab.obj crypt.obj envargs.obj explode.objOBJU2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.objOBJU3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.objOBJUS = win32.obj nt.obj $(TIMEZONE_OBJU)OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJUS)OBJX1 = unzipsfx.obj $(CRC32X).obj crctab_.obj crypt_.objOBJX2 = extract_.obj fileio_.obj globals_.obj inflate_.objOBJX3 = match_.obj process_.obj ttyio_.objOBJXS = win32_.obj nt_.obj $(TIMEZONE_OBJX)OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJXS)OBJF1 = funzip.obj $(CRC32F).obj cryptf.obj globalsf.objOBJF2 = inflatef.obj ttyiof.objOBJFS = win32f.objOBJF = $(OBJF1) $(OBJF2) $(OBJFS)OBJD1 = api.obj $(CRC32L).obj crctabl.obj cryptl.obj explodel.objOBJD2 = extractl.obj fileiol.obj globalsl.obj inflatel.objOBJD3 = listl.obj matchl.obj processl.objOBJD4 = unreducl.obj unshrnkl.obj zipinfol.objOBJDS = win32l.obj ntl.obj windll.obj $(TIMEZONE_OBJD)OBJD = $(OBJD1) $(OBJD2) $(OBJD3) $(OBJD4) $(OBJDS)OBLX1 = apig.obj $(CRC32G).obj crctabg.obj cryptg.objOBLX2 = extractg.obj fileiog.obj globalsg.obj inflateg.objOBLX3 = matchg.obj processg.objOBLXS = win32g.obj ntg.obj windllg.obj $(TIMEZONE_OBLX)OBLX = $(OBLX1) $(OBLX2) $(OBLX3) $(OBLXS)OBGX = sfxwiz.objOBJB1 = $(OB)apib.obj $(OB)$(CRC32B).obj $(OB)crctabb.obj $(OB)cryptb.objOBJB2 = $(OB)explodeb.obj $(OB)extractb.obj $(OB)fileiob.obj $(OB)globalsb.objOBJB3 = $(OB)inflateb.obj $(OB)listb.obj $(OB)matchb.obj $(OB)processb.objOBJB4 = $(OB)unreducb.obj $(OB)unshrnkb.obj $(OB)zipinfob.objOBJBS = $(OB)win32b.obj $(OB)ntb.obj $(OB)windllb.obj $(TIMEZONE_OBJB)OBJB = $(OBJB1) $(OBJB2) $(OBJB3) $(OBJB4) $(OBJBS)UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.hWINDLL_H = windll/windll.h windll/decs.h windll/structs.hWINDLL_DEF = windll/windll32.defWINDLL_IMP_H = windll/decs.h windll/structs.h!if $(APPLY_ASMCRC) != 0CFVARS_ASM = -DASM_CRC!elseCFVARS_ASM = -DNO_ASM!endif!if $(USE_IZTIMEZONE) != 0LOCAL_UNZIP = -DW32_USE_IZ_TIMEZONE $(LOCAL_UNZIP)!endif!ifdef USEZLIBLOCAL_UNZIP = -DUSE_ZLIB $(LOCAL_UNZIP)!endif#CF_LOC = -nologo -J -D_MBCS $(CFVARS_ASM) -DREENTRANTCF_LOC = -nologo -J -D_MBCS $(CFVARS_ASM) $(LOCAL_UNZIP)!if $(APPLY_ASMCRC) != 0CRC32 = crc_i386CRC32X = $(CRC32)CRC32F = $(CRC32)CRC32L = crci386lCRC32G = crci386gCRC32B = crci386b!elseCRC32 = crc32CRC32X = crc32_CRC32F = $(CRC32)CRC32L = crc32lCRC32G = crc32gCRC32B = crc32b!endif!if $(USE_IZTIMEZONE) != 0TIMEZONE_OBJU = timezone.objTIMEZONE_OBJX = timezon_.objTIMEZONE_OBJD = timezonl.objTIMEZONE_OBLX = timezolx.objTIMEZONE_OBJB = $(OB)timezonb.obj!elseTIMEZONE_OBJU =TIMEZONE_OBJX =TIMEZONE_OBJD =TIMEZONE_OBLX =TIMEZONE_OBJB =!endif# USER32.LIB is needed for OemToChar and related routinesconlibs=$(conlibs) user32.libconlibsmt=$(conlibsmt) user32.libconlibsdll=$(conlibsdll) user32.lib# Some optimization (if not debugging)!IFDEF NODEBUGcdebug = -O2cdbgsz = -O1!ELSEcdbgsz = $(cdebug)!ENDIF!ifdef PROFILEINFOldebug = $(ldebug) /PROFILE!endif!IFDEF USEZLIB# Using zlib as decompression core implies linking all executables# against the DLL version of the C runtime library.cvars_iz = $(cvarsdll) $(CF_LOC)cvars_izdll = $(cvarsdll) $(CF_LOC)conlibs_iz = $(conlibsdll) zlib.libconlibs_izdll = $(conlibsdll) zdll.libguilibs_iz = $(guilibsdll) zlib.lib!ELSE# With the default setup (using Info-ZIP's own inflate code), the# executables are linked against the single-thread static C-RTL library to# get self-contained programs.cvars_iz = $(cvars) $(CF_LOC)conlibs_iz = $(conlibs)guilibs_iz = $(guilibs)!IFDEF DLLSTANDALONE# The standalone variant of unzip32.dll is linked against the# multithread-safe static C runtime library.cvars_izdll = $(cvarsmt) $(CF_LOC)conlibs_izdll = $(conlibsmt)!ELSE# The (normal) variant of unzip32.dll is linked against the import library# of the multithread-safe C runtime dll.# -> smaller dll size; efficient use of shared resources,# but requires the C RTL DLL msvcrt.dll to be installed at runtimecvars_izdll = $(cvarsdll) $(CF_LOC)conlibs_izdll = $(conlibsdll)!ENDIF!ENDIF # !USEZLIBCFLAGS_UN = $(cdebug) $(cflags) $(cvars_iz)CFLAGS_SX = $(cdbgsz) $(cflags) $(cvars_iz) -DSFXCFLAGS_FU = $(cdebug) $(cflags) $(cvars_iz) -DFUNZIPCFLAGS_DL = $(cdebug) $(cflags) $(cvars_izdll) -DWINDLL -DDLLCFLAGS_SL = $(cdbgsz) $(cflags) $(cvars_iz) -DWINDLL -DDLL -DUNZIPLIB -DSFXCFLAGS_GX = $(cdbgsz) $(cflags) $(cvars_iz) -DSFXCFLAGS_LB = $(cdebug) $(cflags) $(cvars_iz) -DWINDLL -DDLL -DUNZIPLIB# You may define VC6LINK if your linker recognizes "-opt:nowin98" alignment# qualifier. (VC6 or newer). This option reduces the executable size of the# SFX stubs (Instead, you might apply the free executable compressor "upx"# which is far more efficient in reducing the stub's file size.)!IFDEF VC6LINKLINKOPT_SIZE = -opt:nowin98!ENDIF# How to compile sources.c.obj: $(cc) $(CFLAGS_UN) -o $@ $<# How to link.obj.exe: $(link) $(ldebug) $(conflags) $(conlibs_iz) $** -out:$@# Default target is all command-line executablesunzips: unzip.exe funzip.exe unzipsfx.exeguisfx: SFXWiz32.exedll: unzip32.dlldllsample: uzexampl.exelib: $(OBDIR) $(OB)unzip32.liball: unzips guisfx dll dllsample libunzip.exe: $(OBJU)unzipsfx.exe: $(OBJX) $(link) $(ldebug) $(conflags) $(conlibs_iz) $** $(LINKOPT_SIZE) -out:$@funzip.exe: $(OBJF)unzip32.dll: $(OBJD) windll.res $(WINDLL_DEF) $(link) $(ldebug) $(dlllflags) $(conlibs_izdll) -def:$(WINDLL_DEF) \ $(OBJD) windll.res -out:$@unzsfx32.lib: $(OBLX) $(link) -lib $** -out:$@SFXWiz32.exe: $(OBGX) sfxwiz.res unzsfx32.lib $(link) $(ldebug) $(guilflags) $(guilibs_iz) \ $(OBGX) sfxwiz.res unzsfx32.lib $(LINKOPT_SIZE) -out:$@uzexampl.exe: uzexampl.obj $(link) $(ldebug) $(conflags) $(conlibs) version.lib $** -out:$@$(OB)unzip32.lib: $(OBJB) $(link) -lib $** -out:$@crc32.obj: crc32.c $(UNZIP_H) zip.hcrctab.obj: crctab.c $(UNZIP_H) zip.hcrypt.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.henvargs.obj: envargs.c $(UNZIP_H)explode.obj: explode.c $(UNZIP_H)extract.obj: extract.c $(UNZIP_H) crypt.hfileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.hfunzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.hglobals.obj: globals.c $(UNZIP_H)inflate.obj: inflate.c inflate.h $(UNZIP_H)list.obj: list.c $(UNZIP_H)match.obj: match.c $(UNZIP_H)process.obj: process.c $(UNZIP_H)timezone.obj: timezone.c $(UNZIP_H) zip.h timezone.httyio.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.hunreduce.obj: unreduce.c $(UNZIP_H)unshrink.obj: unshrink.c $(UNZIP_H)unzip.obj: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.hzipinfo.obj: zipinfo.c $(UNZIP_H)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -