1# $FreeBSD: src/usr.bin/bzip2/Makefile,v 1.5.2.2 2001/08/02 01:09:06 obrien Exp $ 2# $DragonFly: src/usr.bin/bzip2/Makefile,v 1.7 2007/01/20 05:57:40 pavalos Exp $ 3 4BZ2DIR= ${.CURDIR}/../../contrib/bzip2-1.0 5 6.PATH: ${BZ2DIR} 7 8PROG= bzip2 9SRCS= bzip2.c 10 11MAN= bzip2.1 12CFLAGS+= -D_FILE_OFFSET_BITS=64 13 14DPADD= ${LIBBZ2} 15LDADD= -lbz2 16 17NOSHARED?= YES 18 19LINKS= ${BINDIR}/bzip2 ${BINDIR}/bunzip2 20LINKS+= ${BINDIR}/bzip2 ${BINDIR}/bzcat 21MLINKS= bzip2.1 bunzip2.1 bzip2.1 bzcat.1 bzip2.1 bzip2recover.1 22 23REFFILES= sample1.ref sample2.ref sample3.ref 24DREFFILES= sample1.bz2 sample2.bz2 sample3.bz2 25TESTFILES= ${REFFILES} ${DREFFILES} 26 27CLEANFILES+= sample1.rb2 sample2.rb2 sample3.rb2 \ 28 sample1.tst sample2.tst sample3.tst 29 30test: bzip2 ${TESTFILES} 31 @cat ${BZ2DIR}/words1 32 ./bzip2 -1 < ${BZ2DIR}/sample1.ref > sample1.rb2 33 ./bzip2 -2 < ${BZ2DIR}/sample2.ref > sample2.rb2 34 ./bzip2 -3 < ${BZ2DIR}/sample3.ref > sample3.rb2 35 ./bzip2 -d < ${BZ2DIR}/sample1.bz2 > sample1.tst 36 ./bzip2 -d < ${BZ2DIR}/sample2.bz2 > sample2.tst 37 ./bzip2 -ds < ${BZ2DIR}/sample3.bz2 > sample3.tst 38 cmp ${BZ2DIR}/sample1.bz2 sample1.rb2 39 cmp ${BZ2DIR}/sample2.bz2 sample2.rb2 40 cmp ${BZ2DIR}/sample3.bz2 sample3.rb2 41 cmp sample1.tst ${BZ2DIR}/sample1.ref 42 cmp sample2.tst ${BZ2DIR}/sample2.ref 43 cmp sample3.tst ${BZ2DIR}/sample3.ref 44 @cat ${BZ2DIR}/words3 45 46.include <bsd.prog.mk> 47