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