mkfile 881 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. </$objtype/mkfile
  2. OFILES=
  3. TARG=\
  4. bzip2\
  5. bunzip2\
  6. HFILES=\
  7. lib/os.h\
  8. lib/bzlib.h\
  9. lib/plan9.h\
  10. LIB=lib/libbzip2.a$O
  11. BIN=/$objtype/bin
  12. </sys/src/cmd/mkmany
  13. CFLAGS=$CFLAGS -p -DPLAN9 -Ilib
  14. test:V: $O.bzip2 $O.bunzip2
  15. ./$O.bzip2 -1 < sample1.ref > sample1.rb2
  16. ./$O.bzip2 -2 < sample2.ref > sample2.rb2
  17. ./$O.bzip2 -3 < sample3.ref > sample3.rb2
  18. ./$O.bunzip2 < sample1.bz2 > sample1.tst
  19. ./$O.bunzip2 < sample2.bz2 > sample2.tst
  20. ./$O.bunzip2 < sample3.bz2 > sample3.tst
  21. cmp sample1.bz2 sample1.rb2
  22. cmp sample2.bz2 sample2.rb2
  23. cmp sample3.bz2 sample3.rb2
  24. cmp sample1.tst sample1.ref
  25. cmp sample2.tst sample2.ref
  26. cmp sample3.tst sample3.ref
  27. bzip2recover.$O: bzip2recover.c
  28. pcc -D_POSIX_SOURCE -D_BSD_EXTENSION -c bzip2recover.c
  29. clean:V:
  30. rm -f *.[$OS] y.tab.? y.debug y.output [$OS].* $TARG *.rb2 *.tst
  31. @{cd lib; mk clean}
  32. lib/libbzip2.a$O:
  33. @{cd lib; mk}