Add fallocate calls to fsx
[xfstests-dev.git] / ltp / Makefile
1 #
2 # Copyright (c) 2003-2005 Silicon Graphics, Inc.  All Rights Reserved.
3 #
4
5 TOPDIR = ..
6 include $(TOPDIR)/include/builddefs
7
8 TARGETS = doio fsstress fsx growfiles iogen
9 CFILES = $(TARGETS:=.c)
10 HFILES = doio.h
11 LDIRT = $(TARGETS)
12 LCFLAGS = -DXFS
13 LCFLAGS += -I$(TOPDIR)/src #Used for including $(TOPDIR)/src/global.h
14
15 ifeq ($(HAVE_ATTR_LIST), true)
16 LCFLAGS += -DHAVE_ATTR_LIST
17 LLDLIBS += $(LIBATTR)
18 endif
19 ifeq ($(PKG_PLATFORM),irix)
20 LCFLAGS += -DHAVE_ATTR_LIST
21 LLDLIBS += $(LIBATTR)
22 endif
23
24 ifeq ($(HAVE_AIO), true)
25 TARGETS += aio-stress
26 LCFLAGS += -DAIO
27 LLDLIBS += -laio -lpthread
28 endif
29
30 ifeq ($(HAVE_FALLOCATE), true)
31 LCFLAGS += -DFALLOCATE
32 endif
33
34 default: depend $(TARGETS)
35
36 include $(BUILDRULES)
37
38 $(TARGETS): $(LIBTEST)
39         @echo "    [CC]    $@"
40         $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
41
42 install: default
43         $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/ltp
44         $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/ltp
45
46 -include .dep