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 \
14 t_mmap_writev t_truncate_cmtime dirhash_collide t_rename_overwrite \
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
27 LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL) -lpthread
29 ifeq ($(HAVE_XLOG_ASSIGN_LSN), true)
30 LINUX_TARGETS += loggen
33 ifeq ($(HAVE_FIEMAP), true)
34 LINUX_TARGETS += fiemap-tester
37 ifeq ($(HAVE_FALLOCATE), true)
38 LCFLAGS += -DHAVE_FALLOCATE
41 IRIX_TARGETS = open_unlink
43 ifeq ($(PKG_PLATFORM),linux)
44 TARGETS += $(LINUX_TARGETS)
47 ifeq ($(PKG_PLATFORM),irix)
48 TARGETS += $(IRIX_TARGETS)
52 ifeq ($(HAVE_DB), true)
57 ifeq ($(HAVE_AIO), true)
58 SUBDIRS += aio-dio-regress
61 ifeq ($(HAVE_SSL), true)
63 LLDLIBS += -lssl -lcrypto
64 ifeq ($(PKG_PLATFORM),linux)
69 CFILES = $(TARGETS:=.c)
73 default: depend $(TARGETS) $(SUBDIRS)
79 $(TARGETS): $(LIBTEST)
81 $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
83 LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS)
85 install: default $(addsuffix -install,$(SUBDIRS))
86 $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src
87 $(LTINSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src
88 $(LTINSTALL) -m 755 fill2attr fill2fs fill2fs_check scaleread.sh $(PKG_LIB_DIR)/src
89 $(LTINSTALL) -m 644 dumpfile $(PKG_LIB_DIR)/src