generic: concurrent non-overlapping direct I/O on the same extents
[xfstests-dev.git] / src / Makefile
1 #
2 # Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
3 #
4
5 TOPDIR = ..
6 include $(TOPDIR)/include/builddefs
7
8 TARGETS = dirstress fill fill2 getpagesize holes lstat64 \
9         nametest permname randholes runas truncfile usemem \
10         mmapcat append_reader append_writer dirperf metaperf \
11         devzero feature alloc fault fstest t_access_root \
12         godown resvtest writemod makeextents itrash rename \
13         multi_open_unlink dmiperf unwritten_sync genhashnames t_holes \
14         t_mmap_writev t_truncate_cmtime dirhash_collide t_rename_overwrite \
15         holetest t_truncate_self
16
17 LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
18         preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \
19         locktest unwritten_mmap bulkstat_unlink_test t_stripealign \
20         bulkstat_unlink_test_modified t_dir_offset t_futimens t_immutable \
21         stale_handle pwrite_mmap_blocked t_dir_offset2 seek_sanity_test \
22         seek_copy_test t_readdir_1 t_readdir_2 fsync-tester nsexec cloner \
23         renameat2 t_getcwd e4compact test-nextquota punch-alternating \
24         attr-list-by-handle-cursor-test listxattr dio-interleaved
25
26 SUBDIRS =
27
28 LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL) -lpthread
29
30 ifeq ($(HAVE_XLOG_ASSIGN_LSN), true)
31 LINUX_TARGETS += loggen
32 endif
33
34 ifeq ($(HAVE_FIEMAP), true)
35 LINUX_TARGETS += fiemap-tester
36 endif
37
38 ifeq ($(HAVE_FALLOCATE), true)
39 LCFLAGS += -DHAVE_FALLOCATE
40 endif
41
42 IRIX_TARGETS = open_unlink
43
44 ifeq ($(PKG_PLATFORM),linux)
45 TARGETS += $(LINUX_TARGETS)
46 endif
47
48 ifeq ($(PKG_PLATFORM),irix)
49 TARGETS += $(IRIX_TARGETS)
50 LLDLIBS += -lgen
51 endif
52
53 ifeq ($(HAVE_DB), true)
54 TARGETS += dbtest
55 LLDLIBS += $(LIBGDBM)
56 endif
57
58 ifeq ($(HAVE_AIO), true)
59 SUBDIRS += aio-dio-regress
60 endif
61
62 ifeq ($(HAVE_SSL), true)
63 TARGETS += fssum
64 LLDLIBS += -lssl -lcrypto
65 ifeq ($(PKG_PLATFORM),linux)
66 CFLAGS += -D__LINUX__
67 endif
68 endif
69
70 CFILES = $(TARGETS:=.c)
71 LDIRT = $(TARGETS)
72
73
74 default: depend $(TARGETS) $(SUBDIRS)
75
76 depend: .dep
77
78 include $(BUILDRULES)
79
80 $(TARGETS): $(LIBTEST)
81         @echo "    [CC]    $@"
82         $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
83
84 LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS)
85
86 install: default $(addsuffix -install,$(SUBDIRS))
87         $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src
88         $(LTINSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src
89         $(LTINSTALL) -m 755 fill2attr fill2fs fill2fs_check scaleread.sh $(PKG_LIB_DIR)/src
90         $(LTINSTALL) -m 644 dumpfile $(PKG_LIB_DIR)/src
91
92 %-install:
93         $(MAKE) -C $* install
94
95 -include .dep