2019-06-08 11:47:57 +00:00
|
|
|
# Makefile for Microsoft Visual Studio 2013 and later.
|
1999-09-04 20:13:13 +00:00
|
|
|
# usage: nmake -f makefile.msc
|
|
|
|
# K.M. Syring (syring@gsf.de)
|
|
|
|
# Fixed up by JRS for bzip2-0.9.5d release.
|
|
|
|
|
|
|
|
CC=cl
|
2019-09-14 22:48:40 +00:00
|
|
|
CFLAGS= -DWIN32 -DBZ_LCCWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo
|
2019-06-08 11:33:18 +00:00
|
|
|
RC=rc
|
1999-09-04 20:13:13 +00:00
|
|
|
|
|
|
|
OBJS= blocksort.obj \
|
|
|
|
huffman.obj \
|
|
|
|
crctable.obj \
|
|
|
|
randtable.obj \
|
|
|
|
compress.obj \
|
|
|
|
decompress.obj \
|
|
|
|
bzlib.obj
|
|
|
|
|
2019-06-08 11:19:15 +00:00
|
|
|
all: dll lib bzip2 test
|
1999-09-04 20:13:13 +00:00
|
|
|
|
2019-06-08 11:33:18 +00:00
|
|
|
bzip2: dll bzip2.res bzip2recover.res
|
|
|
|
$(CC) $(CFLAGS) /Febzip2 bzip2.c bz2-1.lib setargv.obj bzip2.res
|
|
|
|
$(CC) $(CFLAGS) /Febzip2recover bzip2recover.c bzip2recover.res
|
1999-09-04 20:13:13 +00:00
|
|
|
|
2019-06-08 11:33:18 +00:00
|
|
|
dll: $(OBJS) libbz2.def bz2-1.res
|
|
|
|
link /dll /implib:bz2-1.lib /out:bz2-1.dll /def:libbz2.def $(OBJS) bz2-1.res
|
2019-06-08 11:19:15 +00:00
|
|
|
|
1999-09-04 20:13:13 +00:00
|
|
|
lib: $(OBJS)
|
2019-06-08 11:19:15 +00:00
|
|
|
lib /out:bz2-static.lib $(OBJS)
|
1999-09-04 20:13:13 +00:00
|
|
|
|
2019-06-08 11:33:18 +00:00
|
|
|
bzip2.res:
|
|
|
|
$(RC) /fobzip2.res /d BZIP2 version.rc
|
|
|
|
|
|
|
|
bzip2recover.res:
|
|
|
|
$(RC) /fobzip2recover.res /d BZIP2RECOVER version.rc
|
|
|
|
|
|
|
|
bz2-1.res:
|
|
|
|
$(RC) /fobz2-1.res /d BZ21DLL version.rc
|
|
|
|
|
1999-09-04 20:13:13 +00:00
|
|
|
test: bzip2
|
2019-06-08 10:59:19 +00:00
|
|
|
type tests\words1
|
|
|
|
.\\bzip2 -1 < tests\sample1.ref > tests\sample1.rb2
|
|
|
|
.\\bzip2 -2 < tests\sample2.ref > tests\sample2.rb2
|
|
|
|
.\\bzip2 -3 < tests\sample3.ref > tests\sample3.rb2
|
|
|
|
.\\bzip2 -d < tests\sample1.bz2 > tests\sample1.tst
|
|
|
|
.\\bzip2 -d < tests\sample2.bz2 > tests\sample2.tst
|
|
|
|
.\\bzip2 -ds < tests\sample3.bz2 > tests\sample3.tst
|
2000-06-24 20:13:13 +00:00
|
|
|
@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.
|
2019-06-08 10:59:19 +00:00
|
|
|
fc tests\sample1.bz2 tests\sample1.rb2
|
|
|
|
fc tests\sample2.bz2 tests\sample2.rb2
|
|
|
|
fc tests\sample3.bz2 tests\sample3.rb2
|
|
|
|
fc tests\sample1.tst tests\sample1.ref
|
|
|
|
fc tests\sample2.tst tests\sample2.ref
|
|
|
|
fc tests\sample3.tst tests\sample3.ref
|
2000-06-24 20:13:13 +00:00
|
|
|
|
1999-09-04 20:13:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
del *.obj
|
2019-06-08 11:19:15 +00:00
|
|
|
del bz2-1.dll
|
|
|
|
del bz2-1.exp
|
|
|
|
del bz2-1.lib
|
2019-06-08 11:33:18 +00:00
|
|
|
del bz2-1.res
|
2019-06-08 11:19:15 +00:00
|
|
|
del bz2-static.lib
|
1999-09-04 20:13:13 +00:00
|
|
|
del bzip2.exe
|
2019-06-08 11:33:18 +00:00
|
|
|
del bzip2.res
|
1999-09-04 20:13:13 +00:00
|
|
|
del bzip2recover.exe
|
2019-06-08 11:33:18 +00:00
|
|
|
del bzip2recover.res
|
2019-06-06 15:55:40 +00:00
|
|
|
del tests\sample1.rb2
|
|
|
|
del tests\sample2.rb2
|
|
|
|
del tests\sample3.rb2
|
|
|
|
del tests\sample1.tst
|
|
|
|
del tests\sample2.tst
|
|
|
|
del tests\sample3.tst
|
1999-09-04 20:13:13 +00:00
|
|
|
|
|
|
|
.c.obj:
|
2019-06-08 11:06:17 +00:00
|
|
|
$(CC) $(CFLAGS) -c $*.c /Fe$*.obj
|
1999-09-04 20:13:13 +00:00
|
|
|
|