X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=Makefile;h=ad9aa3bd3f94586366213f99af4f514819cb464d;hb=3c9b60c1fb144950ca51220ffa18f485672c3ba6;hp=0acb1aa35b0384a48221299db10f4f45b3deb457;hpb=3c39a379542fd819dbc5cf6daf59380911c39141;p=fio.git diff --git a/Makefile b/Makefile index 0acb1aa3..ad9aa3bd 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,39 @@ 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 + +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 -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: $(OBJS) + $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) -lpthread -lm -ldl clean: - -rm -f *.o .depend $(PROGS) + -rm -f *.o .depend cscope.out $(PROGS) engines/*.o depend: @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend -INSTALL = install -prefix = /usr/local -bindir = $(prefix)/bin +cscope: + @cscope -b 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