2 # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
6 include $(TOPDIR
)/include/builddefs
13 HFILES
= xfs.h init.h xfs_dir2_priv.h crc32defs.h crc32table.h
14 CFILES
= cache.c init.c kmem.c logitem.c radix-tree.c rdwr.c trans.c util.c \
21 xfs_ialloc_btree.c xfs_bmap_btree.c xfs_da_btree.c \
22 xfs_dir2.c xfs_dir2_leaf.c xfs_attr_leaf.c xfs_dir2_block.c \
23 xfs_dir2_node.c xfs_dir2_data.c xfs_dir2_sf.c xfs_bmap.c \
24 xfs_mount.c xfs_rtalloc.c xfs_attr.c xfs_attr_remote.c \
29 CFILES
+= $(PKG_PLATFORM
).c
30 PCFILES
= darwin.c freebsd.c irix.c linux.c
31 LSRCFILES
= $(shell echo
$(PCFILES
) | sed
-e
"s/$(PKG_PLATFORM).c//g")
32 LSRCFILES
+= gen_crc32table.c
36 # -DIO_DEBUG reads and writes of buffers
37 # -DMEM_DEBUG all zone memory use
38 # -DLI_DEBUG log item (ino/buf) manipulation
39 # -DXACT_DEBUG transaction state changes
45 LTLIBS
= $(LIBPTHREAD
) $(LIBRT
)
47 # don't try linking xfs_repair with a debug libxfs.
50 LDIRT
= gen_crc32table crc32table.h crc32selftest
52 default
: crc32selftest ltdepend
$(LTLIBRARY
)
54 crc32table.h
: gen_crc32table.c
55 @echo
" [CC] gen_crc32table"
56 $(Q
) $(CC
) $(CFLAGS
) -o gen_crc32table
$<
57 @echo
" [GENERATE] $@"
58 $(Q
) .
/gen_crc32table
> crc32table.h
60 # The selftest binary will return an error if it fails. This is made a
61 # dependency of the build process so that we refuse to build the tools on broken
62 # systems/architectures. Hence we make sure that xfsprogs will never use a
63 # busted CRC calculation at build time and hence avoid putting bad CRCs down on
65 crc32selftest
: gen_crc32table.c crc32table.h crc32.c
67 $(Q
) $(CC
) $(CFLAGS
) -D CRC32_SELFTEST
=1 crc32.c
-o
$@