-CC = gcc
+CC ?= gcc
DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
CPPFLAGS= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
$(DEBUGFLAGS)
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 backend.c libfio.c flow.c
+ memalign.c server.c client.c iolog.c backend.c libfio.c flow.c json.c
ifeq ($(UNAME), Linux)
SOURCE += diskutil.c fifo.c blktrace.c helpers.c cgroup.c trim.c \
LIBS += -lpthread -lpsapi -lws2_32
CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format
CC = x86_64-w64-mingw32-gcc
+ #CC = i686-w64-mingw32-gcc
endif
OBJS = $(SOURCE:.c=.o)
.PHONY: FORCE cscope
FIO-VERSION-FILE: FORCE
- @$(SHELL_PATH) ./FIO-VERSION-GEN
+ @$(SHELL) ./FIO-VERSION-GEN
-include FIO-VERSION-FILE
CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"'
.c.o: .depend FORCE
$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $<
+init.o: FIO-VERSION-FILE
+ $(QUIET_CC)$(CC) -o init.o -c $(CFLAGS) $(CPPFLAGS) -c init.c
+
t/stest: $(T_SMALLOC_OBJS)
$(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_SMALLOC_OBJS) $(LIBS) $(LDFLAGS)
.depend: $(SOURCE)
$(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend
-$(PROGS): .depend FORCE
+$(PROGS): .depend
clean: FORCE
-rm -f .depend $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core FIO-VERSION-FILE