DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL $(DEBUGFLAGS)
-OPTFLAGS= -O3 -g -ffast-math
+OPTFLAGS= -g -ffast-math
CFLAGS = -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS) -I. -I$(SRCDIR)
LIBS += -lm $(EXTLIBS)
PROGS = fio
SCRIPTS = $(addprefix $(SRCDIR)/,tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio)
+ifndef CONFIG_FIO_NO_OPT
+ CFLAGS += -O3
+endif
+
ifdef CONFIG_GFIO
PROGS += gfio
endif
;;
--enable-libhdfs) libhdfs="yes"
;;
- --disable-shm) output_sym "CONFIG_NO_SHM"
+ --disable-shm) no_shm="yes"
+ ;;
+ --disable-optimizations) disable_opt="yes"
;;
--help)
show_help="yes"
echo "--disable-gfapi Disable gfapi"
echo "--enable-libhdfs Enable hdfs support"
echo "--disable-shm Disable SHM support"
+ echo "--disable-optimizations Don't enable compiler optimizations"
exit $exit_val
fi
echo >> $config_host_mak
echo "CONFIG_TARGET_OS=$targetos" >> $config_host_mak
+if test "$no_shm" = "yes" ; then
+ output_sym "CONFIG_NO_SHM"
+fi
+
+if test "$disable_opt" = "yes" ; then
+ output_sym "CONFIG_FIO_NO_OPT"
+fi
+
# Some host OSes need non-standard checks for which CPU to use.
# Note that these checks are broken for cross-compilation: if you're
# cross-compiling to one of these OSes then you'll need to specify