[PATCH] Remember to check ioops version in loaded module
[fio.git] / Makefile
index 16c8413643a69300228eb518189a3809be397bf6..5335e145696faf7fd7aa133829ff787937ac1adf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,13 @@ PROGS = fio
 SCRIPTS = fio_generate_plots
 
 all: depend $(PROGS) $(SCRIPTS)
+       $(MAKE) -C engines
 
-fio: fio.o fio-io.o fio-ini.o fio-stat.o fio-log.o fio-time.o md5.o crc32.o
-       $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -laio -lm -lrt
+fio: fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o
+       $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -laio -lm -lrt -ldl
 
 clean:
-       -rm -f *.o .depend cscope.out $(PROGS)
+       -rm -f *.o .depend cscope.out $(PROGS) engines/*.o
 
 depend:
        @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
@@ -20,10 +21,13 @@ cscope:
 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)
+       $(INSTALL) -m755 -d $(DESTDIR) $(libdir)
+       $(INSTALL) engines/*.o $(libdir)
 
 ifneq ($(wildcard .depend),)
 include .depend