Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio
[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 helpers.o solaris.o \
8         profile.o debug.o
9
10 OBJS += lib/rand.o
11
12 OBJS += crc/crc7.o
13 OBJS += crc/crc16.o
14 OBJS += crc/crc32.o
15 OBJS += crc/crc32c.o
16 OBJS += crc/crc32c-intel.o
17 OBJS += crc/crc64.o
18 OBJS += crc/sha1.o
19 OBJS += crc/sha256.o
20 OBJS += crc/sha512.o
21 OBJS += crc/md5.o
22
23 OBJS += engines/cpu.o
24 OBJS += engines/mmap.o
25 OBJS += engines/posixaio.o
26 OBJS += engines/sync.o
27 OBJS += engines/null.o
28 OBJS += engines/net.o
29 OBJS += engines/solarisaio.o
30
31 INSTALL = install
32 prefix = /usr/local
33 bindir = $(prefix)/bin
34 mandir = $(prefix)/man
35
36 %.o: %.c
37         $(CC) -o $*.o -c $(CFLAGS) $<
38 fio: $(OBJS)
39         $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt -lnsl -lsocket
40
41 all: $(PROGS) $(SCRIPTS)
42
43 clean:
44         -rm -f .depend cscope.out $(OBJS) $(PROGS) core.* core
45
46 cscope:
47         @cscope -b
48
49 install: $(PROGS) $(SCRIPTS)
50         $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
51         $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)