]>
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 \ | |
d11cc69e | 20 | counter.h \ |
a555a1f4 | 21 | disk.h \ |
c6eb0ff2 | 22 | filemap.h \ |
604dd334 | 23 | fscounters.h \ |
372d4ba9 | 24 | inodes.h \ |
fd7d73c0 | 25 | scrub.h \ |
bc94c5d6 | 26 | spacemap.h \ |
4bbed4ec | 27 | unicrash.h \ |
95b1e505 DW |
28 | xfs_scrub.h |
29 | ||
30 | CFILES = \ | |
31 | common.c \ | |
d11cc69e | 32 | counter.c \ |
a555a1f4 | 33 | disk.c \ |
c6eb0ff2 | 34 | filemap.c \ |
604dd334 | 35 | fscounters.c \ |
372d4ba9 | 36 | inodes.c \ |
50a573a7 | 37 | phase1.c \ |
e758ad01 | 38 | phase2.c \ |
fa16b376 | 39 | phase3.c \ |
c4892e76 | 40 | phase5.c \ |
fd7d73c0 | 41 | scrub.c \ |
bc94c5d6 | 42 | spacemap.c \ |
95b1e505 DW |
43 | xfs_scrub.c |
44 | ||
4bbed4ec DW |
45 | LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBUNISTRING) |
46 | LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG) $(LIBUNISTRING) | |
95b1e505 DW |
47 | LLDFLAGS = -static |
48 | ||
173a0283 DW |
49 | ifeq ($(HAVE_MALLINFO),yes) |
50 | LCFLAGS += -DHAVE_MALLINFO | |
51 | endif | |
52 | ||
50a573a7 DW |
53 | ifeq ($(HAVE_SYNCFS),yes) |
54 | LCFLAGS += -DHAVE_SYNCFS | |
55 | endif | |
56 | ||
396cd022 DW |
57 | ifeq ($(HAVE_LIBATTR),yes) |
58 | LCFLAGS += -DHAVE_LIBATTR | |
59 | endif | |
60 | ||
4bbed4ec DW |
61 | ifeq ($(HAVE_U8NORMALIZE),yes) |
62 | CFILES += unicrash.c | |
63 | LCFLAGS += -DHAVE_U8NORMALIZE | |
64 | endif | |
65 | ||
95b1e505 DW |
66 | default: depend $(LTCOMMAND) |
67 | ||
4bbed4ec | 68 | phase5.o unicrash.o xfs.o: $(TOPDIR)/include/builddefs |
396cd022 | 69 | |
95b1e505 DW |
70 | include $(BUILDRULES) |
71 | ||
72 | install: default $(INSTALL_SCRUB) | |
73 | ||
74 | install-scrub: | |
75 | $(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR) | |
76 | $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR) | |
77 | ||
78 | install-dev: | |
79 | ||
80 | -include .dep |