]>
Commit | Line | Data |
---|---|---|
95b1e505 DW |
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 \ | |
a555a1f4 | 20 | disk.h \ |
c6eb0ff2 | 21 | filemap.h \ |
372d4ba9 | 22 | inodes.h \ |
bc94c5d6 | 23 | spacemap.h \ |
95b1e505 DW |
24 | xfs_scrub.h |
25 | ||
26 | CFILES = \ | |
27 | common.c \ | |
a555a1f4 | 28 | disk.c \ |
c6eb0ff2 | 29 | filemap.c \ |
372d4ba9 | 30 | inodes.c \ |
50a573a7 | 31 | phase1.c \ |
bc94c5d6 | 32 | spacemap.c \ |
95b1e505 DW |
33 | xfs_scrub.c |
34 | ||
35 | LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) | |
36 | LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG) | |
37 | LLDFLAGS = -static | |
38 | ||
173a0283 DW |
39 | ifeq ($(HAVE_MALLINFO),yes) |
40 | LCFLAGS += -DHAVE_MALLINFO | |
41 | endif | |
42 | ||
50a573a7 DW |
43 | ifeq ($(HAVE_SYNCFS),yes) |
44 | LCFLAGS += -DHAVE_SYNCFS | |
45 | endif | |
46 | ||
95b1e505 DW |
47 | default: depend $(LTCOMMAND) |
48 | ||
49 | include $(BUILDRULES) | |
50 | ||
51 | install: default $(INSTALL_SCRUB) | |
52 | ||
53 | install-scrub: | |
54 | $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR) | |
55 | $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR) | |
56 | ||
57 | install-dev: | |
58 | ||
59 | -include .dep |