xfsqa: Add fiemap exerciser
[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
14
15 LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
16         preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \
17         locktest unwritten_mmap bulkstat_unlink_test t_stripealign \
18         bulkstat_unlink_test_modified t_dir_offset t_futimens t_immutable
19
20 SUBDIRS =
21
22 LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL)
23
24 ifeq ($(HAVE_XLOG_ASSIGN_LSN), true)
25 LINUX_TARGETS += loggen
26 endif
27
28 ifeq ($(HAVE_FIEMAP), true)
29 LINUX_TARGETS += fiemap-tester
30 endif
31
32 ifeq ($(HAVE_FALLOCATE),yes)
33 LCFLAGS += -DHAVE_FALLOCATE
34 endif
35
36 IRIX_TARGETS = open_unlink
37
38 ifeq ($(PKG_PLATFORM),linux)
39 TARGETS += $(LINUX_TARGETS)
40 endif
41
42 ifeq ($(PKG_PLATFORM),irix)
43 TARGETS += $(IRIX_TARGETS)
44 LLDLIBS += -lgen
45 endif
46
47 ifeq ($(HAVE_DB), true)
48 TARGETS += dbtest
49 LLDLIBS += $(LIBGDBM)
50 endif
51
52 ifeq ($(HAVE_AIO), true)
53 SUBDIRS += aio-dio-regress
54 endif
55
56 CFILES = $(TARGETS:=.c)
57 LDIRT = $(TARGETS)
58
59
60 default: depend $(TARGETS) $(SUBDIRS)
61
62 include $(BUILDRULES)
63
64 $(TARGETS): $(LIBTEST)
65         @echo "    [CC]    $@"
66         $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
67
68 LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS)
69
70 install: default $(addsuffix -install,$(SUBDIRS))
71         $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src
72         $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src
73         $(INSTALL) -m 755 fill2attr fill2fs fill2fs_check scaleread.sh $(PKG_LIB_DIR)/src
74         $(INSTALL) -m 644 dumpfile $(PKG_LIB_DIR)/src
75
76 %-install:
77         $(MAKE) -C $* install
78
79 -include .dep