generic/631: Add a check for extended attributes
[xfstests-dev.git] / src / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5
6 TOPDIR = ..
7 include $(TOPDIR)/include/builddefs
8
9 TARGETS = dirstress fill fill2 getpagesize holes lstat64 \
10         nametest permname randholes runas truncfile usemem \
11         mmapcat append_reader append_writer dirperf metaperf \
12         devzero feature alloc fault fstest t_access_root \
13         godown resvtest writemod writev_on_pagefault makeextents itrash rename \
14         multi_open_unlink unwritten_sync genhashnames t_holes \
15         t_mmap_writev t_truncate_cmtime dirhash_collide t_rename_overwrite \
16         holetest t_truncate_self af_unix t_mmap_stale_pmd \
17         t_mmap_cow_race t_mmap_fallocate fsync-err t_mmap_write_ro \
18         t_ext4_dax_journal_corruption t_ext4_dax_inline_corruption \
19         t_ofd_locks t_mmap_collision mmap-write-concurrent \
20         t_get_file_time t_create_short_dirs t_create_long_dirs t_enospc
21
22 LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
23         preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \
24         locktest unwritten_mmap bulkstat_unlink_test deduperace \
25         bulkstat_unlink_test_modified t_dir_offset t_futimens t_immutable \
26         stale_handle pwrite_mmap_blocked t_dir_offset2 seek_sanity_test \
27         seek_copy_test t_readdir_1 t_readdir_2 fsync-tester nsexec cloner \
28         renameat2 t_getcwd e4compact test-nextquota punch-alternating \
29         attr-list-by-handle-cursor-test listxattr dio-interleaved t_dir_type \
30         dio-invalidate-cache stat_test t_encrypted_d_revalidate \
31         attr_replace_test swapon mkswap t_attr_corruption t_open_tmpfiles \
32         fscrypt-crypt-util bulkstat_null_ocount splice-test chprojid_fail \
33         detached_mounts_propagation
34
35 SUBDIRS = log-writes perf
36
37 LLDLIBS = $(LIBHANDLE) $(LIBACL) -lpthread -lrt
38
39 ifeq ($(HAVE_XLOG_ASSIGN_LSN), true)
40 LINUX_TARGETS += loggen
41 endif
42
43 ifeq ($(HAVE_FIEMAP), true)
44 LINUX_TARGETS += fiemap-tester t_stripealign
45 endif
46
47 ifeq ($(HAVE_OPEN_BY_HANDLE_AT), true)
48 LINUX_TARGETS += open_by_handle
49 endif
50
51 ifeq ($(HAVE_FALLOCATE), true)
52 LCFLAGS += -DHAVE_FALLOCATE
53 endif
54
55 ifeq ($(PKG_PLATFORM),linux)
56 TARGETS += $(LINUX_TARGETS)
57 endif
58
59 ifeq ($(HAVE_DB), true)
60 TARGETS += dbtest
61 LLDLIBS += $(LIBGDBM)
62 endif
63
64 ifeq ($(HAVE_AIO), true)
65 TARGETS += t_mmap_dio
66 SUBDIRS += aio-dio-regress
67 LLDLIBS += -laio
68 endif
69
70 ifeq ($(HAVE_URING), true)
71 LLDLIBS += -luring
72 endif
73
74 SUBDIRS += idmapped-mounts
75 ifeq ($(HAVE_LIBCAP), true)
76 LLDLIBS += -lcap
77 endif
78
79 CFILES = $(TARGETS:=.c)
80 LDIRT = $(TARGETS) fssum
81
82
83 default: depend $(LDIRT) $(SUBDIRS)
84
85 depend: .dep
86
87 include $(BUILDRULES)
88
89 fssum: fssum.c md5.c
90         @echo "    [CC]    $@"
91         $(Q)$(LTLINK) fssum.c md5.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS)
92
93 $(TARGETS): $(LIBTEST)
94         @echo "    [CC]    $@"
95         $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
96
97 LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS)
98
99 install: default $(addsuffix -install,$(SUBDIRS))
100         $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src
101         $(LTINSTALL) -m 755 $(LDIRT) $(PKG_LIB_DIR)/src
102         $(LTINSTALL) -m 755 dmerror fill2attr fill2fs fill2fs_check scaleread.sh $(PKG_LIB_DIR)/src
103         $(LTINSTALL) -m 644 dumpfile $(PKG_LIB_DIR)/src
104
105 %-install:
106         $(MAKE) -C $* install
107
108 -include .dep