Filename must be parsed after directory option
[fio.git] / Makefile.solaris
1 CC      = gcc
2 CFLAGS  = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INC_DEBUG
3 PROGS   = fio
4 SCRIPTS = fio_generate_plots
5 OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o filesetup.o \
6         eta.o verify.o memory.o io_u.o parse.o mutex.o options.o \
7         rbtree.o fifo.o smalloc.o filehash.o lib/strsep.o
8
9 OBJS += crc/crc7.o
10 OBJS += crc/crc16.o
11 OBJS += crc/crc32.o
12 OBJS += crc/crc32c.o
13 OBJS += crc/crc32c-intel.o
14 OBJS += crc/crc64.o
15 OBJS += crc/sha256.o
16 OBJS += crc/sha512.o
17 OBJS += crc/md5.o
18
19 OBJS += engines/cpu.o
20 OBJS += engines/mmap.o
21 OBJS += engines/posixaio.o
22 OBJS += engines/sync.o
23 OBJS += engines/null.o
24 OBJS += engines/net.o
25 OBJS += engines/solarisaio.o
26
27 INSTALL = install
28 prefix = /usr/local
29 bindir = $(prefix)/bin
30 mandir = $(prefix)/man
31
32 %.o: %.c
33         $(CC) -o $*.o -c $(CFLAGS) $<
34 fio: $(OBJS)
35         $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt -lnsl -lsocket
36
37 all: $(PROGS) $(SCRIPTS)
38
39 clean:
40         -rm -f .depend cscope.out $(OBJS) $(PROGS) core.* core
41
42 cscope:
43         @cscope -b
44
45 install: $(PROGS) $(SCRIPTS)
46         $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
47         $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)