btrfs: add test for zone auto reclaim
[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_AIO), true)
17 TARGETS += aio-stress
18 LCFLAGS += -DAIO
19 LLDLIBS += -laio -lpthread
20 endif
21
22 ifeq ($(HAVE_URING), true)
23 LCFLAGS += -DURING
24 LLDLIBS += -luring
25 endif
26
27 ifeq ($(HAVE_LIBBTRFSUTIL), true)
28 LLDLIBS += -lbtrfsutil
29 endif
30
31 ifeq ($(HAVE_FALLOCATE), true)
32 LCFLAGS += -DFALLOCATE
33 endif
34
35 ifeq ($(HAVE_COPY_FILE_RANGE),yes)
36 LCFLAGS += -DHAVE_COPY_FILE_RANGE
37 endif
38
39 default: depend $(TARGETS)
40
41 depend: .dep
42
43 include $(BUILDRULES)
44
45 $(TARGETS): $(LIBTEST)
46         @echo "    [CC]    $@"
47         $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
48
49 install: default
50         $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/ltp
51         $(LTINSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/ltp
52         $(INSTALL) -m 755 $(SCRIPTS) $(PKG_LIB_DIR)/ltp
53
54 -include .dep