]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - libfrog/Makefile
libfrog: always fsync when flushing a device
[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 \
b06ebacf 15bitmap.c \
f31b5e12 16bulkstat.c \
b95410da 17convert.c \
973de649 18crc32.c \
96aaf9bc 19fsgeom.c \
b28b84ca 20list_sort.c \
bf64c900 21linux.c \
9fc3ef62 22logging.c \
bd987fe3
DW
23paths.c \
24projects.c \
d11cc69e 25ptvar.c \
b28b84ca 26radix-tree.c \
5ef3b66a 27scrub.c \
695fc504 28topology.c \
f434fd95
DW
29util.c \
30workqueue.c
5caa042b 31
973de649 32HFILES = \
b4a09f89 33avl64.h \
f31b5e12 34bulkstat.h \
a58400ed 35bitmap.h \
25e98e81 36convert.h \
63153a95
DW
37crc32c.h \
38crc32cselftest.h \
973de649 39crc32defs.h \
7478c2e3 40crc32table.h \
fee68490 41fsgeom.h \
9fc3ef62 42logging.h \
42b4c8e8 43paths.h \
59f1f2a6 44projects.h \
14051909 45ptvar.h \
8bf7924e 46radix-tree.h \
5ef3b66a 47scrub.h \
56598728
DW
48topology.h \
49workqueue.h
973de649
DW
50
51LSRCFILES += gen_crc32table.c
52
bd987fe3
DW
53ifeq ($(HAVE_GETMNTENT),yes)
54LCFLAGS += -DHAVE_GETMNTENT
55endif
56
973de649
DW
57LDIRT = gen_crc32table crc32table.h crc32selftest
58
59default: crc32selftest ltdepend $(LTLIBRARY)
60
61crc32table.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.
72crc32selftest: 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) ./$@
5caa042b
DW
76
77include $(BUILDRULES)
78
79install install-dev: default
80
81-include .ltdep