1 # SPDX-License-Identifier: GPL-2.0
2 # Copyright (c) 2017 Oracle. All Rights Reserved.
6 include $(TOPDIR
)/include/builddefs
31 LSRCFILES
+= gen_crc32table.c
33 CFILES
+= $(PKG_PLATFORM
).c
35 LSRCFILES
= $(shell echo
$(PCFILES
) | sed
-e
"s/$(PKG_PLATFORM).c//g")
37 ifeq ($(HAVE_GETMNTENT
),yes
)
38 LCFLAGS
+= -DHAVE_GETMNTENT
41 LDIRT
= gen_crc32table crc32table.h crc32selftest
43 default
: crc32selftest ltdepend
$(LTLIBRARY
)
45 crc32table.h
: gen_crc32table.c crc32defs.h
46 @echo
" [CC] gen_crc32table"
47 $(Q
) $(BUILD_CC
) $(BUILD_CFLAGS
) -o gen_crc32table
$<
48 @echo
" [GENERATE] $@"
49 $(Q
) .
/gen_crc32table
> crc32table.h
51 # The selftest binary will return an error if it fails. This is made a
52 # dependency of the build process so that we refuse to build the tools on broken
53 # systems/architectures. Hence we make sure that xfsprogs will never use a
54 # busted CRC calculation at build time and hence avoid putting bad CRCs down on
56 crc32selftest
: gen_crc32table.c crc32table.h crc32.c crc32defs.h
58 $(Q
) $(BUILD_CC
) $(BUILD_CFLAGS
) -D CRC32_SELFTEST
=1 crc32.c
-o
$@
63 install install-dev
: default