]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - libxfs/Makefile
xfs: move inode fork definitions to a new header file
[thirdparty/xfsprogs-dev.git] / libxfs / Makefile
1 #
2 # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
3 #
4
5 TOPDIR = ..
6 include $(TOPDIR)/include/builddefs
7
8 LTLIBRARY = libxfs.la
9 LT_CURRENT = 0
10 LT_REVISION = 0
11 LT_AGE = 0
12
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 \
15 xfs_alloc.c \
16 xfs_alloc_btree.c \
17 xfs_btree.c \
18 xfs_ialloc.c \
19 xfs_inode.c \
20 xfs_inode_fork.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 \
25 crc32.c \
26 xfs_symlink.c \
27 xfs_trans_resv.c
28
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
33
34 #
35 # Tracing flags:
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
40 #
41 #LCFLAGS +=
42
43 FCFLAGS = -I.
44
45 LTLIBS = $(LIBPTHREAD) $(LIBRT)
46
47 # don't try linking xfs_repair with a debug libxfs.
48 DEBUG = -DNDEBUG
49
50 LDIRT = gen_crc32table crc32table.h crc32selftest
51
52 default: crc32selftest ltdepend $(LTLIBRARY)
53
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
59
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
64 # disk.
65 crc32selftest: gen_crc32table.c crc32table.h crc32.c
66 @echo " [TEST] CRC32"
67 $(Q) $(CC) $(CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
68 $(Q) ./$@
69
70 include $(BUILDRULES)
71
72 install: default
73
74 install-dev: default
75
76 install-qa: default
77
78 -include .ltdep