pshared.c options.c \
smalloc.c filehash.c profile.c debug.c engines/cpu.c \
engines/mmap.c engines/sync.c engines/null.c engines/net.c \
- engines/ftruncate.c engines/filecreate.c \
+ engines/ftruncate.c engines/filecreate.c engines/filestat.c \
server.c client.c iolog.c backend.c libfio.c flow.c cconv.c \
gettime-thread.c helpers.c json.c idletime.c td_error.c \
profiles/tiobench.c profiles/act.c io_u_queue.c filelock.c \
LIBS += -lpthread -ldl
endif
ifneq (,$(findstring CYGWIN,$(CONFIG_TARGET_OS)))
- SOURCE += os/windows/posix.c
+ SOURCE += os/windows/cpu-affinity.c os/windows/posix.c
+ WINDOWS_OBJS = os/windows/cpu-affinity.o os/windows/posix.o lib/hweight.o
LIBS += -lpthread -lpsapi -lws2_32 -lssp
CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format
endif
T_OBJS += $(T_IOU_RING_OBJS)
ifneq (,$(findstring CYGWIN,$(CONFIG_TARGET_OS)))
- T_DEDUPE_OBJS += os/windows/posix.o lib/hweight.o
- T_SMALLOC_OBJS += os/windows/posix.o lib/hweight.o
- T_LFSR_TEST_OBJS += os/windows/posix.o lib/hweight.o
+ T_DEDUPE_OBJS += $(WINDOWS_OBJS)
+ T_SMALLOC_OBJS += $(WINDOWS_OBJS)
+ T_LFSR_TEST_OBJS += $(WINDOWS_OBJS)
endif
T_TEST_PROGS = $(T_SMALLOC_PROGS)
@$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SRCDIR)/$*.c > $*.d
@mv -f $*.d $*.d.tmp
@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
-ifeq ($(CONFIG_TARGET_OS), NetBSD)
- @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | tr -cs "[:graph:]" "\n" | \
- sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d
-else
- @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \
- sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
-endif
+ @if type -p fmt >/dev/null 2>&1; then \
+ sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \
+ sed -e 's/^ *//' -e 's/$$/:/' >> $*.d; \
+ else \
+ sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | \
+ tr -cs "[:graph:]" "\n" | \
+ sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d; \
+ fi
@rm -f $*.d.tmp
ifdef CONFIG_ARITHMETIC