X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=Makefile;h=cc4b71f0eacea76de9a8c44df5eb889bd2b659d2;hp=3ce606460114f0f85817d4efeb5577538f554d27;hb=757be0e0a61bb20dc1b76f0b222ec700ee7e22c8;hpb=40e5f1bf1aca5970528724873a4544c43712a75d diff --git a/Makefile b/Makefile index 3ce60646..cc4b71f0 100644 --- a/Makefile +++ b/Makefile @@ -4,19 +4,18 @@ endif VPATH := $(SRCDIR) -ifneq ($(wildcard config-host.mak),) -all: -include config-host.mak -config-host-mak: configure - @echo $@ is out-of-date, running configure - @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh -else -config-host.mak: +all: fio + +config-host.mak: configure + @if [ ! -e "$@" ]; then \ + echo "Running configure ..."; \ + ./configure; \ + else \ + echo "$@ is out-of-date, running configure"; \ + sed -n "/.*Configured with/s/[^:]*: //p" "$@" | sh; \ + fi + ifneq ($(MAKECMDGOALS),clean) - @echo "Running configure for you..." - @./configure -endif -all: include config-host.mak endif @@ -31,6 +30,9 @@ SCRIPTS = $(addprefix $(SRCDIR)/,tools/fio_generate_plots tools/plot/fio2gnuplot ifndef CONFIG_FIO_NO_OPT CFLAGS += -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 endif +ifdef CONFIG_BUILD_NATIVE + CFLAGS += -march=native +endif ifdef CONFIG_GFIO PROGS += gfio @@ -39,7 +41,8 @@ endif SOURCE := $(sort $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)) \ $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/lib/*.c))) \ gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \ - eta.c verify.c memory.c io_u.c parse.c mutex.c options.c \ + eta.c verify.c memory.c io_u.c parse.c fio_sem.c rwlock.c \ + pshared.c options.c \ smalloc.c filehash.c profile.c debug.c engines/cpu.c \ engines/mmap.c engines/sync.c engines/null.c engines/net.c \ engines/ftruncate.c engines/filecreate.c \ @@ -95,9 +98,13 @@ endif ifdef CONFIG_WINDOWSAIO SOURCE += engines/windowsaio.c endif +ifdef CONFIG_RADOS + SOURCE += engines/rados.c +endif ifdef CONFIG_RBD SOURCE += engines/rbd.c endif +SOURCE += oslib/asprintf.c ifndef CONFIG_STRSEP SOURCE += oslib/strsep.c endif @@ -141,7 +148,7 @@ endif ifeq ($(CONFIG_TARGET_OS), Linux) SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c engines/sg.c \ - engines/binject.c oslib/linux-dev-lookup.c + oslib/linux-dev-lookup.c LIBS += -lpthread -ldl LDFLAGS += -rdynamic endif @@ -206,7 +213,8 @@ endif -include $(OBJS:.o=.d) T_SMALLOC_OBJS = t/stest.o -T_SMALLOC_OBJS += gettime.o mutex.o smalloc.o t/log.o t/debug.o t/arch.o +T_SMALLOC_OBJS += gettime.o fio_sem.o pshared.o smalloc.o t/log.o t/debug.o \ + t/arch.o T_SMALLOC_PROGS = t/stest T_IEEE_OBJS = t/ieee754.o @@ -224,7 +232,8 @@ T_AXMAP_OBJS += lib/lfsr.o lib/axmap.o T_AXMAP_PROGS = t/axmap T_LFSR_TEST_OBJS = t/lfsr-test.o -T_LFSR_TEST_OBJS += lib/lfsr.o gettime.o t/log.o t/debug.o t/arch.o +T_LFSR_TEST_OBJS += lib/lfsr.o gettime.o fio_sem.o pshared.o \ + t/log.o t/debug.o t/arch.o T_LFSR_TEST_PROGS = t/lfsr-test T_GEN_RAND_OBJS = t/gen-rand.o @@ -239,9 +248,10 @@ T_BTRACE_FIO_PROGS = t/fio-btrace2fio endif T_DEDUPE_OBJS = t/dedupe.o -T_DEDUPE_OBJS += lib/rbtree.o t/log.o mutex.o smalloc.o gettime.o crc/md5.o \ - lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o t/arch.o \ - crc/murmur3.o crc/crc32c.o crc/crc32c-intel.o crc/crc32c-arm64.o crc/fnv.o +T_DEDUPE_OBJS += lib/rbtree.o t/log.o fio_sem.o pshared.o smalloc.o gettime.o \ + crc/md5.o lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o \ + t/arch.o crc/murmur3.o crc/crc32c.o crc/crc32c-intel.o \ + crc/crc32c-arm64.o crc/fnv.o T_DEDUPE_PROGS = t/fio-dedupe T_VS_OBJS = t/verify-state.o t/log.o crc/crc32c.o crc/crc32c-intel.o crc/crc32c-arm64.o t/debug.o