]>
Commit | Line | Data |
---|---|---|
959ef981 | 1 | # SPDX-License-Identifier: GPL-2.0 |
5caa042b DW |
2 | # Copyright (c) 2017 Oracle. All Rights Reserved. |
3 | # | |
4 | ||
5 | TOPDIR = .. | |
6 | include $(TOPDIR)/include/builddefs | |
7 | ||
8 | LTLIBRARY = libfrog.la | |
9 | LT_CURRENT = 0 | |
10 | LT_REVISION = 0 | |
11 | LT_AGE = 0 | |
12 | ||
24f4f998 | 13 | CFILES = \ |
67f3fafd | 14 | avl64.c \ |
b06ebacf | 15 | bitmap.c \ |
f31b5e12 | 16 | bulkstat.c \ |
b95410da | 17 | convert.c \ |
973de649 | 18 | crc32.c \ |
96aaf9bc | 19 | fsgeom.c \ |
b28b84ca | 20 | list_sort.c \ |
bf64c900 | 21 | linux.c \ |
bd987fe3 DW |
22 | paths.c \ |
23 | projects.c \ | |
d11cc69e | 24 | ptvar.c \ |
b28b84ca | 25 | radix-tree.c \ |
695fc504 | 26 | topology.c \ |
f434fd95 DW |
27 | util.c \ |
28 | workqueue.c | |
5caa042b | 29 | |
973de649 | 30 | HFILES = \ |
b4a09f89 | 31 | avl64.h \ |
f31b5e12 | 32 | bulkstat.h \ |
a58400ed | 33 | bitmap.h \ |
25e98e81 | 34 | convert.h \ |
973de649 | 35 | crc32defs.h \ |
7478c2e3 | 36 | crc32table.h \ |
fee68490 | 37 | fsgeom.h \ |
7478c2e3 | 38 | topology.h |
973de649 DW |
39 | |
40 | LSRCFILES += gen_crc32table.c | |
41 | ||
bd987fe3 DW |
42 | ifeq ($(HAVE_GETMNTENT),yes) |
43 | LCFLAGS += -DHAVE_GETMNTENT | |
44 | endif | |
45 | ||
973de649 DW |
46 | LDIRT = gen_crc32table crc32table.h crc32selftest |
47 | ||
48 | default: crc32selftest ltdepend $(LTLIBRARY) | |
49 | ||
50 | crc32table.h: gen_crc32table.c crc32defs.h | |
51 | @echo " [CC] gen_crc32table" | |
52 | $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $< | |
53 | @echo " [GENERATE] $@" | |
54 | $(Q) ./gen_crc32table > crc32table.h | |
55 | ||
56 | # The selftest binary will return an error if it fails. This is made a | |
57 | # dependency of the build process so that we refuse to build the tools on broken | |
58 | # systems/architectures. Hence we make sure that xfsprogs will never use a | |
59 | # busted CRC calculation at build time and hence avoid putting bad CRCs down on | |
60 | # disk. | |
61 | crc32selftest: gen_crc32table.c crc32table.h crc32.c crc32defs.h | |
62 | @echo " [TEST] CRC32" | |
63 | $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@ | |
64 | $(Q) ./$@ | |
5caa042b DW |
65 | |
66 | include $(BUILDRULES) | |
67 | ||
68 | install install-dev: default | |
69 | ||
70 | -include .ltdep |