summaryrefslogtreecommitdiff
path: root/Makefile.Windows
diff options
context:
space:
mode:
authorBruce Cran <bruce@cran.org.uk>2011-01-08 19:49:54 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-01-08 19:49:54 +0100
commit9b8365618309572d8fd2579c8ea3132db89f843f (patch)
tree8b0b266489021c4fef9d52693032241ec1de0207 /Makefile.Windows
parente4db9fec06d77523472e9fad6de5170a77d715c0 (diff)
downloadfio-9b8365618309572d8fd2579c8ea3132db89f843f.tar.gz
fio-9b8365618309572d8fd2579c8ea3132db89f843f.tar.bz2
Various fixes/updates
- Update HOWTO to note that directio and fallocate don't work with ZFS on Solaris. Refactor the Makefile's to add CPPFLAGS and LIBS. - Add -fno-omit-frame-pointer from Linux Makefile to every platform - Change undefined $(ALL_CFLAGS) to $(CFLAGS) - Pass -std=gnu99, without which OS X fails to build. - Add -D__EXTENSIONS__ on Solaris since some functions we need are behind it. - Pull in <limits.h> in fio.c to get PTHREAD_STACK_MIN. - NetBSD doesn't define PTHREAD_STACK_MIN so set it to 4k in os-netbsd.h - If we have posix_fallocate don't error out if it fails during mutex and malloc operations since it will fail on Solaris with a ZFS filesystem. As I understand it these aren't performance-critical operations so do they need to be considered critical? - Remove fio_unused from os-* files since it's defined in fio.h and we don't really need it. - FreeBSD has an idprio command but not the API so don't claim it does. - OS X doesn't have the timer_* API so emulate it using setitimer/sigaction. - NetBSD and Solaris don't support CLOCK_MONOTONIC in timer_create so remove FIO_HAVE_CLOCK_MONOTONIC from their os-* files. I've noticed that a change I made a while ago to use fmin/fmax could cause issues on older OSes - I had a CD with NetBSD 5.0.2 and found they had only been implemented in 5.1 so I'm not sure if I should revert it. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'Makefile.Windows')
-rw-r--r--Makefile.Windows56
1 files changed, 19 insertions, 37 deletions
diff --git a/Makefile.Windows b/Makefile.Windows
index 97a2813a..f8e26979 100644
--- a/Makefile.Windows
+++ b/Makefile.Windows
@@ -1,40 +1,21 @@
-CC = gcc-3
-DEBUGFLAGS = -DFIO_INC_DEBUG
-OPTFLAGS= -O2 -g $(EXTFLAGS)
-CFLAGS = -Wwrite-strings -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(DEBUGFLAGS)
+CC = gcc
+DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
+CPPFLAGS= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+ $(DEBUGFLAGS)
+OPTFLAGS= -O2 -fno-omit-frame-pointer -gstabs+
+CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS)
+LIBS = -lpthread -lm -lrt
PROGS = fio
SCRIPTS = fio_generate_plots
-OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o filesetup.o \
- eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \
- rbtree.o smalloc.o filehash.o helpers.o profile.o debug.o
-OBJS += lib/rand.o
-OBJS += lib/flist_sort.o
-OBJS += lib/num2str.o
+SOURCE = gettime.c fio.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 rbtree.c \
+ smalloc.c filehash.c profile.c debug.c lib/rand.c \
+ lib/flist_sort.c lib/num2str.c $(wildcard crc/*.c) engines/cpu.c \
+ engines/mmap.c engines/sync.c engines/null.c engines/net.c \
+ engines/net.c engines/windowsaio.c
-OBJS += crc/crc7.o
-OBJS += crc/crc16.o
-OBJS += crc/crc32.o
-OBJS += crc/crc32c.o
-OBJS += crc/crc32c-intel.o
-OBJS += crc/crc64.o
-OBJS += crc/sha1.o
-OBJS += crc/sha256.o
-OBJS += crc/sha512.o
-OBJS += crc/md5.o
-
-OBJS += engines/cpu.o
-OBJS += engines/mmap.o
-OBJS += engines/posixaio.o
-OBJS += engines/sync.o
-OBJS += engines/null.o
-OBJS += engines/net.o
-OBJS += engines/windowsaio.o
-
-SOURCE = eta.c filehash.c filesetup.c fio.c gettime.c init.c ioengines.c \
- io_u.c log.c memory.c mutex.c options.c parse.c rbtree.c smalloc.c \
- stat.c parse.c crc/*.c engines/cpu.c engines/mmap.c \
- engines/posixaio.c engines/sync.c engines/null.c engines/net.c engines/windowsaio.c
+OBJS = $(SOURCE:.c=.o)
ifneq ($(findstring $(MAKEFLAGS),s),s)
ifndef V
@@ -48,14 +29,15 @@ prefix = /usr/local
bindir = $(prefix)/bin
mandir = $(prefix)/man
-%.o: %.c
- $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
+.c.o:
+ $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $<
+
fio: $(OBJS)
$(QUIET_CC)windres os/windows/version.rc -O coff -o version.o
- $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(EXTLIBS) -lpthread -lm -lrt version.o
+ $(QUIET_CC)$(CC) $(CFLAGS) -o $@ $(LIBS) $(OBJS) version.o
depend:
- $(QUIET_DEP)$(CC) -MM $(ALL_CFLAGS) $(SOURCE) 1> .depend
+ $(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend
$(PROGS): depend