X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=Makefile;h=d73b944fa20f35efc252ca4216c66ea3cae8608b;hp=c25b4222e43729a2ca961718158470acaa807b52;hb=52b81b7c3b1c9900bf124b6cd0a2cef4a9a1df76;hpb=d5f9b0eabcd4eeec0e2cf3821d3a6f44bcd0981f diff --git a/Makefile b/Makefile index c25b4222..d73b944f 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