$OpenBSD: patch-Makefile,v 1.1 2002/07/17 21:57:21 lebel Exp $
--- Makefile.orig	Wed Feb  5 05:08:43 1992
+++ Makefile	Wed Jul 17 17:37:13 2002
@@ -24,18 +24,19 @@
 ##############################################################################
 ID="@(#)Makefile:3.9 -- 5/15/91 19:30:15";
 SHELL = /bin/sh
-#HZ = ????  	   #(read from environment)
+HZ = 128
 CFLAGS = -DTIME
-OPTON = -O        #optimization on (give it your best shot) 
-                  #            -- check your compiler man
-OPTOFF = -Od      #optimization off -- check your compiler man
+OPTON = -s -static -O6 -finline-functions -funroll-loops -fomit-frame-pointer
+                          #optimization on (give it your best shot) 
+                          #            -- check your compiler man
+OPTOFF = -O0 -static      #optimization off -- check your compiler man
 # local directories
 PROGDIR = ./pgms
 SRCDIR = ./src
 DOCDIR = ./doc
 TESTDIR = ./testdir
-RESULTDIR = ./results
-TMPDIR = ./tmp
+# RESULTDIR = ./results
+# TMPDIR = /var/tmp
 # other directories
 INCLDIR = /usr/include
 LIBDIR = /lib
@@ -128,45 +129,45 @@ programs: $(BINS)
 
 # Individual programs
 $(PROGDIR)/arithoh:	$(SRCDIR)/arith.c
-	cc -o $(PROGDIR)/arithoh ${CFLAGS} ${OPTON} -Darithoh $(SRCDIR)/arith.c
+	$(CC) -o $(PROGDIR)/arithoh ${CFLAGS} ${OPTON} -Darithoh $(SRCDIR)/arith.c
 $(PROGDIR)/register: $(SRCDIR)/arith.c
-	cc -o $(PROGDIR)/register ${CFLAGS} ${OPTON} -Ddatum=register $(SRCDIR)/arith.c
+	$(CC) -o $(PROGDIR)/register ${CFLAGS} ${OPTON} -Ddatum=register $(SRCDIR)/arith.c
 $(PROGDIR)/short: $(SRCDIR)/arith.c
-	cc -o $(PROGDIR)/short ${CFLAGS} ${OPTON} -Ddatum=short $(SRCDIR)/arith.c
+	$(CC) -o $(PROGDIR)/short ${CFLAGS} ${OPTON} -Ddatum=short $(SRCDIR)/arith.c
 $(PROGDIR)/int: $(SRCDIR)/arith.c
-	cc -o $(PROGDIR)/int ${CFLAGS} ${OPTON} -Ddatum=int $(SRCDIR)/arith.c
+	$(CC) -o $(PROGDIR)/int ${CFLAGS} ${OPTON} -Ddatum=int $(SRCDIR)/arith.c
 $(PROGDIR)/long: $(SRCDIR)/arith.c
-	cc -o $(PROGDIR)/long ${CFLAGS} ${OPTON} -Ddatum=long $(SRCDIR)/arith.c
+	$(CC) -o $(PROGDIR)/long ${CFLAGS} ${OPTON} -Ddatum=long $(SRCDIR)/arith.c
 $(PROGDIR)/float: $(SRCDIR)/arith.c
-	cc -o $(PROGDIR)/float ${CFLAGS} ${OPTON} -Ddatum=float $(SRCDIR)/arith.c
+	$(CC) -o $(PROGDIR)/float ${CFLAGS} ${OPTON} -Ddatum=float $(SRCDIR)/arith.c
 $(PROGDIR)/double: $(SRCDIR)/arith.c
-	cc -o $(PROGDIR)/double ${CFLAGS} ${OPTON} -Ddatum=double $(SRCDIR)/arith.c
+	$(CC) -o $(PROGDIR)/double ${CFLAGS} ${OPTON} -Ddatum=double $(SRCDIR)/arith.c
 $(PROGDIR)/hanoi: $(SRCDIR)/hanoi.c
