2 # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
6 include $(TOPDIR)/include/builddefs
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 \
16 LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
17 preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \
18 locktest unwritten_mmap bulkstat_unlink_test t_stripealign \
19 bulkstat_unlink_test_modified t_dir_offset t_futimens t_immutable \
20 stale_handle pwrite_mmap_blocked fstrim
24 LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL)
26 ifeq ($(HAVE_XLOG_ASSIGN_LSN), true)
27 LINUX_TARGETS += loggen
30 ifeq ($(HAVE_FIEMAP), true)
31 LINUX_TARGETS += fiemap-tester
34 ifeq ($(HAVE_FALLOCATE),yes)
35 LCFLAGS += -DHAVE_FALLOCATE
38 IRIX_TARGETS = open_unlink
40 ifeq ($(PKG_PLATFORM),linux)
41 TARGETS += $(LINUX_TARGETS)
44 ifeq ($(PKG_PLATFORM),irix)
45 TARGETS += $(IRIX_TARGETS)
49 ifeq ($(HAVE_DB), true)
54 ifeq ($(HAVE_AIO), true)
55 SUBDIRS += aio-dio-regress
58 CFILES = $(TARGETS:=.c)
62 default: depend $(TARGETS) $(SUBDIRS)
66 $(TARGETS): $(LIBTEST)
68 $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
70 LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS)
72 install: default $(addsuffix -install,$(SUBDIRS))
73 $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src
74 $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src
75 $(INSTALL) -m 755 fill2attr fill2fs fill2fs_check scaleread.sh $(PKG_LIB_DIR)/src
76 $(INSTALL) -m 644 dumpfile $(PKG_LIB_DIR)/src