]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - libxfs/Makefile
xfsprogs: Fix --disable-static option build
[thirdparty/xfsprogs-dev.git] / libxfs / Makefile
index 42ce0f8a37f611f73963042498bf3833ee7212d3..8c19836f20522a08b74f00076361aacb2c52b5c3 100644 (file)
@@ -1,4 +1,4 @@
-#
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2000-2006 Silicon Graphics, Inc.  All Rights Reserved.
 #
 
@@ -9,6 +9,8 @@ LTLIBRARY = libxfs.la
 LT_CURRENT = 0
 LT_REVISION = 0
 LT_AGE = 0
+# we need a static build even if --disable-static is specified
+LTLDFLAGS += -static
 
 # headers to install in include/xfs
 PKGHFILES = xfs_fs.h \
@@ -48,13 +50,10 @@ HFILES = \
        libxfs_io.h \
        libxfs_api_defs.h \
        init.h \
-       crc32defs.h \
-       crc32table.h \
        libxfs_priv.h \
        xfs_dir2_priv.h
 
 CFILES = cache.c \
-       crc32.c \
        defer_item.c \
        init.c \
        kmem.c \
@@ -74,7 +73,6 @@ CFILES = cache.c \
        xfs_bmap_btree.c \
        xfs_btree.c \
        xfs_da_btree.c \
-       xfs_da_format.c \
        xfs_defer.c \
        xfs_dir2.c \
        xfs_dir2_block.c \
@@ -96,11 +94,10 @@ CFILES = cache.c \
        xfs_rtbitmap.c \
        xfs_sb.c \
        xfs_symlink_remote.c \
+       xfs_trans_inode.c \
        xfs_trans_resv.c \
        xfs_types.c
 
-LSRCFILES += gen_crc32table.c
-
 #
 # Tracing flags:
 # -DIO_DEBUG           reads and writes of buffers
@@ -117,25 +114,7 @@ LTLIBS = $(LIBPTHREAD) $(LIBRT)
 # don't try linking xfs_repair with a debug libxfs.
 DEBUG = -DNDEBUG
 
-LDIRT = gen_crc32table crc32table.h crc32selftest
-
-default: crc32selftest ltdepend $(LTLIBRARY)
-
-crc32table.h: gen_crc32table.c crc32defs.h
-       @echo "    [CC]     gen_crc32table"
-       $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
-       @echo "    [GENERATE] $@"
-       $(Q) ./gen_crc32table > crc32table.h
-
-# The selftest binary will return an error if it fails. This is made a
-# dependency of the build process so that we refuse to build the tools on broken
-# systems/architectures. Hence we make sure that xfsprogs will never use a
-# busted CRC calculation at build time and hence avoid putting bad CRCs down on
-# disk.
-crc32selftest: gen_crc32table.c crc32table.h crc32.c crc32defs.h
-       @echo "    [TEST]    CRC32"
-       $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
-       $(Q) ./$@
+default: ltdepend $(LTLIBRARY)
 
 # set up include/xfs header directory
 include $(BUILDRULES)