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