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