⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile.tc

📁 给出了 zip 压缩算法的完整实现过程。
💻 TC
字号:
# Makefile for Zip, ZipCloak, ZipNote and ZipSplit for# Turbo C 2.0. (Thanks to Andrew Cadach <kadach@isi.itfs.nsk.su>)# To use, do "make -fmakefile.tc"# WARNING: the small model is not supported. You must use the large model.# 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 tasm.# 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 -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# ------------- Turbo C 2.0 -------------MODEL=-m$(ZIPMODEL)CFLAGS=-w -w-eff -w-def -w-sig -w-cln -a -d -G -O -Z $(MODEL) $(LOC)UTILFLAGS=-DUTIL $(CFLAGS) -oCC=tcc# Old versions of tasm (prior to 2.01) may not like the "-m2" option...AS=tasmASFLAGS=-ml -t -m2 -DDYN_ALLOC -DSS_NEQ_DS -D$(ASCPUFLAG) -D$(ASMODEL) $(LOC)LD=tccLDFLAGS=$(MODEL)# ------------- Common declarations:STRIP=rem#    If you don't have UPX, LZEXE, or PKLITE, get one of them. Then define:#    (NOTE: upx needs a 386 or higher system to run the exe compressor)#STRIP=upx --8086 --best#    or#STRIP=lzexe#    or (if you've registered PKLITE)#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 $(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) $*.czipfile.obj:	zipfile.c $(ZIP_H)	$(CC) -c $(CFLAGS) $*.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) $*.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) -o$* $*.czipnote.obj:	zipnote.c $(ZIP_H) revision.h	$(CC) -c $(CFLAGS) -o$* $*.czipsplit.obj:	zipsplit.c $(ZIP_H) revision.h	$(CC) -c $(CFLAGS) -o$* $*.c_zipfile.obj:	zipfile.c $(ZIP_H)	$(CC) -c $(UTILFLAGS)$* zipfile.c_fileio.obj:	fileio.c $(ZIP_H)	$(CC) -c $(UTILFLAGS)$* fileio.c_util.obj:	util.c $(ZIP_H)	$(CC) -c $(UTILFLAGS)$* util.c_crypt.obj:	crypt.c $(ZIP_H) crypt.h ttyio.h	$(CC) -c $(UTILFLAGS)$* crypt.c_msdos.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 ;# make sure the command line fits in the MS/DOS 128 byte limit:zip.exe: $(OBJZ) $(OBJI)	rem   ignore any warnings in the following renaming commands:	ren _*.obj _*.ob	ren zipcloak.obj *.ob	ren zipnote.obj *.ob	ren zipsplit.obj *.ob	$(LD) $(LDFLAGS) -ezip.exe *.obj	ren _*.ob _*.obj	ren zip???*.ob *.obj	$(STRIP) zip.exezipcloak.exe: $(OBJC)	$(LD) $(LDFLAGS) -ezipcloak.exe $(OBJC)	$(STRIP) zipcloak.exezipnote.exe: $(OBJN)	$(LD) $(LDFLAGS) -ezipnote.exe $(OBJN)	$(STRIP) zipnote.exezipsplit.exe: $(OBJS)	$(LD) $(LDFLAGS) -ezipsplit.exe $(OBJS)	$(STRIP) zipsplit.exeinstall:        $(ZIPS)	copy /b *.exe $(BIN)clean:	del *.obj	del *.exe

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -