# $Id: Makefile,v 1.7 2002/09/11 04:55:38 cjs Exp $

# Add alternative directories for includes files and libraries.
CPPFLAGS=-I/usr/pkg/include
LDFLAGS=-L/usr/pkg/lib

CC=cc ${CPPFLAGS}

randread: randread.c
	${CC} -g -Wall -o randread randread.c filelist.c

tarfile: clean
	tar cf - . | gzip -9 > ../randread.tar.gz

# This expects the "check" header and library to be available.
# Set CPPFLAGS and LDFLAGS at the top of this Makefile so you can use them.
# You can find more information on check at http://check.sourceforge.net/
#
test::
	${CC} -g -Wall -o test test.c ${LDFLAGS} -lcheck
	${CC} -g -Wall -o filelist_test filelist_test.c filelist.c \
	    ${LDFLAGS} -lcheck
	./test
	./filelist_test

clean:
	rm -f randread test filelist_test *.o

run:: randread
	./randread
