
#
# See the file config.h for a lot of configuration options.
#

# Use the -pg if you want profiling reports to be generated.
CFLAGS=-D__KERNEL__ -Dprintk=printf -g -O2 -pg

OBJS= bmark.o block_dev.o buffer.o ll_rw_blk.o sd.o scsi.o hosts.o \
	constants.o scsi_debug.o scsi_ioctl.o sd_ioctl.o

bmark: $(OBJS)
	$(CC) $(CFLAGS) -o bmark $(OBJS)

bmark.o: bmark.c config.h

block_dev.o: block_dev.c config.h

buffer.o: buffer.c
	$(CC) $(CFLAGS) -c -Dstatic= buffer.c

report.10Mb: bmark
	./bmark 10
	gprof bmark > report.10Mb

report.30Mb: bmark
	./bmark 30
	gprof bmark > report.30Mb

clean:
	rm -f *.s *.o *~ bmark report.* gmon.out bmark.tar.gz


dist:
	tar cf - * | gzip > bmark.tar.gz