summaryrefslogtreecommitdiff
path: root/benchmarks/dbench/patches/patch-ab
blob: 1036d470675d4e1c9fe1fd35bffe4d9ed7b56648 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$NetBSD: patch-ab,v 1.3 2004/11/10 15:32:33 adam Exp $

--- Makefile.orig	2003-10-16 01:59:00.000000000 +0000
+++ Makefile
@@ -1,12 +1,11 @@
 VERSION=2.1
 
-DESTDIR=/usr/local
+DESTDIR=${PREFIX}
 BINDIR=$(DESTDIR)/bin/
 MANDIR=$(DESTDIR)/man/man1/
-DATADIR=./
+DATADIR=$(DESTDIR)/share/dbench/
 
-CC = gcc
-CFLAGS = -O2 -Wall -DVERSION=\"$(VERSION)\" -DDATADIR=\"$(DATADIR)\"
+CPPFLAGS = -DVERSION=\"$(VERSION)\" -DDATADIR=\"$(DATADIR)\"
 
 DB_OBJS = fileio.o util.o dbench.o child.o
 TB_OBJS = sockio.o util.o dbench.o child.o socklib.o
@@ -15,13 +14,13 @@ SRV_OBJS = util.o tbench_srv.o socklib.o
 all: dbench tbench tbench_srv
 
 dbench: $(DB_OBJS)
-	$(CC) -o $@ $(DB_OBJS)
+	$(CC) -o $@ $(DB_OBJS) $(DB_LDFLAGS)
 
 tbench: $(TB_OBJS)
-	$(CC) -o $@ $(TB_OBJS)
+	$(CC) -o $@ $(TB_OBJS) $(TB_LDFLAGS)
 
 tbench_srv: $(SRV_OBJS)
-	$(CC) -o $@ $(SRV_OBJS)
+	$(CC) -o $@ $(SRV_OBJS) $(TB_LDFLAGS)
 
 # Careful here: don't install client.txt over itself.
 install: all