xref: /netbsd-src/external/bsd/bzip2/dist/makefile.msc (revision 4f9a14591a53924af02e2a35ceb2ac984e9c0ffe)
1*4f9a1459Swiz# Makefile for Microsoft Visual C++ 6.0
2*4f9a1459Swiz# usage: nmake -f makefile.msc
3*4f9a1459Swiz# K.M. Syring (syring@gsf.de)
4*4f9a1459Swiz# Fixed up by JRS for bzip2-0.9.5d release.
5*4f9a1459Swiz
6*4f9a1459SwizCC=cl
7*4f9a1459SwizCFLAGS= -DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo
8*4f9a1459Swiz
9*4f9a1459SwizOBJS= blocksort.obj  \
10*4f9a1459Swiz      huffman.obj    \
11*4f9a1459Swiz      crctable.obj   \
12*4f9a1459Swiz      randtable.obj  \
13*4f9a1459Swiz      compress.obj   \
14*4f9a1459Swiz      decompress.obj \
15*4f9a1459Swiz      bzlib.obj
16*4f9a1459Swiz
17*4f9a1459Swizall: lib bzip2 test
18*4f9a1459Swiz
19*4f9a1459Swizbzip2: lib
20*4f9a1459Swiz	$(CC) $(CFLAGS) -o bzip2 bzip2.c libbz2.lib setargv.obj
21*4f9a1459Swiz	$(CC) $(CFLAGS) -o bzip2recover bzip2recover.c
22*4f9a1459Swiz
23*4f9a1459Swizlib: $(OBJS)
24*4f9a1459Swiz	lib /out:libbz2.lib $(OBJS)
25*4f9a1459Swiz
26*4f9a1459Swiztest: bzip2
27*4f9a1459Swiz	type words1
28*4f9a1459Swiz	.\\bzip2 -1  < sample1.ref > sample1.rb2
29*4f9a1459Swiz	.\\bzip2 -2  < sample2.ref > sample2.rb2
30*4f9a1459Swiz	.\\bzip2 -3  < sample3.ref > sample3.rb2
31*4f9a1459Swiz	.\\bzip2 -d  < sample1.bz2 > sample1.tst
32*4f9a1459Swiz	.\\bzip2 -d  < sample2.bz2 > sample2.tst
33*4f9a1459Swiz	.\\bzip2 -ds < sample3.bz2 > sample3.tst
34*4f9a1459Swiz	@echo All six of the fc's should find no differences.
35*4f9a1459Swiz	@echo If fc finds an error on sample3.bz2, this could be
36*4f9a1459Swiz	@echo because WinZip's 'TAR file smart CR/LF conversion'
37*4f9a1459Swiz	@echo is too clever for its own good.  Disable this option.
38*4f9a1459Swiz	@echo The correct size for sample3.ref is 120,244.  If it
39*4f9a1459Swiz	@echo is 150,251, WinZip has messed it up.
40*4f9a1459Swiz	fc sample1.bz2 sample1.rb2
41*4f9a1459Swiz	fc sample2.bz2 sample2.rb2
42*4f9a1459Swiz	fc sample3.bz2 sample3.rb2
43*4f9a1459Swiz	fc sample1.tst sample1.ref
44*4f9a1459Swiz	fc sample2.tst sample2.ref
45*4f9a1459Swiz	fc sample3.tst sample3.ref
46*4f9a1459Swiz
47*4f9a1459Swiz
48*4f9a1459Swiz
49*4f9a1459Swizclean:
50*4f9a1459Swiz	del *.obj
51*4f9a1459Swiz	del libbz2.lib
52*4f9a1459Swiz	del bzip2.exe
53*4f9a1459Swiz	del bzip2recover.exe
54*4f9a1459Swiz	del sample1.rb2
55*4f9a1459Swiz	del sample2.rb2
56*4f9a1459Swiz	del sample3.rb2
57*4f9a1459Swiz	del sample1.tst
58*4f9a1459Swiz	del sample2.tst
59*4f9a1459Swiz	del sample3.tst
60*4f9a1459Swiz
61*4f9a1459Swiz.c.obj:
62*4f9a1459Swiz	$(CC) $(CFLAGS) -c $*.c -o $*.obj
63*4f9a1459Swiz
64