]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - libfrog/Makefile
libfrog: fix bitmap error communication problems
[thirdparty/xfsprogs-dev.git] / libfrog / Makefile
1 # SPDX-License-Identifier: GPL-2.0
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
13 CFILES = \
14 avl64.c \
15 bitmap.c \
16 bulkstat.c \
17 convert.c \
18 crc32.c \
19 fsgeom.c \
20 list_sort.c \
21 linux.c \
22 paths.c \
23 projects.c \
24 ptvar.c \
25 radix-tree.c \
26 scrub.c \
27 topology.c \
28 util.c \
29 workqueue.c
30
31 HFILES = \
32 avl64.h \
33 bulkstat.h \
34 bitmap.h \
35 convert.h \
36 crc32c.h \
37 crc32cselftest.h \
38 crc32defs.h \
39 crc32table.h \
40 fsgeom.h \
41 paths.h \
42 projects.h \
43 ptvar.h \
44 radix-tree.h \
45 scrub.h \
46 topology.h \
47 workqueue.h
48
49 LSRCFILES += gen_crc32table.c
50
51 ifeq ($(HAVE_GETMNTENT),yes)
52 LCFLAGS += -DHAVE_GETMNTENT
53 endif
54
55 LDIRT = gen_crc32table crc32table.h crc32selftest
56
57 default: crc32selftest ltdepend $(LTLIBRARY)
58
59 crc32table.h: gen_crc32table.c crc32defs.h
60 @echo " [CC] gen_crc32table"
61 $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
62 @echo " [GENERATE] $@"
63 $(Q) ./gen_crc32table > crc32table.h
64
65 # The selftest binary will return an error if it fails. This is made a
66 # dependency of the build process so that we refuse to build the tools on broken
67 # systems/architectures. Hence we make sure that xfsprogs will never use a
68 # busted CRC calculation at build time and hence avoid putting bad CRCs down on
69 # disk.
70 crc32selftest: gen_crc32table.c crc32table.h crc32.c crc32defs.h
71 @echo " [TEST] CRC32"
72 $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
73 $(Q) ./$@
74
75 include $(BUILDRULES)
76
77 install install-dev: default
78
79 -include .ltdep