makefile.msc 1.6 KB

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