makefile.msc 1.68 KB
Newer Older
Julian Seward's avatar
Julian Seward committed
1 2 3 4 5 6
# Makefile for Microsoft Visual C++ 6.0
# usage: nmake -f makefile.msc
# K.M. Syring (syring@gsf.de)
# Fixed up by JRS for bzip2-0.9.5d release.

CC=cl
Julian Seward's avatar
Julian Seward committed
7
CFLAGS= -DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo
Julian Seward's avatar
Julian Seward committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

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

all: lib bzip2 test

bzip2: lib
	$(CC) $(CFLAGS) -o bzip2 bzip2.c libbz2.lib setargv.obj
	$(CC) $(CFLAGS) -o bzip2recover bzip2recover.c

lib: $(OBJS)
	lib /out:libbz2.lib $(OBJS)

test: bzip2
	type words1
28 29 30 31 32 33
	.\\bzip2 -1  < tests\sample1.ref > sample1.rb2
	.\\bzip2 -2  < tests\sample2.ref > sample2.rb2
	.\\bzip2 -3  < tests\sample3.ref > sample3.rb2
	.\\bzip2 -d  < tests\sample1.bz2 > sample1.tst
	.\\bzip2 -d  < tests\sample2.bz2 > sample2.tst
	.\\bzip2 -ds < tests\sample3.bz2 > sample3.tst
Julian Seward's avatar
Julian Seward committed
34 35 36 37 38 39
	@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.
40 41 42 43 44 45
	fc tests\sample1.bz2 sample1.rb2 
	fc tests\sample2.bz2 sample2.rb2
	fc tests\sample3.bz2 sample3.rb2
	fc tests\sample1.tst sample1.ref
	fc tests\sample2.tst sample2.ref
	fc tests\sample3.tst sample3.ref
Julian Seward's avatar
Julian Seward committed
46

Julian Seward's avatar
Julian Seward committed
47 48 49 50 51 52 53


clean: 
	del *.obj
	del libbz2.lib 
	del bzip2.exe
	del bzip2recover.exe
54 55 56 57 58 59
	del tests\sample1.rb2 
	del tests\sample2.rb2 
	del tests\sample3.rb2
	del tests\sample1.tst 
	del tests\sample2.tst
	del tests\sample3.tst
Julian Seward's avatar
Julian Seward committed
60 61 62 63

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