]>
Commit | Line | Data |
---|---|---|
2bd0ea18 | 1 | # |
e80aa729 | 2 | # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
dfc130f3 | 3 | # |
2bd0ea18 NS |
4 | |
5 | TOPDIR = .. | |
6 | include $(TOPDIR)/include/builddefs | |
7 | ||
f937adac NS |
8 | LTLIBRARY = libxfs.la |
9 | LT_CURRENT = 0 | |
10 | LT_REVISION = 0 | |
11 | LT_AGE = 0 | |
fc49813f | 12 | |
7e280e68 | 13 | HFILES = xfs.h init.h xfs_dir2_priv.h crc32defs.h crc32table.h |
4896e6c8 DC |
14 | CFILES = cache.c \ |
15 | crc32.c \ | |
16 | init.c kmem.c logitem.c radix-tree.c rdwr.c trans.c util.c \ | |
5d90ab5a DC |
17 | xfs_alloc.c \ |
18 | xfs_alloc_btree.c \ | |
4896e6c8 | 19 | xfs_attr.c \ |
88cd79be | 20 | xfs_attr_leaf.c \ |
4896e6c8 | 21 | xfs_attr_remote.c \ |
88cd79be DC |
22 | xfs_bmap.c \ |
23 | xfs_bmap_btree.c \ | |
5d90ab5a | 24 | xfs_btree.c \ |
88cd79be | 25 | xfs_da_btree.c \ |
ff105f75 | 26 | xfs_da_format.c \ |
88cd79be DC |
27 | xfs_dir2.c \ |
28 | xfs_dir2_block.c \ | |
29 | xfs_dir2_data.c \ | |
30 | xfs_dir2_leaf.c \ | |
31 | xfs_dir2_node.c \ | |
32 | xfs_dir2_sf.c \ | |
32390f05 | 33 | xfs_dquot_buf.c \ |
5d90ab5a | 34 | xfs_ialloc.c \ |
1d519883 | 35 | xfs_inode_buf.c \ |
5d90ab5a | 36 | xfs_inode_fork.c \ |
88cd79be DC |
37 | xfs_ialloc_btree.c \ |
38 | xfs_log_rlimit.c \ | |
2ceff9ce | 39 | xfs_rtbitmap.c \ |
4896e6c8 | 40 | xfs_sb.c \ |
270b1db1 | 41 | xfs_symlink_remote.c \ |
364e85ec | 42 | xfs_trans_resv.c |
9440d84d NS |
43 | |
44 | CFILES += $(PKG_PLATFORM).c | |
1707056a | 45 | PCFILES = darwin.c freebsd.c irix.c linux.c |
93d9f139 | 46 | LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g") |
7e280e68 | 47 | LSRCFILES += gen_crc32table.c |
2bd0ea18 | 48 | |
dfc130f3 | 49 | # |
2bd0ea18 NS |
50 | # Tracing flags: |
51 | # -DIO_DEBUG reads and writes of buffers | |
52 | # -DMEM_DEBUG all zone memory use | |
53 | # -DLI_DEBUG log item (ino/buf) manipulation | |
54 | # -DXACT_DEBUG transaction state changes | |
dfc130f3 | 55 | # |
8d9f1b15 | 56 | #LCFLAGS += |
1bdd986b NS |
57 | |
58 | FCFLAGS = -I. | |
2bd0ea18 | 59 | |
717e6142 AM |
60 | LTLIBS = $(LIBPTHREAD) $(LIBRT) |
61 | ||
fc49813f NS |
62 | # don't try linking xfs_repair with a debug libxfs. |
63 | DEBUG = -DNDEBUG | |
64 | ||
7e280e68 DC |
65 | LDIRT = gen_crc32table crc32table.h crc32selftest |
66 | ||
67 | default: crc32selftest ltdepend $(LTLIBRARY) | |
68 | ||
69 | crc32table.h: gen_crc32table.c | |
70 | @echo " [CC] gen_crc32table" | |
71 | $(Q) $(CC) $(CFLAGS) -o gen_crc32table $< | |
72 | @echo " [GENERATE] $@" | |
73 | $(Q) ./gen_crc32table > crc32table.h | |
74 | ||
75 | # The selftest binary will return an error if it fails. This is made a | |
76 | # dependency of the build process so that we refuse to build the tools on broken | |
77 | # systems/architectures. Hence we make sure that xfsprogs will never use a | |
78 | # busted CRC calculation at build time and hence avoid putting bad CRCs down on | |
79 | # disk. | |
80 | crc32selftest: gen_crc32table.c crc32table.h crc32.c | |
81 | @echo " [TEST] CRC32" | |
82 | $(Q) $(CC) $(CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@ | |
83 | $(Q) ./$@ | |
2bd0ea18 NS |
84 | |
85 | include $(BUILDRULES) | |
86 | ||
87 | install: default | |
fc49813f NS |
88 | |
89 | install-dev: default | |
5e656dbb BN |
90 | |
91 | install-qa: default | |
d9320881 | 92 | |
932b0ba9 | 93 | -include .ltdep |