-	cc -o $(PROGDIR)/hanoi ${CFLAGS} ${OPTON} $(SRCDIR)/hanoi.c
+	$(CC) -o $(PROGDIR)/hanoi ${CFLAGS} ${OPTON} $(SRCDIR)/hanoi.c
 $(PROGDIR)/fstime: $(SRCDIR)/fstime.c
-	cc -o $(PROGDIR)/fstime ${CFLAGS} ${OPTON} -Dawk=1 $(SRCDIR)/fstime.c
+	$(CC) -o $(PROGDIR)/fstime ${CFLAGS} ${OPTON} -Dawk=1 $(SRCDIR)/fstime.c
 $(PROGDIR)/syscall: $(SRCDIR)/syscall.c
-	cc -o $(PROGDIR)/syscall ${CFLAGS} ${OPTON} $(SRCDIR)/syscall.c
+	$(CC) -o $(PROGDIR)/syscall ${CFLAGS} ${OPTON} $(SRCDIR)/syscall.c
 $(PROGDIR)/context1: $(SRCDIR)/context1.c
-	cc -o $(PROGDIR)/context1 ${CFLAGS} ${OPTON} $(SRCDIR)/context1.c
+	$(CC) -o $(PROGDIR)/context1 ${CFLAGS} ${OPTON} $(SRCDIR)/context1.c
 $(PROGDIR)/pipe: $(SRCDIR)/pipe.c
-	cc -o $(PROGDIR)/pipe ${CFLAGS} ${OPTON} $(SRCDIR)/pipe.c
+	$(CC) -o $(PROGDIR)/pipe ${CFLAGS} ${OPTON} $(SRCDIR)/pipe.c
 $(PROGDIR)/spawn: $(SRCDIR)/spawn.c
-	cc -o $(PROGDIR)/spawn ${CFLAGS} ${OPTON} $(SRCDIR)/spawn.c
+	$(CC) -o $(PROGDIR)/spawn ${CFLAGS} ${OPTON} $(SRCDIR)/spawn.c
 $(PROGDIR)/execl: $(SRCDIR)/execl.c $(SRCDIR)/big.c
-	cc -o $(PROGDIR)/execl ${CFLAGS} ${OPTON} $(SRCDIR)/execl.c
+	$(CC) -o $(PROGDIR)/execl ${CFLAGS} ${OPTON} $(SRCDIR)/execl.c
 $(PROGDIR)/dhry2: $(SRCDIR)/dhry_1.c $(SRCDIR)/dhry_2.c $(SRCDIR)/dhry.h
-	cd $(SRCDIR); cc -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_1.c  
-	cd $(SRCDIR); cc -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_2.c  
-	cc -o $(PROGDIR)/dhry2 ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o 
+	cd $(SRCDIR); $(CC) -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_1.c  
+	cd $(SRCDIR); $(CC) -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_2.c  
+	$(CC) -o $(PROGDIR)/dhry2 ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o 
 	cd $(SRCDIR); rm -f dhry_1.o dhry_2.o 
 $(PROGDIR)/dhry2reg: $(SRCDIR)/dhry_1.c $(SRCDIR)/dhry_2.c $(SRCDIR)/dhry.h 
-	cd $(SRCDIR); cc -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_1.c
-	cd $(SRCDIR); cc -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_2.c
-	cc -o $(PROGDIR)/dhry2reg ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o
+	cd $(SRCDIR); $(CC) -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_1.c
+	cd $(SRCDIR); $(CC) -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_2.c
+	$(CC) -o $(PROGDIR)/dhry2reg ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o
 	cd $(SRCDIR); rm -f dhry_1.o dhry_2.o
 $(PROGDIR)/looper: $(SRCDIR)/looper.c
-	cc -o $(PROGDIR)/looper ${CFLAGS} ${OPTON} $(SRCDIR)/looper.c
+	$(CC) -o $(PROGDIR)/looper ${CFLAGS} ${OPTON} $(SRCDIR)/looper.c
 
 # Run the benchmarks and create the reports
 run:
