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