Revert "tools/fio_latency2csv.py: add tool that converts json+ to CSV"
[fio.git] / Makefile
CommitLineData
c61a3a44
JF
1ifeq ($(SRCDIR),)
2SRCDIR := .
3endif
4
5VPATH := $(SRCDIR)
6
67bf9823
JA
7ifneq ($(wildcard config-host.mak),)
8all:
9include config-host.mak
10config-host-mak: configure
11 @echo $@ is out-of-date, running configure
12 @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
13else
14config-host.mak:
d443abcf 15ifneq ($(MAKECMDGOALS),clean)
67bf9823
JA
16 @echo "Running configure for you..."
17 @./configure
d443abcf 18endif
67bf9823
JA
19all:
20include config-host.mak
21endif
22
0d60927f 23DEBUGFLAGS = -DFIO_INC_DEBUG
9195552e 24CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL $(DEBUGFLAGS)
61054f0d 25OPTFLAGS= -g -ffast-math
c61a3a44 26CFLAGS = -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS) -I. -I$(SRCDIR)
af4862b3
JA
27LIBS += -lm $(EXTLIBS)
28PROGS = fio
e6200d82 29SCRIPTS = $(addprefix $(SRCDIR)/,tools/fio_generate_plots tools/plot/fio2gnuplot tools/genfio tools/fiologparser.py tools/hist/fiologparser_hist.py)
af4862b3 30
61054f0d 31ifndef CONFIG_FIO_NO_OPT
0d60927f 32 CFLAGS += -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
61054f0d
JA
33endif
34
91f94d5b
JA
35ifdef CONFIG_GFIO
36 PROGS += gfio
37endif
38
984f30c9
JA
39SOURCE := $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)) \
40 $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/lib/*.c)) \
e2d53995 41 gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \
d015e398 42 eta.c verify.c memory.c io_u.c parse.c mutex.c options.c \
e2d53995 43 smalloc.c filehash.c profile.c debug.c engines/cpu.c \
d48a9799 44 engines/mmap.c engines/sync.c engines/null.c engines/net.c \
a467027e 45 engines/ftruncate.c \
e2d53995
JA
46 server.c client.c iolog.c backend.c libfio.c flow.c cconv.c \
47 gettime-thread.c helpers.c json.c idletime.c td_error.c \
aee2ab67 48 profiles/tiobench.c profiles/act.c io_u_queue.c filelock.c \
16e56d25
VF
49 workqueue.c rate-submit.c optgroup.c helper_thread.c \
50 steadystate.c
67bf9823 51
1b10477b
MM
52ifdef CONFIG_LIBHDFS
53 HDFSFLAGS= -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/linux -I $(FIO_LIBHDFS_INCLUDE)
247e5436 54 HDFSLIB= -Wl,-rpath $(JAVA_HOME)/jre/lib/$(FIO_HDFS_CPU)/server -L$(JAVA_HOME)/jre/lib/$(FIO_HDFS_CPU)/server -ljvm $(FIO_LIBHDFS_LIB)/libhdfs.a
1b10477b
MM
55 CFLAGS += $(HDFSFLAGS)
56 SOURCE += engines/libhdfs.c
57endif
58
c81f9347
BC
59ifdef CONFIG_64BIT_LLP64
60 CFLAGS += -DBITS_PER_LONG=32
61endif
67bf9823
JA
62ifdef CONFIG_64BIT
63 CFLAGS += -DBITS_PER_LONG=64
64endif
65ifdef CONFIG_32BIT
66 CFLAGS += -DBITS_PER_LONG=32
67endif
67bf9823 68ifdef CONFIG_LIBAIO
67bf9823
JA
69 SOURCE += engines/libaio.c
70endif
71ifdef CONFIG_RDMA
67bf9823
JA
72 SOURCE += engines/rdma.c
73endif
74ifdef CONFIG_POSIXAIO
67bf9823
JA
75 SOURCE += engines/posixaio.c
76endif
77ifdef CONFIG_LINUX_FALLOCATE
78 SOURCE += engines/falloc.c
79endif
80ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT
81 SOURCE += engines/e4defrag.c
82endif
83ifdef CONFIG_LINUX_SPLICE
67bf9823
JA
84 SOURCE += engines/splice.c
85endif
86ifdef CONFIG_GUASI
67bf9823
JA
87 SOURCE += engines/guasi.c
88endif
89ifdef CONFIG_FUSION_AW
67bf9823
JA
90 SOURCE += engines/fusion-aw.c
91endif
92ifdef CONFIG_SOLARISAIO
67bf9823
JA
93 SOURCE += engines/solarisaio.c
94endif
4700b234 95ifdef CONFIG_WINDOWSAIO
4700b234
JA
96 SOURCE += engines/windowsaio.c
97endif
fc5c0345
DG
98ifdef CONFIG_RBD
99 SOURCE += engines/rbd.c
100endif
67bf9823 101ifndef CONFIG_STRSEP
984f30c9 102 SOURCE += oslib/strsep.c
67bf9823 103endif
9ad8da82 104ifndef CONFIG_STRCASESTR
984f30c9 105 SOURCE += oslib/strcasestr.c
9ad8da82 106endif
5ad7be56 107ifndef CONFIG_STRLCAT
984f30c9 108 SOURCE += oslib/strlcat.c
5ad7be56 109endif
67bf9823 110ifndef CONFIG_GETOPT_LONG_ONLY
984f30c9 111 SOURCE += oslib/getopt_long.c
67bf9823 112endif
67bf9823 113ifndef CONFIG_INET_ATON
984f30c9 114 SOURCE += oslib/inet_aton.c
67bf9823 115endif
6e7d7dfb 116ifdef CONFIG_GFAPI
117 SOURCE += engines/glusterfs.c
cc47f094 118 SOURCE += engines/glusterfs_sync.c
119 SOURCE += engines/glusterfs_async.c
6fa14b99 120 ifdef CONFIG_GF_FADVISE
121 CFLAGS += "-DGFAPI_USE_FADVISE"
122 endif
6e7d7dfb 123endif
65fa28ca
DE
124ifdef CONFIG_MTD
125 SOURCE += engines/mtd.c
984f30c9
JA
126 SOURCE += oslib/libmtd.c
127 SOURCE += oslib/libmtd_legacy.c
65fa28ca 128endif
43f3cec2
BB
129ifdef CONFIG_PMEMBLK
130 SOURCE += engines/pmemblk.c
131endif
cbb15e42
DJ
132ifdef CONFIG_LINUX_DEVDAX
133 SOURCE += engines/dev-dax.c
134endif
d015e398 135
53cd4eee 136ifeq ($(CONFIG_TARGET_OS), Linux)
67bf9823 137 SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c engines/sg.c \
984f30c9 138 engines/binject.c oslib/linux-dev-lookup.c
67bf9823 139 LIBS += -lpthread -ldl
213a01b0 140 LDFLAGS += -rdynamic
d015e398 141endif
53cd4eee 142ifeq ($(CONFIG_TARGET_OS), Android)
40bafa33 143 SOURCE += diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c \
984f30c9 144 oslib/linux-dev-lookup.c
ec5c6b12
AC
145 LIBS += -ldl
146 LDFLAGS += -rdynamic
ec5c6b12 147endif
53cd4eee 148ifeq ($(CONFIG_TARGET_OS), SunOS)
7366ad05 149 LIBS += -lpthread -ldl
d015e398
BC
150 CPPFLAGS += -D__EXTENSIONS__
151endif
53cd4eee 152ifeq ($(CONFIG_TARGET_OS), FreeBSD)
0bf31987 153 SOURCE += trim.c
d015e398 154 LIBS += -lpthread -lrt
213a01b0 155 LDFLAGS += -rdynamic
d015e398 156endif
3cd4c66f
J
157ifeq ($(CONFIG_TARGET_OS), OpenBSD)
158 LIBS += -lpthread
159 LDFLAGS += -rdynamic
160endif
53cd4eee 161ifeq ($(CONFIG_TARGET_OS), NetBSD)
d015e398 162 LIBS += -lpthread -lrt
213a01b0 163 LDFLAGS += -rdynamic
d015e398 164endif
239b2882 165ifeq ($(CONFIG_TARGET_OS), DragonFly)
c9a4e0c8 166 SOURCE += trim.c
239b2882
JA
167 LIBS += -lpthread -lrt
168 LDFLAGS += -rdynamic
169endif
53cd4eee 170ifeq ($(CONFIG_TARGET_OS), AIX)
d015e398 171 LIBS += -lpthread -ldl -lrt
d015e398 172 CPPFLAGS += -D_LARGE_FILES -D__ppc__
48b35be0 173 LDFLAGS += -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000
d015e398 174endif
53cd4eee 175ifeq ($(CONFIG_TARGET_OS), HP-UX)
b5ffb752 176 LIBS += -lpthread -ldl -lrt
67bf9823 177 CFLAGS += -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE_EXTENDED
c00a2289 178endif
53cd4eee 179ifeq ($(CONFIG_TARGET_OS), Darwin)
d015e398
BC
180 LIBS += -lpthread -ldl
181endif
53cd4eee 182ifneq (,$(findstring CYGWIN,$(CONFIG_TARGET_OS)))
4700b234 183 SOURCE += os/windows/posix.c
93bcfd20 184 LIBS += -lpthread -lpsapi -lws2_32
9aa5fe32 185 CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format -static
d015e398
BC
186endif
187
c61a3a44 188OBJS := $(SOURCE:.c=.o)
90b7a96d 189
8232e285 190FIO_OBJS = $(OBJS) fio.o
b470a02c 191
7efff409
JA
192GFIO_OBJS = $(OBJS) gfio.o graph.o tickmarks.o ghelpers.o goptions.o gerror.o \
193 gclient.o gcompat.o cairo_text_helpers.o printing.o
194
b470a02c
SC
195ifdef CONFIG_ARITHMETIC
196FIO_OBJS += lex.yy.o y.tab.o
7efff409 197GFIO_OBJS += lex.yy.o y.tab.o
b470a02c
SC
198endif
199
f67d6ee2 200-include $(OBJS:.o=.d)
79d16311 201
61f78f3a 202T_SMALLOC_OBJS = t/stest.o
71471cb1 203T_SMALLOC_OBJS += gettime.o mutex.o smalloc.o t/log.o t/debug.o t/arch.o
61f78f3a
JA
204T_SMALLOC_PROGS = t/stest
205
206T_IEEE_OBJS = t/ieee754.o
84f43c6f 207T_IEEE_OBJS += lib/ieee754.o
61f78f3a
JA
208T_IEEE_PROGS = t/ieee754
209
6ff38856 210T_ZIPF_OBS = t/genzipf.o
2cac8fcb 211T_ZIPF_OBJS += t/log.o lib/ieee754.o lib/rand.o lib/pattern.o lib/zipf.o \
2c2c93d8 212 lib/strntol.o lib/gauss.o t/genzipf.o oslib/strcasestr.o
aa7bc282 213T_ZIPF_PROGS = t/fio-genzipf
6ff38856 214
ad1f90aa 215T_AXMAP_OBJS = t/axmap.o
ac569176 216T_AXMAP_OBJS += lib/lfsr.o lib/axmap.o
ad1f90aa
JA
217T_AXMAP_PROGS = t/axmap
218
7a887ffe 219T_LFSR_TEST_OBJS = t/lfsr-test.o
71471cb1 220T_LFSR_TEST_OBJS += lib/lfsr.o gettime.o t/log.o t/debug.o t/arch.o
7a887ffe
AP
221T_LFSR_TEST_PROGS = t/lfsr-test
222
323f2086 223T_GEN_RAND_OBJS = t/gen-rand.o
e91ba49a
JA
224T_GEN_RAND_OBJS += t/log.o t/debug.o lib/rand.o lib/pattern.o lib/strntol.o \
225 oslib/strcasestr.o
323f2086
JA
226T_GEN_RAND_PROGS = t/gen-rand
227
40bafa33
JA
228ifeq ($(CONFIG_TARGET_OS), Linux)
229T_BTRACE_FIO_OBJS = t/btrace2fio.o
984f30c9 230T_BTRACE_FIO_OBJS += fifo.o lib/flist_sort.o t/log.o oslib/linux-dev-lookup.o
aa7bc282 231T_BTRACE_FIO_PROGS = t/fio-btrace2fio
40bafa33
JA
232endif
233
bf481692
JA
234T_DEDUPE_OBJS = t/dedupe.o
235T_DEDUPE_OBJS += lib/rbtree.o t/log.o mutex.o smalloc.o gettime.o crc/md5.o \
71471cb1 236 lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o t/arch.o \
214e2d56 237 crc/murmur3.o crc/crc32c.o crc/crc32c-intel.o crc/crc32c-arm64.o crc/fnv.o
aa7bc282 238T_DEDUPE_PROGS = t/fio-dedupe
bf481692 239
214e2d56 240T_VS_OBJS = t/verify-state.o t/log.o crc/crc32c.o crc/crc32c-intel.o crc/crc32c-arm64.o t/debug.o
98996ef9
JA
241T_VS_PROGS = t/fio-verify-state
242
6d5a9bc2
JA
243T_PIPE_ASYNC_OBJS = t/read-to-pipe-async.o
244T_PIPE_ASYNC_PROGS = t/read-to-pipe-async
245
ae46d0f5
JA
246T_MEMLOCK_OBJS = t/memlock.o
247T_MEMLOCK_PROGS = t/memlock
248
61f78f3a
JA
249T_OBJS = $(T_SMALLOC_OBJS)
250T_OBJS += $(T_IEEE_OBJS)
6ff38856 251T_OBJS += $(T_ZIPF_OBJS)
ad1f90aa 252T_OBJS += $(T_AXMAP_OBJS)
7a887ffe 253T_OBJS += $(T_LFSR_TEST_OBJS)
323f2086 254T_OBJS += $(T_GEN_RAND_OBJS)
40bafa33 255T_OBJS += $(T_BTRACE_FIO_OBJS)
e5bf5a88 256T_OBJS += $(T_DEDUPE_OBJS)
98996ef9 257T_OBJS += $(T_VS_OBJS)
6d5a9bc2 258T_OBJS += $(T_PIPE_ASYNC_OBJS)
ae46d0f5 259T_OBJS += $(T_MEMLOCK_OBJS)
6ff38856 260
824d6ff4
BC
261ifneq (,$(findstring CYGWIN,$(CONFIG_TARGET_OS)))
262 T_DEDUPE_OBJS += os/windows/posix.o lib/hweight.o
263 T_SMALLOC_OBJS += os/windows/posix.o lib/hweight.o
264 T_LFSR_TEST_OBJS += os/windows/posix.o lib/hweight.o
265endif
266
aa7bc282
JA
267T_TEST_PROGS = $(T_SMALLOC_PROGS)
268T_TEST_PROGS += $(T_IEEE_PROGS)
6ff38856 269T_PROGS += $(T_ZIPF_PROGS)
aa7bc282
JA
270T_TEST_PROGS += $(T_AXMAP_PROGS)
271T_TEST_PROGS += $(T_LFSR_TEST_PROGS)
323f2086 272T_TEST_PROGS += $(T_GEN_RAND_PROGS)
40bafa33 273T_PROGS += $(T_BTRACE_FIO_PROGS)
e5bf5a88 274T_PROGS += $(T_DEDUPE_PROGS)
98996ef9 275T_PROGS += $(T_VS_PROGS)
e5bf5a88
JA
276
277PROGS += $(T_PROGS)
3427207d 278
4c3ecec4
JA
279ifneq ($(findstring $(MAKEFLAGS),s),s)
280ifndef V
281 QUIET_CC = @echo ' ' CC $@;
79816cf7
JA
282 QUIET_LINK = @echo ' ' LINK $@;
283 QUIET_DEP = @echo ' ' DEP $@;
284 QUIET_YACC = @echo ' ' YACC $@;
285 QUIET_LEX = @echo ' ' LEX $@;
4c3ecec4
JA
286endif
287endif
288
a8168a22
JA
289ifeq ($(CONFIG_TARGET_OS), SunOS)
290 INSTALL = ginstall
291else
292 INSTALL = install
293endif
020d54bd 294prefix = $(INSTALL_PREFIX)
c1d5725e 295bindir = $(prefix)/bin
bcdf7c58 296
53cd4eee 297ifeq ($(CONFIG_TARGET_OS), Darwin)
bcdf7c58 298mandir = /usr/share/man
eab4af4e 299sharedir = /usr/share/fio
bcdf7c58 300else
d60e92d1 301mandir = $(prefix)/man
eab4af4e 302sharedir = $(prefix)/share/fio
bcdf7c58 303endif
c1d5725e 304
aa7bc282 305all: $(PROGS) $(T_TEST_PROGS) $(SCRIPTS) FORCE
f84622e9 306
92ddd6b6 307.PHONY: all install clean test
3d43382c
JA
308.PHONY: FORCE cscope
309
310FIO-VERSION-FILE: FORCE
c61a3a44 311 @$(SHELL) $(SRCDIR)/FIO-VERSION-GEN
3d43382c
JA
312-include FIO-VERSION-FILE
313
7496ea3e 314override CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"'
3d43382c 315
9e85c34e 316%.o : %.c
c61a3a44 317 @mkdir -p $(dir $@)
4feafb1e 318 $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
c61a3a44 319 @$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SRCDIR)/$*.c > $*.d
f67d6ee2
JA
320 @mv -f $*.d $*.d.tmp
321 @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
e291cff1 322 @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \
f67d6ee2
JA
323 sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
324 @rm -f $*.d.tmp
e52947d1 325
b470a02c 326ifdef CONFIG_ARITHMETIC
79816cf7 327lex.yy.c: exp/expression-parser.l
63bda378 328ifdef CONFIG_LEX_USE_O
c61a3a44 329 $(QUIET_LEX)$(LEX) -o $@ $<
63bda378
JA
330else
331 $(QUIET_LEX)$(LEX) $<
332endif
79816cf7 333
b470a02c
SC
334lex.yy.o: lex.yy.c y.tab.h
335 $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
336
337y.tab.o: y.tab.c y.tab.h
338 $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
339
340y.tab.c: exp/expression-parser.y
c61a3a44 341 $(QUIET_YACC)$(YACC) -o $@ -l -d -b y $<
b470a02c 342
dc68fd2c 343y.tab.h: y.tab.c
b470a02c 344
c9fa1c8d
SC
345lexer.h: lex.yy.c
346
c879ba67
JA
347exp/test-expression-parser.o: exp/test-expression-parser.c
348 $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
349exp/test-expression-parser: exp/test-expression-parser.o
350 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) $< y.tab.o lex.yy.o -o $@ $(LIBS)
351
b470a02c
SC
352parse.o: lex.yy.o y.tab.o
353endif
354
c61a3a44 355init.o: init.c FIO-VERSION-FILE
6a6b11f4 356 @mkdir -p $(dir $@)
c61a3a44 357 $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
6a6b11f4
JA
358 @$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SRCDIR)/$*.c > $*.d
359 @mv -f $*.d $*.d.tmp
360 @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
e291cff1 361 @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \
6a6b11f4
JA
362 sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
363 @rm -f $*.d.tmp
32d4cc61 364
f762cef9 365gcompat.o: gcompat.c gcompat.h
c61a3a44 366 $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<
f762cef9 367
9af4a244 368goptions.o: goptions.c goptions.h
c61a3a44 369 $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<
9af4a244 370
53e0e85d 371ghelpers.o: ghelpers.c ghelpers.h
c61a3a44 372 $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<
53e0e85d 373
41666588 374gerror.o: gerror.c gerror.h
c61a3a44 375 $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<
41666588 376
1252d8f2 377gclient.o: gclient.c gclient.h
c61a3a44 378 $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<
1252d8f2 379
53e0e85d 380gfio.o: gfio.c ghelpers.c
c61a3a44 381 $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<
70d07ce1 382
53e0e85d 383graph.o: graph.c graph.h
c61a3a44 384 $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<
af58ef32 385
ee2f55b2 386cairo_text_helpers.o: cairo_text_helpers.c cairo_text_helpers.h
c61a3a44 387 $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<
ee2f55b2 388
bf3f7027 389printing.o: printing.c printing.h
c61a3a44 390 $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<
bf3f7027 391
6d5a9bc2
JA
392t/read-to-pipe-async: $(T_PIPE_ASYNC_OBJS)
393 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_PIPE_ASYNC_OBJS) $(LIBS)
394
ae46d0f5
JA
395t/memlock: $(T_MEMLOCK_OBJS)
396 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_MEMLOCK_OBJS) $(LIBS)
397
61f78f3a 398t/stest: $(T_SMALLOC_OBJS)
a3c86fc4 399 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_SMALLOC_OBJS) $(LIBS)
61f78f3a
JA
400
401t/ieee754: $(T_IEEE_OBJS)
a3c86fc4 402 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_IEEE_OBJS) $(LIBS)
fbc2792b 403
33765372 404fio: $(FIO_OBJS)
b492fa32 405 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(FIO_OBJS) $(LIBS) $(HDFSLIB)
4c3ecec4 406
70d07ce1 407gfio: $(GFIO_OBJS)
1527dc50 408 $(QUIET_LINK)$(CC) $(filter-out -static, $(LDFLAGS)) -o gfio $(GFIO_OBJS) $(LIBS) $(GFIO_LIBS) $(GTK_LDFLAGS) $(HDFSLIB)
70d07ce1 409
aa7bc282 410t/fio-genzipf: $(T_ZIPF_OBJS)
a3c86fc4 411 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_ZIPF_OBJS) $(LIBS)
6ff38856 412
ad1f90aa 413t/axmap: $(T_AXMAP_OBJS)
a3c86fc4 414 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_AXMAP_OBJS) $(LIBS)
ad1f90aa 415
7a887ffe 416t/lfsr-test: $(T_LFSR_TEST_OBJS)
a3c86fc4 417 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_LFSR_TEST_OBJS) $(LIBS)
7a887ffe 418
323f2086
JA
419t/gen-rand: $(T_GEN_RAND_OBJS)
420 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_GEN_RAND_OBJS) $(LIBS)
421
40bafa33 422ifeq ($(CONFIG_TARGET_OS), Linux)
aa7bc282 423t/fio-btrace2fio: $(T_BTRACE_FIO_OBJS)
40bafa33
JA
424 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_BTRACE_FIO_OBJS) $(LIBS)
425endif
426
aa7bc282 427t/fio-dedupe: $(T_DEDUPE_OBJS)
bf481692
JA
428 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_DEDUPE_OBJS) $(LIBS)
429
98996ef9
JA
430t/fio-verify-state: $(T_VS_OBJS)
431 $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_VS_OBJS) $(LIBS)
432
3d43382c 433clean: FORCE
b9c8a72a 434 @rm -f .depend $(FIO_OBJS) $(GFIO_OBJS) $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) $(T_TEST_PROGS) core.* core gfio FIO-VERSION-FILE *.d lib/*.d oslib/*.d crc/*.d engines/*.d profiles/*.d t/*.d config-host.mak config-host.h y.tab.[ch] lex.yy.c exp/*.[do] lexer.h
0b422574 435 @rm -rf doc/output
45f944b9
JA
436
437distclean: clean FORCE
d1f6fcad 438 @rm -f cscope.out fio.pdf fio_generate_plots.pdf fio2gnuplot.pdf fiologparser_hist.pdf
ebac4655 439
592ef98a 440cscope:
366badd3 441 @cscope -b -R
592ef98a 442
1378cc68
EV
443tools/plot/fio2gnuplot.1:
444 @cat tools/plot/fio2gnuplot.manpage | txt2man -t fio2gnuplot > tools/plot/fio2gnuplot.1
445
7788b76f
JA
446doc: tools/plot/fio2gnuplot.1
447 @man -t ./fio.1 | ps2pdf - fio.pdf
448 @man -t tools/fio_generate_plots.1 | ps2pdf - fio_generate_plots.pdf
449 @man -t tools/plot/fio2gnuplot.1 | ps2pdf - fio2gnuplot.pdf
d1f6fcad 450 @man -t tools/hist/fiologparser_hist.py.1 | ps2pdf - fiologparser_hist.pdf
7788b76f 451
92ddd6b6 452test: fio
e9bd687d 453 ./fio --minimal --thread --ioengine=null --runtime=1s --name=nulltest --rw=randrw --iodepth=2 --norandommap --random_generator=tausworthe64 --size=16T --name=verifynulltest --rw=write --verify=crc32c --verify_state_save=0 --size=100M
3894b8e1 454
1378cc68 455install: $(PROGS) $(SCRIPTS) tools/plot/fio2gnuplot.1 FORCE
513ba3f7 456 $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
ebac4655 457 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
d60e92d1 458 $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
c61a3a44
JF
459 $(INSTALL) -m 644 $(SRCDIR)/fio.1 $(DESTDIR)$(mandir)/man1
460 $(INSTALL) -m 644 $(SRCDIR)/tools/fio_generate_plots.1 $(DESTDIR)$(mandir)/man1
461 $(INSTALL) -m 644 $(SRCDIR)/tools/plot/fio2gnuplot.1 $(DESTDIR)$(mandir)/man1
d1f6fcad 462 $(INSTALL) -m 644 $(SRCDIR)/tools/hist/fiologparser_hist.py.1 $(DESTDIR)$(mandir)/man1
eab4af4e 463 $(INSTALL) -m 755 -d $(DESTDIR)$(sharedir)
c61a3a44 464 $(INSTALL) -m 644 $(SRCDIR)/tools/plot/*gpm $(DESTDIR)$(sharedir)/