makefile.msc
来自「infozip2.2源码」· MSC 代码 · 共 195 行
MSC
195 行
# Makefile for Zip, ZipCloak, ZipNote and ZipSplit for# Microsoft C 5.1 and above.# To use, do "make makefile.msc"# Add -DSMALL_MEM or -DMEDIUM_MEM to the LOC macro if you wish to reduce# the memory requirements.# Add -DNO_ASM to CFLAGS and comment out the ASMOBJS definition if# you do not have masm.# Optional nonstandard preprocessor flags (as -DMEDIUM_MEM or -DNO_ASM)# should be added to the environment via "set LOCAL_ZIP=-DFOO" or added# to the declaration of LOC here:LOC = -DDOS -DDYN_ALLOC -DNO_SECURE_TESTS $(LOCAL_ZIP)# Zip requires compact or large memory model.# with 2.1, compact model exceeds 64k code segment; use large modelZIPMODEL=L # large model for Zip and ZipUtils# name of Flag to select memory model for assembler compiles, supported# values are __SMALL__ , __MEDIUM__ , __COMPACT__ , __LARGE__ :ASMODEL=__LARGE__ # keep in sync with ZIPMODEL definition !!# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.CPU_TYP = 0# Uncomment the following macro to use the optimized assembler# routines in Zip:ASMOBJS = match.obj crc_i86.objASCPUFLAG = __$(CPU_TYP)86# ------------- Microsoft C 5.1, 6.0, 7.0 and VC++ Pro 1.0 -------------CC=clMODEL=-A$(ZIPMODEL)FP=COMMON_CFLAGS=-nologo -I. $(MODEL) $(FP) -DMSC $(LOC) -W3 -G$(CPU_TYP)CFLAGS=$(COMMON_CFLAGS) -OxSPECFLAGS=$(COMMON_CFLAGS) -Oaict -Gs# For MSC/C++ 7.0 and VC++ no special flags are needed:# SPECFLAGS=$(CFLAGS)UTILFLAGS=-DUTIL $(CFLAGS) -FoAS=masmASFLAGS=-ml -t -D$(ASCPUFLAG) -D$(ASMODEL) $(LOC)# For MSC 6.0, use:#AS=ml#ASFLAGS=-c -D$(ASCPUFLAG) -D$(ASMODEL) $(LOC)# Supress -DDYN_ALLOC in ASFLAGS if you have suppressed it in CFLAGSLD=linkLDFLAGS=/noi/farcall/packcode/e/st:0x1000/m# If you use lzexe as recommended below, remove /e from LDFLAGS# ------------- Common declarations:STRIP=rem# If you don't have lzexe, get it (by ftp on oak.oakland.edu in# /pub/msdos/execomp/lzexe91e.zip). Then define:#STRIP=lzexe# Or if you've registered PKLITE, then define:#STRIP=pklite# This makes a big difference in .exe size (and possibly load time)# ------------- Used by install rule# set BIN to the directory you want to install the executables toBIN = c:\util# variablesOBJZ = zip.obj crypt.obj ttyio.obj zipfile.obj zipup.obj fileio.obj util.obj \ crc32.obj crctab.obj globals.objOBJI = deflate.obj trees.obj bits.obj $(ASMOBJS) msdos.objOBJU = zipfile_.obj fileio_.obj util_.obj globals.obj msdos_.objOBJN = zipnote.obj $(OBJU)OBJC = zipcloak.obj crctab.obj crypt_.obj ttyio.obj $(OBJU)OBJS = zipsplit.obj $(OBJU)ZIP_H = zip.h ziperr.h tailor.h msdos/osdep.hZIPS = zip.exe zipnote.exe zipsplit.exe zipcloak.exezips: $(ZIPS)zip.obj: zip.c $(ZIP_H) revision.h crypt.h ttyio.h $(CC) -c $(CFLAGS) $*.c# MSC 5.1 generates bad code on zipfile with -Oxzipfile.obj: zipfile.c $(ZIP_H) $(CC) -c $(SPECFLAGS) $*.czipup.obj: zipup.c $(ZIP_H) revision.h crypt.h msdos/zipup.h $(CC) -c $(CFLAGS) $*.cfileio.obj: fileio.c $(ZIP_H) $(CC) -c $(CFLAGS) $*.cutil.obj: util.c $(ZIP_H) $(CC) -c $(CFLAGS) $*.cglobals.obj: globals.c $(ZIP_H) $(CC) -c $(CFLAGS) $*.cdeflate.obj: deflate.c $(ZIP_H) $(CC) -c $(CFLAGS) $*.ctrees.obj: trees.c $(ZIP_H) $(CC) -c $(CFLAGS) $*.cbits.obj: bits.c $(ZIP_H) crypt.h $(CC) -c $(CFLAGS) $*.ccrc32.obj: crc32.c $(ZIP_H) $(CC) -c $(CFLAGS) $*.ccrctab.obj: crctab.c $(ZIP_H) $(CC) -c $(CFLAGS) $*.ccrypt.obj: crypt.c $(ZIP_H) crypt.h ttyio.h $(CC) -c $(CFLAGS) $*.cttyio.obj: ttyio.c $(ZIP_H) crypt.h ttyio.h $(CC) -c $(CFLAGS) $*.cmsdos.obj: msdos/msdos.c $(ZIP_H) $(CC) -c $(CFLAGS) msdos/$*.czipcloak.obj: zipcloak.c $(ZIP_H) revision.h crypt.h ttyio.h $(CC) -c $(CFLAGS) $*.czipnote.obj: zipnote.c $(ZIP_H) revision.h $(CC) -c $(CFLAGS) $*.c# MSC 5.1 dies on zipsplit with -Oxzipsplit.obj: zipsplit.c $(ZIP_H) revision.h $(CC) -c $(SPECFLAGS) $*.c# MSC 5.1 generates bad code on zipfile with -Oxzipfile_.obj: zipfile.c $(ZIP_H) $(CC) -c $(SPECFLAGS) -DUTIL -Fo$@ zipfile.cfileio_.obj: fileio.c $(ZIP_H) $(CC) -c $(UTILFLAGS)$@ fileio.cutil_.obj: util.c $(ZIP_H) $(CC) -c $(UTILFLAGS)$@ util.ccrypt_.obj: crypt.c $(ZIP_H) crypt.h ttyio.h $(CC) -c $(UTILFLAGS)$@ crypt.cmsdos_.obj: msdos/msdos.c $(ZIP_H) $(CC) -c $(UTILFLAGS)$@ msdos/msdos.ccrc_i86.obj: msdos/crc_i86.asm $(AS) $(ASFLAGS) msdos\crc_i86.asm ;match.obj: msdos/match.asm $(AS) $(ASFLAGS) msdos\match.asm ;# we must cut the command line to fit in the MS/DOS 128 byte limit:zip.exe: $(OBJZ) $(OBJI) echo $(OBJZ)+ > zip.rsp echo $(OBJI); >> zip.rsp $(LD) $(LDFLAGS) @zip.rsp del zip.rsp $(STRIP) zip.exezipcloak.exe: $(OBJC) echo $(OBJC); > zipc.rsp $(LD) $(LDFLAGS) @zipc.rsp del zipc.rsp $(STRIP) zipcloak.exezipnote.exe: $(OBJN) echo $(OBJN); > zipn.rsp $(LD) $(LDFLAGS) @zipn.rsp del zipn.rsp $(STRIP) zipnote.exezipsplit.exe: $(OBJS) echo $(OBJS); > zips.rsp $(LD) $(LDFLAGS) @zips.rsp del zips.rsp $(STRIP) zipsplit.exe# No `install' and `clean' target possible as long as MSC's old MAKE utility# is supported (MSC 5.1 Make always tries to update ALL targets. The result# is that install and clean are always executed, unless an error occured.)#install: $(ZIPS)# copy /b *.exe $(BIN)##clean:# del *.obj# del *.exe
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?