]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - libxfs/Makefile
xfs: use a b+tree for the in-core extent list
[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 # headers to install in include/xfs
14 PKGHFILES = xfs_fs.h \
15 xfs_types.h \
16 xfs_da_format.h \
17 xfs_format.h \
18 xfs_log_format.h
19
20 HFILES = \
21 xfs_ag_resv.h \
22 xfs_alloc.h \
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 \
33 xfs_dir2.h \
34 xfs_errortag.h \
35 xfs_ialloc.h \
36 xfs_ialloc_btree.h \
37 xfs_inode_buf.h \
38 xfs_inode_fork.h \
39 xfs_quota_defs.h \
40 xfs_refcount.h \
41 xfs_refcount_btree.h \
42 xfs_rmap.h \
43 xfs_rmap_btree.h \
44 xfs_sb.h \
45 xfs_shared.h \
46 xfs_trans_resv.h \
47 xfs_trans_space.h \
48 libxfs_io.h \
49 libxfs_api_defs.h \
50 init.h \
51 crc32defs.h \
52 crc32table.h \
53 libxfs_priv.h \
54 xfs_dir2_priv.h
55
56 CFILES = cache.c \
57 crc32.c \
58 defer_item.c \
59 init.c \
60 kmem.c \
61 list_sort.c \
62 logitem.c \
63 radix-tree.c \
64 rdwr.c \
65 trans.c \
66 util.c \
67 xfs_ag_resv.c \
68 xfs_alloc.c \
69 xfs_alloc_btree.c \
70 xfs_attr.c \
71 xfs_attr_leaf.c \
72 xfs_attr_remote.c \
73 xfs_bit.c \
74 xfs_bmap.c \
75 xfs_bmap_btree.c \
76 xfs_btree.c \
77 xfs_da_btree.c \
78 xfs_da_format.c \
79 xfs_defer.c \
80 xfs_dir2.c \
81 xfs_dir2_block.c \
82 xfs_dir2_data.c \
83 xfs_dir2_leaf.c \
84 xfs_dir2_node.c \
85 xfs_dir2_sf.c \
86 xfs_dquot_buf.c \
87 xfs_ialloc.c \
88 xfs_iext_tree.c \
89 xfs_inode_buf.c \
90 xfs_inode_fork.c \
91 xfs_ialloc_btree.c \
92 xfs_log_rlimit.c \
93 xfs_refcount.c \
94 xfs_refcount_btree.c \
95 xfs_rmap.c \
96 xfs_rmap_btree.c \
97 xfs_rtbitmap.c \
98 xfs_sb.c \
99 xfs_symlink_remote.c \
100 xfs_trans_resv.c
101
102 CFILES += $(PKG_PLATFORM).c
103 PCFILES = darwin.c freebsd.c irix.c linux.c
104 LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g")
105 LSRCFILES += gen_crc32table.c
106
107 #
108 # Tracing flags:
109 # -DIO_DEBUG reads and writes of buffers
110 # -DMEM_DEBUG all zone memory use
111 # -DLI_DEBUG log item (ino/buf) manipulation
112 # -DXACT_DEBUG transaction state changes
113 #
114 #LCFLAGS +=
115
116 FCFLAGS = -I.
117
118 LTLIBS = $(LIBPTHREAD) $(LIBRT)
119
120 # don't try linking xfs_repair with a debug libxfs.
121 DEBUG = -DNDEBUG
122
123 LDIRT = gen_crc32table crc32table.h crc32selftest
124
125 default: crc32selftest ltdepend $(LTLIBRARY)
126
127 crc32table.h: gen_crc32table.c crc32defs.h
128 @echo " [CC] gen_crc32table"
129 $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
130 @echo " [GENERATE] $@"
131 $(Q) ./gen_crc32table > crc32table.h
132
133 # The selftest binary will return an error if it fails. This is made a
134 # dependency of the build process so that we refuse to build the tools on broken
135 # systems/architectures. Hence we make sure that xfsprogs will never use a
136 # busted CRC calculation at build time and hence avoid putting bad CRCs down on
137 # disk.
138 crc32selftest: gen_crc32table.c crc32table.h crc32.c crc32defs.h
139 @echo " [TEST] CRC32"
140 $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
141 $(Q) ./$@
142
143 # set up include/xfs header directory
144 include $(BUILDRULES)
145
146 install: default
147 $(INSTALL) -m 755 -d $(PKG_INC_DIR)
148
149 install-headers: $(addsuffix -hdrs, $(PKGHFILES))
150
151 %-hdrs:
152 $(Q)$(LN_S) -f $(CURDIR)/$* $(TOPDIR)/include/xfs/$*
153
154 install-dev: install
155 $(INSTALL) -m 644 $(PKGHFILES) $(PKG_INC_DIR)
156
157 # We need to install the headers before building the dependencies. If we
158 # include the .ltdep file, the makefile decides that it needs to build the
159 # dependencies to remake the makefile before running the header install target,
160 # hence making it impossible to avoid errors being thrown by the dependency
161 # generation. Hence we play games so that we only include this file if we aren't
162 # running the install-headers target.
163 ifndef NODEP
164 -include .ltdep
165 endif