Make it work on opensolaris
[fio.git] / Makefile.solaris
... / ...
CommitLineData
1CC = gcc
2CFLAGS = -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INC_DEBUG
3PROGS = fio
4SCRIPTS = fio_generate_plots
5OBJS = 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
8
9OBJS += crc/crc7.o
10OBJS += crc/crc16.o
11OBJS += crc/crc32.o
12OBJS += crc/crc64.o
13OBJS += crc/sha256.o
14OBJS += crc/sha512.o
15OBJS += crc/md5.o
16
17OBJS += engines/cpu.o
18OBJS += engines/mmap.o
19OBJS += engines/posixaio.o
20OBJS += engines/sync.o
21OBJS += engines/null.o
22OBJS += engines/net.o
23
24OBJS += lib/strsep.o
25
26INSTALL = install
27prefix = /usr/local
28bindir = $(prefix)/bin
29mandir = $(prefix)/man
30
31%.o: %.c
32 $(CC) -o $*.o -c $(CFLAGS) $<
33fio: $(OBJS)
34 $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTLIBS) -lpthread -lm -ldl -laio -lrt -lnsl -lsocket
35
36all: $(PROGS) $(SCRIPTS)
37
38clean:
39 -rm -f *.o .depend cscope.out $(PROGS) engines/*.o crc/*.o lib/*.o core.* core
40
41cscope:
42 @cscope -b
43
44install: $(PROGS) $(SCRIPTS)
45 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
46 $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)