[PATCH] Don't hardcode ioengine path
Use the prefix in the Makefile, so it can be packaged properly.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/Makefile b/Makefile
index 5335e14..f6001ad 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,15 @@
PROGS = fio
SCRIPTS = fio_generate_plots
+INSTALL = install
+prefix = /usr/local
+bindir = $(prefix)/bin
+libdir = $(prefix)/lib/fio
+
+FIO_INST_DIR = $(subst ','\'',$(prefix))
+
+CFLAGS += '-D_INST_PREFIX="$(FIO_INST_DIR)"'
+
all: depend $(PROGS) $(SCRIPTS)
$(MAKE) -C engines
@@ -18,11 +27,6 @@
cscope:
@cscope -b
-INSTALL = install
-prefix = /usr/local
-bindir = $(prefix)/bin
-libdir = $(prefix)/lib/fio
-
install: $(PROGS) $(SCRIPTS)
$(INSTALL) -m755 -d $(DESTDIR)$(bindir)
$(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)