]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - scrub/Makefile
xfs_scrub: scrub file data blocks
[thirdparty/xfsprogs-dev.git] / scrub / Makefile
CommitLineData
95b1e505
DW
1#
2# Copyright (C) 2018 Oracle. All Rights Reserved.
3#
4
5TOPDIR = ..
6include $(TOPDIR)/include/builddefs
7
8# On linux we get fsmap from the system or define it ourselves
9# so include this based on platform type. If this reverts to only
10# the autoconf check w/o local definition, change to testing HAVE_GETFSMAP
b364a9c0 11SCRUB_PREREQS=$(PKG_PLATFORM)$(HAVE_OPENAT)$(HAVE_FSTATAT)
95b1e505 12
b364a9c0 13ifeq ($(SCRUB_PREREQS),linuxyesyes)
95b1e505
DW
14LTCOMMAND = xfs_scrub
15INSTALL_SCRUB = install-scrub
16endif # scrub_prereqs
17
18HFILES = \
0cf6f686 19bitmap.h \
95b1e505 20common.h \
d11cc69e 21counter.h \
a555a1f4 22disk.h \
c6eb0ff2 23filemap.h \
604dd334 24fscounters.h \
372d4ba9 25inodes.h \
2000470d 26read_verify.h \
fd7d73c0 27scrub.h \
bc94c5d6 28spacemap.h \
4bbed4ec 29unicrash.h \
b364a9c0 30vfs.h \
95b1e505
DW
31xfs_scrub.h
32
33CFILES = \
0cf6f686 34bitmap.c \
95b1e505 35common.c \
d11cc69e 36counter.c \
a555a1f4 37disk.c \
c6eb0ff2 38filemap.c \
604dd334 39fscounters.c \
372d4ba9 40inodes.c \
50a573a7 41phase1.c \
e758ad01 42phase2.c \
fa16b376 43phase3.c \
c4892e76 44phase5.c \
b364a9c0 45phase6.c \
2000470d 46read_verify.c \
fd7d73c0 47scrub.c \
bc94c5d6 48spacemap.c \
b364a9c0 49vfs.c \
95b1e505
DW
50xfs_scrub.c
51
4bbed4ec
DW
52LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBUNISTRING)
53LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG) $(LIBUNISTRING)
95b1e505
DW
54LLDFLAGS = -static
55
173a0283
DW
56ifeq ($(HAVE_MALLINFO),yes)
57LCFLAGS += -DHAVE_MALLINFO
58endif
59
50a573a7
DW
60ifeq ($(HAVE_SYNCFS),yes)
61LCFLAGS += -DHAVE_SYNCFS
62endif
63
396cd022
DW
64ifeq ($(HAVE_LIBATTR),yes)
65LCFLAGS += -DHAVE_LIBATTR
66endif
67
4bbed4ec
DW
68ifeq ($(HAVE_U8NORMALIZE),yes)
69CFILES += unicrash.c
70LCFLAGS += -DHAVE_U8NORMALIZE
71endif
72
95b1e505
DW
73default: depend $(LTCOMMAND)
74
4bbed4ec 75phase5.o unicrash.o xfs.o: $(TOPDIR)/include/builddefs
396cd022 76
95b1e505
DW
77include $(BUILDRULES)
78
79install: default $(INSTALL_SCRUB)
80
81install-scrub:
82 $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
83 $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
84
85install-dev:
86
87-include .dep