fio: Use a progress bar instead of a label
[fio.git] / Makefile
index 6a3f85bcfbe5cd3ae830dcbe1f30a3850529f332..a1270276bbda0f1dae4ae5c8a1c2ee77f46a2bff 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,12 +9,16 @@ PROGS = fio
 SCRIPTS = fio_generate_plots
 UNAME  := $(shell uname)
 
-SOURCE = gettime.c fio.c ioengines.c init.c stat.c log.c time.c filesetup.c \
+GTKCFLAGS = `pkg-config gtk+-2.0 --cflags`
+GTKLDFLAGS = `pkg-config gtk+-2.0 gthread-2.0 --libs`
+
+SOURCE := 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 \
                rbtree.c smalloc.c filehash.c profile.c debug.c lib/rand.c \
                lib/num2str.c lib/ieee754.c $(wildcard crc/*.c) engines/cpu.c \
                engines/mmap.c engines/sync.c engines/null.c engines/net.c \
-               memalign.c server.c client.c iolog.c
+               memalign.c server.c client.c iolog.c backend.c libfio.c flow.c \
+               endian_check.c fio_initialization.c
 
 ifeq ($(UNAME), Linux)
   SOURCE += diskutil.c fifo.c blktrace.c helpers.c cgroup.c trim.c \
@@ -56,12 +60,19 @@ ifeq ($(UNAME), Darwin)
   LIBS  += -lpthread -ldl
 endif
 ifneq (,$(findstring CYGWIN,$(UNAME)))
-  SOURCE += engines/windowsaio.c
-  LIBS  += -lpthread -lrt -lpsapi
-  CFLAGS += -DPSAPI_VERSION=1
+  SOURCE := $(filter-out engines/mmap.c,$(SOURCE))
+  SOURCE += engines/windowsaio.c os/windows/posix.c
+  LIBS  += -lpthread -lpsapi -lws2_32
+  CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format
+  CC     = x86_64-w64-mingw32-gcc
 endif
 
+FIO_SOURCE = $(SOURCE) fio.c
+GFIO_SOURCE = $(SOURCE) gfio.c
+
 OBJS = $(SOURCE:.c=.o)
+FIO_OBJS = $(OBJS) fio.o
+GFIO_OBJS = $(OBJS) gfio.o
 
 T_SMALLOC_OBJS = t/stest.o
 T_SMALLOC_OBJS += mutex.o smalloc.o t/log.o
@@ -84,7 +95,12 @@ endif
 INSTALL = install
 prefix = /usr/local
 bindir = $(prefix)/bin
+
+ifeq ($(UNAME), Darwin)
+mandir = /usr/share/man
+else
 mandir = $(prefix)/man
+endif
 
 all: .depend $(PROGS) $(SCRIPTS)
 
@@ -97,8 +113,8 @@ t/stest: $(T_SMALLOC_OBJS)
 t/ieee754: $(T_IEEE_OBJS)
        $(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_IEEE_OBJS) $(LIBS) $(LDFLAGS)
 
-fio: $(OBJS)
-       $(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(LDFLAGS)
+fio: $(FIO_OBJS)
+       $(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(FIO_OBJS) $(LIBS) $(LDFLAGS)
 
 .depend: $(SOURCE)
        $(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend
@@ -121,3 +137,9 @@ install: $(PROGS) $(SCRIPTS)
 ifneq ($(wildcard .depend),)
 include .depend
 endif
+
+gfio:  $(OBJS) gfio.c
+       $(CC) ${CPPFLAGS} ${CFLAGS} ${GTKCFLAGS} ${LDFLAGS} ${GTKLDFLAGS} -pthread -o gfio $(OBJS) gfio.c $(LIBS) ${LDFLAGS}
+
+
+