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