Jens Axboe | 79e48f7 | 2008-02-01 20:37:09 +0100 | [diff] [blame] | 1 | DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG |
Jens Axboe | 44404c5 | 2013-01-24 14:20:09 -0700 | [diff] [blame] | 2 | CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS) |
Jens Axboe | b14c9ed | 2013-01-08 13:41:35 +0100 | [diff] [blame] | 3 | OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS) |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 4 | CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS) |
Yufei Ren | b6cf38f | 2011-08-02 12:15:30 +0200 | [diff] [blame] | 5 | LIBS = -lm $(EXTLIBS) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 6 | PROGS = fio |
| 7 | SCRIPTS = fio_generate_plots |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 8 | UNAME := $(shell uname) |
| 9 | |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 10 | ifneq ($(wildcard config-host.mak),) |
| 11 | all: |
| 12 | include config-host.mak |
| 13 | config-host-mak: configure |
| 14 | @echo $@ is out-of-date, running configure |
| 15 | @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh |
| 16 | else |
| 17 | config-host.mak: |
| 18 | @echo "Running configure for you..." |
| 19 | @./configure |
| 20 | all: |
| 21 | include config-host.mak |
| 22 | endif |
| 23 | |
Bruce Cran | 93bcfd2 | 2012-02-20 20:18:19 +0100 | [diff] [blame] | 24 | SOURCE := gettime.c fio.c ioengines.c init.c stat.c log.c time.c filesetup.c \ |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 25 | eta.c verify.c memory.c io_u.c parse.c mutex.c options.c \ |
| 26 | rbtree.c smalloc.c filehash.c profile.c debug.c lib/rand.c \ |
Jens Axboe | c7c6cb4 | 2011-10-13 14:12:40 +0200 | [diff] [blame] | 27 | lib/num2str.c lib/ieee754.c $(wildcard crc/*.c) engines/cpu.c \ |
Jens Axboe | d48a979 | 2011-07-09 08:54:26 +0200 | [diff] [blame] | 28 | engines/mmap.c engines/sync.c engines/null.c engines/net.c \ |
Jens Axboe | 62cb17d | 2012-09-19 21:36:18 +0200 | [diff] [blame] | 29 | memalign.c server.c client.c iolog.c backend.c libfio.c flow.c \ |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 30 | json.c lib/zipf.c lib/axmap.c lib/lfsr.c gettime-thread.c \ |
Jens Axboe | 44404c5 | 2013-01-24 14:20:09 -0700 | [diff] [blame] | 31 | helpers.c lib/flist_sort.c lib/hweight.c lib/getrusage.c |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 32 | |
Bruce Cran | c81f934 | 2013-01-13 17:09:22 +0000 | [diff] [blame] | 33 | ifdef CONFIG_64BIT_LLP64 |
| 34 | CFLAGS += -DBITS_PER_LONG=32 |
| 35 | endif |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 36 | ifdef CONFIG_64BIT |
| 37 | CFLAGS += -DBITS_PER_LONG=64 |
| 38 | endif |
| 39 | ifdef CONFIG_32BIT |
| 40 | CFLAGS += -DBITS_PER_LONG=32 |
| 41 | endif |
Jens Axboe | 0dcebdf | 2013-01-23 15:42:16 -0700 | [diff] [blame] | 42 | ifdef CONFIG_BIG_ENDIAN |
| 43 | CFLAGS += -DCONFIG_BIG_ENDIAN |
| 44 | endif |
| 45 | ifdef CONFIG_LITTLE_ENDIAN |
| 46 | CFLAGS += -DCONFIG_LITTLE_ENDIAN |
| 47 | endif |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 48 | ifdef CONFIG_LIBAIO |
| 49 | CFLAGS += -DCONFIG_LIBAIO |
| 50 | SOURCE += engines/libaio.c |
| 51 | endif |
| 52 | ifdef CONFIG_RDMA |
| 53 | CFLAGS += -DCONFIG_RDMA |
| 54 | SOURCE += engines/rdma.c |
| 55 | endif |
| 56 | ifdef CONFIG_POSIXAIO |
| 57 | CFLAGS += -DCONFIG_POSIXAIO |
| 58 | SOURCE += engines/posixaio.c |
| 59 | endif |
| 60 | ifdef CONFIG_LINUX_FALLOCATE |
| 61 | SOURCE += engines/falloc.c |
| 62 | endif |
| 63 | ifdef CONFIG_LINUX_EXT4_MOVE_EXTENT |
Jens Axboe | 997843c | 2013-01-24 15:27:40 -0700 | [diff] [blame] | 64 | CFLAGS += -DCONFIG_LINUX_EXT4_MOVE_EXTENT |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 65 | SOURCE += engines/e4defrag.c |
| 66 | endif |
| 67 | ifdef CONFIG_LINUX_SPLICE |
| 68 | CFLAGS += -DCONFIG_LINUX_SPLICE |
| 69 | SOURCE += engines/splice.c |
| 70 | endif |
| 71 | ifdef CONFIG_GUASI |
| 72 | CFLAGS += -DCONFIG_GUASI |
| 73 | SOURCE += engines/guasi.c |
| 74 | endif |
| 75 | ifdef CONFIG_FUSION_AW |
| 76 | CFLAGS += -DCONFIG_FUSION_AW |
| 77 | SOURCE += engines/fusion-aw.c |
| 78 | endif |
| 79 | ifdef CONFIG_SOLARISAIO |
| 80 | CFLAGS += -DCONFIG_SOLARISAIO |
| 81 | SOURCE += engines/solarisaio.c |
| 82 | endif |
Jens Axboe | 4700b23 | 2013-01-24 15:33:33 -0700 | [diff] [blame] | 83 | ifdef CONFIG_WINDOWSAIO |
| 84 | CFLAGS += -DCONFIG_WINDOWSAIO |
| 85 | SOURCE += engines/windowsaio.c |
| 86 | endif |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 87 | |
| 88 | ifndef CONFIG_STRSEP |
| 89 | CFLAGS += -DCONFIG_STRSEP |
| 90 | SOURCE += lib/strsep.c |
| 91 | endif |
| 92 | ifndef CONFIG_GETOPT_LONG_ONLY |
| 93 | CFLAGS += -DCONFIG_GETOPT_LONG_ONLY |
| 94 | SOURCE += lib/getopt_long.c |
| 95 | endif |
| 96 | |
| 97 | ifndef CONFIG_INET_ATON |
| 98 | CFLAGS += -DCONFIG_INET_ATON |
| 99 | SOURCE += lib/inet_aton.c |
| 100 | endif |
| 101 | ifdef CONFIG_CLOCK_GETTIME |
| 102 | CFLAGS += -DCONFIG_CLOCK_GETTIME |
| 103 | endif |
| 104 | ifdef CONFIG_POSIXAIO_FSYNC |
| 105 | CFLAGS += -DCONFIG_POSIXAIO_FSYNC |
| 106 | endif |
| 107 | ifdef CONFIG_FADVISE |
| 108 | CFLAGS += -DCONFIG_FADVISE |
| 109 | endif |
| 110 | ifdef CONFIG_CLOCK_MONOTONIC |
| 111 | CFLAGS += -DCONFIG_CLOCK_MONOTONIC |
| 112 | endif |
| 113 | ifdef CONFIG_CLOCK_MONOTONIC_PRECISE |
| 114 | CFLAGS += -DCONFIG_CLOCK_MONOTONIC_PRECISE |
| 115 | endif |
| 116 | ifdef CONFIG_GETTIMEOFDAY |
| 117 | CFLAGS += -DCONFIG_GETTIMEOFDAY |
| 118 | endif |
| 119 | ifdef CONFIG_SOCKLEN_T |
| 120 | CFLAGS += -DCONFIG_SOCKLEN_T |
| 121 | endif |
| 122 | ifdef CONFIG_SFAA |
| 123 | CFLAGS += -DCONFIG_SFAA |
| 124 | endif |
| 125 | ifdef CONFIG_FDATASYNC |
| 126 | CFLAGS += -DCONFIG_FDATASYNC |
| 127 | endif |
| 128 | ifdef CONFIG_3ARG_AFFINITY |
| 129 | CFLAGS += -DCONFIG_3ARG_AFFINITY |
| 130 | endif |
| 131 | ifdef CONFIG_2ARG_AFFINITY |
| 132 | CFLAGS += -DCONFIG_2ARG_AFFINITY |
| 133 | endif |
| 134 | ifdef CONFIG_SYNC_FILE_RANGE |
| 135 | CFLAGS += -DCONFIG_SYNC_FILE_RANGE |
| 136 | endif |
| 137 | ifdef CONFIG_LIBNUMA |
| 138 | CFLAGS += -DCONFIG_LIBNUMA |
| 139 | endif |
| 140 | ifdef CONFIG_TLS_THREAD |
| 141 | CFLAGS += -DCONFIG_TLS_THREAD |
| 142 | endif |
Bruce Cran | c81f934 | 2013-01-13 17:09:22 +0000 | [diff] [blame] | 143 | ifdef CONFIG_POSIX_FALLOCATE |
| 144 | CFLAGS += -DCONFIG_POSIX_FALLOCATE |
| 145 | endif |
| 146 | ifdef CONFIG_LINUX_FALLOCATE |
| 147 | CFLAGS += -DCONFIG_LINUX_FALLOCATE |
| 148 | endif |
Jens Axboe | 44404c5 | 2013-01-24 14:20:09 -0700 | [diff] [blame] | 149 | ifdef CONFIG_RUSAGE_THREAD |
| 150 | CFLAGS += -DCONFIG_RUSAGE_THREAD |
| 151 | endif |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 152 | |
| 153 | ifeq ($(UNAME), Linux) |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 154 | SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c engines/sg.c \ |
| 155 | engines/binject.c profiles/tiobench.c |
| 156 | LIBS += -lpthread -ldl |
Jens Axboe | 213a01b | 2011-10-07 13:24:16 +0200 | [diff] [blame] | 157 | LDFLAGS += -rdynamic |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 158 | endif |
Aaron Carroll | ec5c6b1 | 2012-11-21 10:39:00 +0100 | [diff] [blame] | 159 | ifeq ($(UNAME), Android) |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 160 | SOURCE += diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c |
Aaron Carroll | ec5c6b1 | 2012-11-21 10:39:00 +0100 | [diff] [blame] | 161 | LIBS += -ldl |
| 162 | LDFLAGS += -rdynamic |
| 163 | CPPFLAGS += -DFIO_NO_HAVE_SHM_H |
| 164 | endif |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 165 | ifeq ($(UNAME), SunOS) |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 166 | LIBS += -lpthread -ldl -laio -lrt -lnsl -lsocket |
| 167 | CPPFLAGS += -D__EXTENSIONS__ |
| 168 | endif |
| 169 | ifeq ($(UNAME), FreeBSD) |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 170 | LIBS += -lpthread -lrt |
Jens Axboe | 213a01b | 2011-10-07 13:24:16 +0200 | [diff] [blame] | 171 | LDFLAGS += -rdynamic |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 172 | endif |
| 173 | ifeq ($(UNAME), NetBSD) |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 174 | LIBS += -lpthread -lrt |
Jens Axboe | 213a01b | 2011-10-07 13:24:16 +0200 | [diff] [blame] | 175 | LDFLAGS += -rdynamic |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 176 | endif |
| 177 | ifeq ($(UNAME), AIX) |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 178 | LIBS += -lpthread -ldl -lrt |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 179 | CPPFLAGS += -D_LARGE_FILES -D__ppc__ |
Michael Perzl | 48b35be | 2011-07-13 20:28:07 +0200 | [diff] [blame] | 180 | LDFLAGS += -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000 |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 181 | endif |
Jens Axboe | c00a228 | 2011-07-08 20:56:06 +0200 | [diff] [blame] | 182 | ifeq ($(UNAME), HP-UX) |
Jens Axboe | b5ffb75 | 2011-07-09 13:28:19 +0200 | [diff] [blame] | 183 | LIBS += -lpthread -ldl -lrt |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 184 | CFLAGS += -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE_EXTENDED |
Jens Axboe | c00a228 | 2011-07-08 20:56:06 +0200 | [diff] [blame] | 185 | endif |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 186 | ifeq ($(UNAME), Darwin) |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 187 | LIBS += -lpthread -ldl |
| 188 | endif |
| 189 | ifneq (,$(findstring CYGWIN,$(UNAME))) |
Bruce Cran | 93bcfd2 | 2012-02-20 20:18:19 +0100 | [diff] [blame] | 190 | SOURCE := $(filter-out engines/mmap.c,$(SOURCE)) |
Jens Axboe | 4700b23 | 2013-01-24 15:33:33 -0700 | [diff] [blame] | 191 | SOURCE += os/windows/posix.c |
Bruce Cran | 93bcfd2 | 2012-02-20 20:18:19 +0100 | [diff] [blame] | 192 | LIBS += -lpthread -lpsapi -lws2_32 |
| 193 | CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format |
Bruce Cran | d015e39 | 2011-01-28 08:39:09 +0100 | [diff] [blame] | 194 | endif |
| 195 | |
Bruce Cran | 9b83656 | 2011-01-08 19:49:54 +0100 | [diff] [blame] | 196 | OBJS = $(SOURCE:.c=.o) |
Jens Axboe | 79d1631 | 2010-03-04 12:43:20 +0100 | [diff] [blame] | 197 | |
Jens Axboe | 61f78f3 | 2011-10-05 10:25:54 +0200 | [diff] [blame] | 198 | T_SMALLOC_OBJS = t/stest.o |
Jens Axboe | 39ab7da | 2012-11-06 22:10:43 +0100 | [diff] [blame] | 199 | T_SMALLOC_OBJS += gettime.o mutex.o smalloc.o t/log.o |
Jens Axboe | 61f78f3 | 2011-10-05 10:25:54 +0200 | [diff] [blame] | 200 | T_SMALLOC_PROGS = t/stest |
| 201 | |
| 202 | T_IEEE_OBJS = t/ieee754.o |
Jens Axboe | f98f3d0 | 2012-11-06 21:54:30 +0100 | [diff] [blame] | 203 | T_IEEE_OBJS += lib/ieee754.o |
Jens Axboe | 61f78f3 | 2011-10-05 10:25:54 +0200 | [diff] [blame] | 204 | T_IEEE_PROGS = t/ieee754 |
| 205 | |
Jens Axboe | 6ff3885 | 2012-11-06 16:09:14 +0100 | [diff] [blame] | 206 | T_ZIPF_OBS = t/genzipf.o |
Jens Axboe | 24baa4c | 2012-11-12 20:54:12 -0700 | [diff] [blame] | 207 | T_ZIPF_OBJS += t/log.o lib/ieee754.o lib/rand.o lib/zipf.o t/genzipf.o |
Jens Axboe | eed3f51 | 2012-11-07 13:40:01 +0100 | [diff] [blame] | 208 | T_ZIPF_PROGS = t/genzipf |
Jens Axboe | 6ff3885 | 2012-11-06 16:09:14 +0100 | [diff] [blame] | 209 | |
Jens Axboe | ad1f90a | 2012-11-28 21:29:14 +0100 | [diff] [blame] | 210 | T_AXMAP_OBJS = t/axmap.o |
| 211 | T_AXMAP_OBJS += lib/lfsr.o lib/axmap.o |
| 212 | T_AXMAP_PROGS = t/axmap |
| 213 | |
Jens Axboe | 61f78f3 | 2011-10-05 10:25:54 +0200 | [diff] [blame] | 214 | T_OBJS = $(T_SMALLOC_OBJS) |
| 215 | T_OBJS += $(T_IEEE_OBJS) |
Jens Axboe | 6ff3885 | 2012-11-06 16:09:14 +0100 | [diff] [blame] | 216 | T_OBJS += $(T_ZIPF_OBJS) |
Jens Axboe | ad1f90a | 2012-11-28 21:29:14 +0100 | [diff] [blame] | 217 | T_OBJS += $(T_AXMAP_OBJS) |
Jens Axboe | 6ff3885 | 2012-11-06 16:09:14 +0100 | [diff] [blame] | 218 | |
| 219 | T_PROGS = $(T_SMALLOC_PROGS) |
| 220 | T_PROGS += $(T_IEEE_PROGS) |
| 221 | T_PROGS += $(T_ZIPF_PROGS) |
Jens Axboe | ad1f90a | 2012-11-28 21:29:14 +0100 | [diff] [blame] | 222 | T_PROGS += $(T_AXMAP_PROGS) |
Jens Axboe | 3427207 | 2011-08-16 10:01:03 +0200 | [diff] [blame] | 223 | |
Jens Axboe | 4c3ecec | 2008-03-01 16:20:13 +0100 | [diff] [blame] | 224 | ifneq ($(findstring $(MAKEFLAGS),s),s) |
| 225 | ifndef V |
| 226 | QUIET_CC = @echo ' ' CC $@; |
Jens Axboe | 0b2d6a7 | 2008-03-03 12:20:26 +0100 | [diff] [blame] | 227 | QUIET_DEP = @echo ' ' DEP $@; |
Jens Axboe | 4c3ecec | 2008-03-01 16:20:13 +0100 | [diff] [blame] | 228 | endif |
| 229 | endif |
| 230 | |
Jens Axboe | c1d5725 | 2006-10-09 19:56:04 +0200 | [diff] [blame] | 231 | INSTALL = install |
| 232 | prefix = /usr/local |
| 233 | bindir = $(prefix)/bin |
Jens Axboe | bcdf7c5 | 2012-02-08 14:19:27 +0100 | [diff] [blame] | 234 | |
| 235 | ifeq ($(UNAME), Darwin) |
| 236 | mandir = /usr/share/man |
| 237 | else |
Aaron Carroll | d60e92d | 2007-09-17 10:32:59 +0200 | [diff] [blame] | 238 | mandir = $(prefix)/man |
Jens Axboe | bcdf7c5 | 2012-02-08 14:19:27 +0100 | [diff] [blame] | 239 | endif |
Jens Axboe | c1d5725 | 2006-10-09 19:56:04 +0200 | [diff] [blame] | 240 | |
Jens Axboe | 692a5d2 | 2012-04-11 22:07:07 +0200 | [diff] [blame] | 241 | all: .depend $(PROGS) $(SCRIPTS) FORCE |
Michael Zappe | f84622e | 2011-06-01 20:15:18 +0200 | [diff] [blame] | 242 | |
Jens Axboe | 692a5d2 | 2012-04-11 22:07:07 +0200 | [diff] [blame] | 243 | .PHONY: all install clean |
| 244 | .PHONY: FORCE cscope |
| 245 | |
| 246 | FIO-VERSION-FILE: FORCE |
Bruce Cran | 84306c1 | 2012-04-16 19:33:03 +0200 | [diff] [blame] | 247 | @$(SHELL) ./FIO-VERSION-GEN |
Jens Axboe | 692a5d2 | 2012-04-11 22:07:07 +0200 | [diff] [blame] | 248 | -include FIO-VERSION-FILE |
| 249 | |
| 250 | CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"' |
| 251 | |
| 252 | .c.o: .depend FORCE |
Bruce Cran | 9b83656 | 2011-01-08 19:49:54 +0100 | [diff] [blame] | 253 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $< |
Diego Elio Pettenò | e52947d | 2011-03-21 20:13:53 +0100 | [diff] [blame] | 254 | |
Jens Axboe | a6204b6 | 2012-04-13 14:06:08 +0200 | [diff] [blame] | 255 | init.o: FIO-VERSION-FILE |
| 256 | $(QUIET_CC)$(CC) -o init.o -c $(CFLAGS) $(CPPFLAGS) -c init.c |
| 257 | |
Jens Axboe | 61f78f3 | 2011-10-05 10:25:54 +0200 | [diff] [blame] | 258 | t/stest: $(T_SMALLOC_OBJS) |
| 259 | $(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_SMALLOC_OBJS) $(LIBS) $(LDFLAGS) |
| 260 | |
| 261 | t/ieee754: $(T_IEEE_OBJS) |
| 262 | $(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_IEEE_OBJS) $(LIBS) $(LDFLAGS) |
Jens Axboe | fbc2792 | 2011-08-16 09:56:27 +0200 | [diff] [blame] | 263 | |
Jens Axboe | 6ff3885 | 2012-11-06 16:09:14 +0100 | [diff] [blame] | 264 | t/genzipf: $(T_ZIPF_OBJS) |
| 265 | $(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_ZIPF_OBJS) $(LIBS) $(LDFLAGS) |
| 266 | |
Jens Axboe | ad1f90a | 2012-11-28 21:29:14 +0100 | [diff] [blame] | 267 | t/axmap: $(T_AXMAP_OBJS) |
| 268 | $(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_AXMAP_OBJS) $(LIBS) $(LDFLAGS) |
| 269 | |
Jens Axboe | 2f9ade3 | 2006-10-20 11:25:52 +0200 | [diff] [blame] | 270 | fio: $(OBJS) |
Michael Perzl | 48b35be | 2011-07-13 20:28:07 +0200 | [diff] [blame] | 271 | $(QUIET_CC)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(LDFLAGS) |
Jens Axboe | 4c3ecec | 2008-03-01 16:20:13 +0100 | [diff] [blame] | 272 | |
Michael Zappe | f84622e | 2011-06-01 20:15:18 +0200 | [diff] [blame] | 273 | .depend: $(SOURCE) |
Bruce Cran | 9b83656 | 2011-01-08 19:49:54 +0100 | [diff] [blame] | 274 | $(QUIET_DEP)$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SOURCE) 1> .depend |
Jens Axboe | 0b2d6a7 | 2008-03-03 12:20:26 +0100 | [diff] [blame] | 275 | |
Jens Axboe | 8541f32 | 2012-04-11 22:24:19 +0200 | [diff] [blame] | 276 | $(PROGS): .depend |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 277 | |
Jens Axboe | 692a5d2 | 2012-04-11 22:07:07 +0200 | [diff] [blame] | 278 | clean: FORCE |
Jens Axboe | 67bf982 | 2013-01-10 11:23:19 +0100 | [diff] [blame] | 279 | -rm -f .depend $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core FIO-VERSION-FILE config-host.mak config-host.ld cscope.out |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 280 | |
Jens Axboe | 592ef98 | 2006-06-06 20:58:57 +0200 | [diff] [blame] | 281 | cscope: |
Jens Axboe | 366badd | 2010-07-19 16:18:35 -0600 | [diff] [blame] | 282 | @cscope -b -R |
Jens Axboe | 592ef98 | 2006-06-06 20:58:57 +0200 | [diff] [blame] | 283 | |
Jens Axboe | 692a5d2 | 2012-04-11 22:07:07 +0200 | [diff] [blame] | 284 | install: $(PROGS) $(SCRIPTS) FORCE |
Jens Axboe | 513ba3f | 2011-04-29 08:24:10 +0200 | [diff] [blame] | 285 | $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 286 | $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir) |
Aaron Carroll | d60e92d | 2007-09-17 10:32:59 +0200 | [diff] [blame] | 287 | $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 |
| 288 | $(INSTALL) -m 644 fio.1 $(DESTDIR)$(mandir)/man1 |
Jens Axboe | ccd4f41 | 2009-05-20 11:36:39 +0200 | [diff] [blame] | 289 | $(INSTALL) -m 644 fio_generate_plots.1 $(DESTDIR)$(mandir)/man1 |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 290 | |
Jens Axboe | 06fecb4 | 2008-03-03 12:22:19 +0100 | [diff] [blame] | 291 | ifneq ($(wildcard .depend),) |
| 292 | include .depend |
| 293 | endif |