]>
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 |
e9416bd3 | 14 | CFILES = cache.c init.c kmem.c logitem.c radix-tree.c rdwr.c trans.c util.c \ |
5d90ab5a DC |
15 | xfs_alloc.c \ |
16 | xfs_alloc_btree.c \ | |
17 | xfs_btree.c \ | |
18 | xfs_ialloc.c \ | |
1d519883 | 19 | xfs_inode_buf.c \ |
5d90ab5a | 20 | xfs_inode_fork.c \ |
5e656dbb | 21 | xfs_ialloc_btree.c xfs_bmap_btree.c xfs_da_btree.c \ |
2bd0ea18 NS |
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 \ | |
364e85ec DC |
24 | xfs_mount.c xfs_rtalloc.c xfs_attr.c xfs_attr_remote.c \ |
25 | crc32.c \ | |
270b1db1 | 26 | xfs_symlink_remote.c \ |
364e85ec | 27 | xfs_trans_resv.c |
9440d84d NS |
28 | |
29 | CFILES += $(PKG_PLATFORM).c | |
1707056a | 30 | PCFILES = darwin.c freebsd.c irix.c linux.c |
93d9f139 | 31 | LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g") |
7e280e68 | 32 | LSRCFILES += gen_crc32table.c |
2bd0ea18 | 33 | |
dfc130f3 | 34 | # |
2bd0ea18 NS |
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 | |
dfc130f3 | 40 | # |
8d9f1b15 | 41 | #LCFLAGS += |
1bdd986b NS |
42 | |
43 | FCFLAGS = -I. | |
2bd0ea18 | 44 | |
717e6142 AM |
45 | LTLIBS = $(LIBPTHREAD) $(LIBRT) |
46 | ||
fc49813f NS |
47 | # don't try linking xfs_repair with a debug libxfs. |
48 | DEBUG = -DNDEBUG | |
49 | ||
7e280e68 DC |
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) ./$@ | |
2bd0ea18 NS |
69 | |
70 | include $(BUILDRULES) | |
71 | ||
72 | install: default | |
fc49813f NS |
73 | |
74 | install-dev: default | |
5e656dbb BN |
75 | |
76 | install-qa: default | |
d9320881 | 77 | |
932b0ba9 | 78 | -include .ltdep |