configure: solaris and windowsaio fixups
[fio.git] / Makefile
index 22ea022a8ea62e7cf7a9a35f4c0eb1b5463661b9..dab6e888546f2ced159a7edb2b66d30e3cf15878 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
 DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
-CPPFLAGS= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
-       $(DEBUGFLAGS)
+CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
 OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS)
 CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
 LIBS   = -lm $(EXTLIBS)
@@ -29,7 +28,7 @@ SOURCE := gettime.c fio.c ioengines.c init.c stat.c log.c time.c filesetup.c \
                engines/mmap.c engines/sync.c engines/null.c engines/net.c \
                memalign.c server.c client.c iolog.c backend.c libfio.c flow.c \
                json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c \
-               helpers.c lib/flist_sort.c lib/hweight.c
+               helpers.c lib/flist_sort.c lib/hweight.c lib/getrusage.c
 
 ifdef CONFIG_64BIT_LLP64
   CFLAGS += -DBITS_PER_LONG=32
@@ -62,6 +61,7 @@ ifdef CONFIG_LINUX_FALLOCATE
   SOURCE += engines/falloc.c
 endif
 ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT
+  CFLAGS += -DCONFIG_LINUX_EXT4_MOVE_EXTENT
   SOURCE += engines/e4defrag.c
 endif
 ifdef CONFIG_LINUX_SPLICE
@@ -80,6 +80,10 @@ ifdef CONFIG_SOLARISAIO
   CFLAGS += -DCONFIG_SOLARISAIO
   SOURCE += engines/solarisaio.c
 endif
+ifdef CONFIG_WINDOWSAIO
+  CFLAGS += -DCONFIG_WINDOWSAIO
+  SOURCE += engines/windowsaio.c
+endif
 
 ifndef CONFIG_STRSEP
   CFLAGS += -DCONFIG_STRSEP
@@ -142,6 +146,9 @@ endif
 ifdef CONFIG_LINUX_FALLOCATE
   CFLAGS += -DCONFIG_LINUX_FALLOCATE
 endif
+ifdef CONFIG_RUSAGE_THREAD
+  CFLAGS += -DCONFIG_RUSAGE_THREAD
+endif
 
 ifeq ($(UNAME), Linux)
   SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c engines/sg.c \
@@ -181,7 +188,7 @@ ifeq ($(UNAME), Darwin)
 endif
 ifneq (,$(findstring CYGWIN,$(UNAME)))
   SOURCE := $(filter-out engines/mmap.c,$(SOURCE))
-  SOURCE += engines/windowsaio.c os/windows/posix.c
+  SOURCE += os/windows/posix.c
   LIBS  += -lpthread -lpsapi -lws2_32
   CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format
 endif