]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - libxfs/Makefile
Split buffer's b_fspriv field
[thirdparty/xfsprogs-dev.git] / libxfs / Makefile
CommitLineData
2bd0ea18 1#
e80aa729 2# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
dfc130f3 3#
2bd0ea18
NS
4
5TOPDIR = ..
6include $(TOPDIR)/include/builddefs
7
f937adac
NS
8LTLIBRARY = libxfs.la
9LT_CURRENT = 0
10LT_REVISION = 0
11LT_AGE = 0
fc49813f 12
636b4d91
DC
13# headers to install in include/xfs
14PKGHFILES = xfs_fs.h \
5711848a 15 xfs_types.h \
77d98709
CH
16 xfs_da_format.h \
17 xfs_format.h \
18 xfs_log_format.h
19
6b803e5a 20HFILES = \
cf8ce220 21 xfs_ag_resv.h \
77d98709 22 xfs_alloc.h \
636b4d91
DC
23 xfs_alloc_btree.h \
24 xfs_attr_leaf.h \
25 xfs_attr_sf.h \
26 xfs_bit.h \
27 xfs_bmap.h \
28 xfs_bmap_btree.h \
29 xfs_btree.h \
30 xfs_attr_remote.h \
31 xfs_cksum.h \
32 xfs_da_btree.h \
636b4d91 33 xfs_dir2.h \
56d3fc2b 34 xfs_errortag.h \
636b4d91
DC
35 xfs_ialloc.h \
36 xfs_ialloc_btree.h \
37 xfs_inode_buf.h \
38 xfs_inode_fork.h \
636b4d91 39 xfs_quota_defs.h \
bc859611 40 xfs_refcount.h \
d8079fe0 41 xfs_refcount_btree.h \
85aec44f 42 xfs_rmap.h \
631ac87a 43 xfs_rmap_btree.h \
636b4d91
DC
44 xfs_sb.h \
45 xfs_shared.h \
46 xfs_trans_resv.h \
b626fb59 47 xfs_trans_space.h \
e515cca1 48 libxfs_io.h \
6b803e5a
CH
49 libxfs_api_defs.h \
50 init.h \
77d98709
CH
51 crc32defs.h \
52 crc32table.h \
53 libxfs_priv.h \
54 xfs_dir2_priv.h
55
4896e6c8
DC
56CFILES = cache.c \
57 crc32.c \
dc3bce02 58 defer_item.c \
4071f725
DC
59 init.c \
60 kmem.c \
61 logitem.c \
4071f725
DC
62 rdwr.c \
63 trans.c \
64 util.c \
cf8ce220 65 xfs_ag_resv.c \
5d90ab5a
DC
66 xfs_alloc.c \
67 xfs_alloc_btree.c \
4896e6c8 68 xfs_attr.c \
88cd79be 69 xfs_attr_leaf.c \
4896e6c8 70 xfs_attr_remote.c \
4071f725 71 xfs_bit.c \
88cd79be
DC
72 xfs_bmap.c \
73 xfs_bmap_btree.c \
5d90ab5a 74 xfs_btree.c \
88cd79be 75 xfs_da_btree.c \
ff105f75 76 xfs_da_format.c \
a18e1f79 77 xfs_defer.c \
88cd79be
DC
78 xfs_dir2.c \
79 xfs_dir2_block.c \
80 xfs_dir2_data.c \
81 xfs_dir2_leaf.c \
82 xfs_dir2_node.c \
83 xfs_dir2_sf.c \
32390f05 84 xfs_dquot_buf.c \
5d90ab5a 85 xfs_ialloc.c \
b37d753d 86 xfs_iext_tree.c \
1d519883 87 xfs_inode_buf.c \
5d90ab5a 88 xfs_inode_fork.c \
88cd79be
DC
89 xfs_ialloc_btree.c \
90 xfs_log_rlimit.c \
bc859611 91 xfs_refcount.c \
d8079fe0 92 xfs_refcount_btree.c \
631ac87a 93 xfs_rmap.c \
b3a96b46 94 xfs_rmap_btree.c \
2ceff9ce 95 xfs_rtbitmap.c \
4896e6c8 96 xfs_sb.c \
270b1db1 97 xfs_symlink_remote.c \
364e85ec 98 xfs_trans_resv.c
9440d84d
NS
99
100CFILES += $(PKG_PLATFORM).c
1707056a 101PCFILES = darwin.c freebsd.c irix.c linux.c
93d9f139 102LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g")
7e280e68 103LSRCFILES += gen_crc32table.c
2bd0ea18 104
dfc130f3 105#
2bd0ea18
NS
106# Tracing flags:
107# -DIO_DEBUG reads and writes of buffers
108# -DMEM_DEBUG all zone memory use
109# -DLI_DEBUG log item (ino/buf) manipulation
110# -DXACT_DEBUG transaction state changes
dfc130f3 111#
8d9f1b15 112#LCFLAGS +=
1bdd986b
NS
113
114FCFLAGS = -I.
2bd0ea18 115
717e6142
AM
116LTLIBS = $(LIBPTHREAD) $(LIBRT)
117
fc49813f
NS
118# don't try linking xfs_repair with a debug libxfs.
119DEBUG = -DNDEBUG
120
7e280e68
DC
121LDIRT = gen_crc32table crc32table.h crc32selftest
122
337d9a24 123default: crc32selftest ltdepend $(LTLIBRARY)
7e280e68 124
5a4d6a2d 125crc32table.h: gen_crc32table.c crc32defs.h
7e280e68 126 @echo " [CC] gen_crc32table"
0a71e383 127 $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
7e280e68
DC
128 @echo " [GENERATE] $@"
129 $(Q) ./gen_crc32table > crc32table.h
130
131# The selftest binary will return an error if it fails. This is made a
132# dependency of the build process so that we refuse to build the tools on broken
133# systems/architectures. Hence we make sure that xfsprogs will never use a
134# busted CRC calculation at build time and hence avoid putting bad CRCs down on
135# disk.
5a4d6a2d 136crc32selftest: gen_crc32table.c crc32table.h crc32.c crc32defs.h
7e280e68 137 @echo " [TEST] CRC32"
0a71e383 138 $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
7e280e68 139 $(Q) ./$@
2bd0ea18 140
636b4d91 141# set up include/xfs header directory
2bd0ea18
NS
142include $(BUILDRULES)
143
144install: default
b08338d7
DC
145 $(INSTALL) -m 755 -d $(PKG_INC_DIR)
146
6b803e5a 147install-headers: $(addsuffix -hdrs, $(PKGHFILES))
b08338d7
DC
148
149%-hdrs:
f4a2ea00 150 $(Q)$(LN_S) -f $(CURDIR)/$* $(TOPDIR)/include/xfs/$*
fc49813f 151
636b4d91 152install-dev: install
61e2fa77 153 $(INSTALL) -m 644 $(PKGHFILES) $(PKG_INC_DIR)
5e656dbb 154
b08338d7
DC
155# We need to install the headers before building the dependencies. If we
156# include the .ltdep file, the makefile decides that it needs to build the
157# dependencies to remake the makefile before running the header install target,
158# hence making it impossible to avoid errors being thrown by the dependency
159# generation. Hence we play games so that we only include this file if we aren't
160# running the install-headers target.
161ifndef NODEP
932b0ba9 162-include .ltdep
b08338d7 163endif