]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - scrub/Makefile
xfs_scrub: thread-safe stats counter
[thirdparty/xfsprogs-dev.git] / scrub / Makefile
1 #
2 # Copyright (C) 2018 Oracle. All Rights Reserved.
3 #
4
5 TOPDIR = ..
6 include $(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
11 SCRUB_PREREQS=$(PKG_PLATFORM)
12
13 ifeq ($(SCRUB_PREREQS),linux)
14 LTCOMMAND = xfs_scrub
15 INSTALL_SCRUB = install-scrub
16 endif # scrub_prereqs
17
18 HFILES = \
19 common.h \
20 counter.h \
21 disk.h \
22 filemap.h \
23 fscounters.h \
24 inodes.h \
25 scrub.h \
26 spacemap.h \
27 xfs_scrub.h
28
29 CFILES = \
30 common.c \
31 counter.c \
32 disk.c \
33 filemap.c \
34 fscounters.c \
35 inodes.c \
36 phase1.c \
37 phase2.c \
38 scrub.c \
39 spacemap.c \
40 xfs_scrub.c
41
42 LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD)
43 LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG)
44 LLDFLAGS = -static
45
46 ifeq ($(HAVE_MALLINFO),yes)
47 LCFLAGS += -DHAVE_MALLINFO
48 endif
49
50 ifeq ($(HAVE_SYNCFS),yes)
51 LCFLAGS += -DHAVE_SYNCFS
52 endif
53
54 default: depend $(LTCOMMAND)
55
56 include $(BUILDRULES)
57
58 install: default $(INSTALL_SCRUB)
59
60 install-scrub:
61 $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
62 $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
63
64 install-dev:
65
66 -include .dep