X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=Makefile;h=1ebad6af78ca7e0292096855b5f9ea8e09a0d97f;hb=7abf833d25ab6cc866308fe37483dfe2fde28efc;hp=684e8e04277b9fc23a9884ab70cdbc802e22c6d2;hpb=6796209a7e3d39522b0f5599aba277809786335e;p=fio.git diff --git a/Makefile b/Makefile index 684e8e04..1ebad6af 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,34 @@ CC = gcc -CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +CFLAGS = -W -Wwrite-strings -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PROGS = fio SCRIPTS = fio_generate_plots +OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \ + filesetup.o eta.o verify.o memory.o io_u.o parse.o + +OBJS += engines/fio-engine-cpu.o +OBJS += engines/fio-engine-libaio.o +OBJS += engines/fio-engine-mmap.o +OBJS += engines/fio-engine-posixaio.o +OBJS += engines/fio-engine-sg.o +OBJS += engines/fio-engine-splice.o +OBJS += engines/fio-engine-sync.o + +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) -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 +fio: $(OBJS) + $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl -laio -lrt 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 @@ -17,13 +36,10 @@ depend: cscope: @cscope -b -INSTALL = install -prefix = /usr/local -bindir = $(prefix)/bin - install: $(PROGS) $(SCRIPTS) $(INSTALL) -m755 -d $(DESTDIR)$(bindir) $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) + $(INSTALL) -m755 -d $(DESTDIR) $(libdir) ifneq ($(wildcard .depend),) include .depend