]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - libfrog/Makefile
libfrog: introduce xfs_fd to wrap an fd to a file on an xfs filesystem
[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 \
b95410da 16convert.c \
973de649 17crc32.c \
96aaf9bc 18fsgeom.c \
b28b84ca 19list_sort.c \
bf64c900 20linux.c \
bd987fe3
DW
21paths.c \
22projects.c \
d11cc69e 23ptvar.c \
b28b84ca 24radix-tree.c \
695fc504 25topology.c \
f434fd95
DW
26util.c \
27workqueue.c
5caa042b 28
973de649
DW
29HFILES = \
30crc32defs.h \
31crc32table.h
32
33LSRCFILES += gen_crc32table.c
34
bd987fe3
DW
35ifeq ($(HAVE_GETMNTENT),yes)
36LCFLAGS += -DHAVE_GETMNTENT
37endif
38
973de649
DW
39LDIRT = gen_crc32table crc32table.h crc32selftest
40
41default: crc32selftest ltdepend $(LTLIBRARY)
42
43crc32table.h: gen_crc32table.c crc32defs.h
44 @echo " [CC] gen_crc32table"
45 $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
46 @echo " [GENERATE] $@"
47 $(Q) ./gen_crc32table > crc32table.h
48
49# The selftest binary will return an error if it fails. This is made a
50# dependency of the build process so that we refuse to build the tools on broken
51# systems/architectures. Hence we make sure that xfsprogs will never use a
52# busted CRC calculation at build time and hence avoid putting bad CRCs down on
53# disk.
54crc32selftest: gen_crc32table.c crc32table.h crc32.c crc32defs.h
55 @echo " [TEST] CRC32"
56 $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
57 $(Q) ./$@
5caa042b
DW
58
59include $(BUILDRULES)
60
61install install-dev: default
62
63-include .ltdep