ext4: verify unwritten extent conversion in buff-io
[xfstests-dev.git] / ltp / Makefile
1 # SPDX-License-Identifier: GPL-2.0
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 SCRIPTS = rwtest.sh
10 CFILES = $(TARGETS:=.c)
11 HFILES = doio.h
12 LDIRT = $(TARGETS)
13 LCFLAGS = -DXFS
14 LCFLAGS += -I$(TOPDIR)/src #Used for including $(TOPDIR)/src/global.h
15
16 ifeq ($(HAVE_ATTR_LIST), true)
17 LCFLAGS += -DHAVE_ATTR_LIST
18 LLDLIBS += $(LIBATTR)
19 endif
20
21 ifeq ($(HAVE_AIO), true)
22 TARGETS += aio-stress
23 LCFLAGS += -DAIO
24 LLDLIBS += -laio -lpthread
25 endif
26
27 ifeq ($(HAVE_URING), true)
28 LCFLAGS += -DURING
29 LLDLIBS += -luring
30 endif
31
32 ifeq ($(HAVE_LIBBTRFSUTIL), true)
33 LLDLIBS += -lbtrfsutil
34 endif
35
36 ifeq ($(HAVE_FALLOCATE), true)
37 LCFLAGS += -DFALLOCATE
38 endif
39
40 ifeq ($(HAVE_COPY_FILE_RANGE),yes)
41 LCFLAGS += -DHAVE_COPY_FILE_RANGE
42 endif
43
44 default: depend $(TARGETS)
45
46 depend: .dep
47
48 include $(BUILDRULES)
49
50 $(TARGETS): $(LIBTEST)
51         @echo "    [CC]    $@"
52         $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
53
54 install: default
55         $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/ltp
56         $(LTINSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/ltp
57         $(INSTALL) -m 755 $(SCRIPTS) $(PKG_LIB_DIR)/ltp
58
59 -include .dep