c语言直接实现bzip2压缩方法,BCB下编译使用bzip2压缩库

这是一个针对Borland C++ 5.5编译器的Makefile,用于构建和测试bzip2压缩库。文件详细定义了编译选项、目标对象、库和测试步骤。通过运行make命令,可以编译源代码,创建libbz2库,并执行一系列的校验来确保bzip2的正确性。
摘要由CSDN通过智能技术生成

# Makefile for Borland C++ 5.5

# usage: make -f makefile.bcc

# Mao yongjun (

mao_yj(at)msn.com)

CC = bcc32

AR = tlib

CFLAGS = -DWIN32 -D_FILE_OFFSET_BITS=64

OBJS= blocksort.obj huffman.obj crctable.obj randtable.obj compress.obj decompress.obj bzlib.obj

POBJS= +blocksort.obj +huffman.obj +crctable.obj +randtable.obj +compress.obj +decompress.obj +bzlib.obj

all: lib bzip2 test

bzip2: lib

$(CC) $(CFLAGS) bzip2.c -L libbz2.lib

$(CC) $(CFLAGS) bzip2recover.c

lib: $(OBJS)

$(AR) libbz2.lib $(POBJS)

test: bzip2

type words1

.//bzip2 -1  < sample1.ref > sample1.rb2

.//bzip2 -2  < sample2.ref > sample2.rb2

.//bzip2 -3  < sample3.ref > sample3.rb2

.//bzip2 -d  < sample1.bz2 > sample1.tst

.//bzip2 -d  < sample2.bz2 > sample2.tst

.//bzip2 -ds < sample3.bz2 > sample3.tst

@echo All six of the fc's should find no differences.

@echo If fc finds an error on sample3.bz2, this could be

@echo because WinZip's 'TAR file smart CR/LF conversion'

@echo is too clever for its own good.  Disable this option.

@echo The correct size for sample3.ref is 120,244.  If it

@echo is 150,251, WinZip has messed it up.

fc sample1.bz2 sample1.rb2

fc sample2.bz2 sample2.rb2

fc sample3.bz2 sample3.rb2

fc sample1.tst sample1.ref

fc sample2.tst sample2.ref

fc sample3.tst sample3.ref

clean:

del *.obj

del libbz2.lib

del bzip2.exe

del bzip2recover.exe

del sample1.rb2

del sample2.rb2

del sample3.rb2

del sample1.tst

del sample2.tst

del sample3.tst

.c.obj:  $(CC) $(CFLAGS) -c $*.c -o $*.obj

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值