# Bonnie Makefile

# For Linux use -O2
CFLAGS = -O2 -Wall $(SYSFLAGS)
#CFLAGS = -O $(SYSFLAGS)
#CC = cc

DESTDIR =
PREFIX = /usr
MANDIR = $(PREFIX)/share/man

bsd:	
	@echo 'Options are "make bsd" and "make SysV" - the default is "bsd".'
	@echo 'If you get messages about missing functions, try "make SysV."'
	$(MAKE) Bonnie 

SysV:	
	$(MAKE) Bonnie 'SYSFLAGS=-DSysV'

Bonnie:	


# Added 99/07/20, <garloff@suse.de>
install: Bonnie
	install -d $(DESTDIR)$(PREFIX)/bin
	#install -s -m 0755 -o root -g root Bonnie $(DESTDIR)$(PREFIX)/bin/bonnie
	install -m 0755 Bonnie $(DESTDIR)$(PREFIX)/bin/bonnie
	install -d $(DESTDIR)$(MANDIR)/man1
	#install -m 0644 -o man -g root bonnie.1 $(DESTDIR)$(MANDIR)/man1/bonnie.1
	install -m 0644 bonnie.1 $(DESTDIR)$(MANDIR)/man1/bonnie.1
	gzip -9f $(DESTDIR)$(MANDIR)/man1/bonnie.1
	
clean: 
	rm -f Bonnie

	
