]>
Commit | Line | Data |
---|---|---|
959ef981 | 1 | # SPDX-License-Identifier: GPL-2.0 |
541a1d4f | 2 | # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. |
dfc130f3 | 3 | # |
2bd0ea18 NS |
4 | |
5 | TOPDIR = .. | |
6 | include $(TOPDIR)/include/builddefs | |
7 | ||
e246ba5f | 8 | LTCOMMAND = xfs_io |
d347f827 | 9 | LSRCFILES = xfs_bmap.sh xfs_freeze.sh xfs_mkfile.sh |
3d93ccb7 NS |
10 | HFILES = init.h io.h |
11 | CFILES = init.c \ | |
3c8276c4 | 12 | attr.c bmap.c bulkstat.c crc32cselftest.c cowextsize.c encrypt.c \ |
d9151538 CH |
13 | file.c freeze.c fsuuid.c fsync.c getrusage.c imap.c inject.c label.c \ |
14 | link.c mmap.c open.c parent.c pread.c prealloc.c pwrite.c reflink.c \ | |
3c8276c4 | 15 | resblks.c scrub.c seek.c shutdown.c stat.c swapext.c sync.c \ |
920130ef | 16 | truncate.c utimes.c fadvise.c sendfile.c madvise.c mincore.c fiemap.c |
48c46ee3 | 17 | |
d9151538 | 18 | LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBUUID) |
b28b84ca | 19 | LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) |
ece49dae | 20 | LLDFLAGS = -static-libtool-libs |
3d93ccb7 | 21 | |
628e112a AS |
22 | ifeq ($(HAVE_COPY_FILE_RANGE),yes) |
23 | CFILES += copy_file_range.c | |
24 | LCFLAGS += -DHAVE_COPY_FILE_RANGE | |
25 | endif | |
26 | ||
197d5828 | 27 | ifeq ($(HAVE_SYNC_FILE_RANGE),yes) |
a278c389 DC |
28 | CFILES += sync_file_range.c |
29 | LCFLAGS += -DHAVE_SYNC_FILE_RANGE | |
30 | endif | |
31 | ||
c7dd81c7 ES |
32 | ifeq ($(HAVE_SYNCFS),yes) |
33 | LCFLAGS += -DHAVE_SYNCFS | |
34 | endif | |
35 | ||
d4b9ebda | 36 | ifeq ($(ENABLE_EDITLINE),yes) |
541a1d4f | 37 | LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP) |
d4b9ebda NS |
38 | endif |
39 | ||
c0b5232a ES |
40 | ifeq ($(HAVE_FALLOCATE),yes) |
41 | LCFLAGS += -DHAVE_FALLOCATE | |
42 | endif | |
43 | ||
197d5828 ES |
44 | # Also implies PWRITEV |
45 | ifeq ($(HAVE_PREADV),yes) | |
46 | LCFLAGS += -DHAVE_PREADV -DHAVE_PWRITEV | |
47 | endif | |
48 | ||
c5deeac9 GR |
49 | ifeq ($(HAVE_PWRITEV2),yes) |
50 | LCFLAGS += -DHAVE_PWRITEV2 | |
51 | endif | |
52 | ||
3bc05641 BF |
53 | ifeq ($(HAVE_READDIR),yes) |
54 | CFILES += readdir.c | |
55 | LCFLAGS += -DHAVE_READDIR | |
56 | endif | |
57 | ||
a49984b3 JT |
58 | ifeq ($(HAVE_MREMAP),yes) |
59 | LCFLAGS += -DHAVE_MREMAP | |
60 | endif | |
61 | ||
dad79683 RZ |
62 | ifeq ($(HAVE_MAP_SYNC),yes) |
63 | LCFLAGS += -DHAVE_MAP_SYNC | |
64 | endif | |
65 | ||
851c5d11 RZ |
66 | ifeq ($(HAVE_DEVMAPPER),yes) |
67 | CFILES += log_writes.c | |
68 | LLDLIBS += $(LIBDEVMAPPER) | |
69 | LCFLAGS += -DHAVE_DEVMAPPER | |
70 | endif | |
71 | ||
9b72515a | 72 | ifeq ($(HAVE_GETFSMAP),yes) |
3fcab549 | 73 | CFILES += fsmap.c |
9b72515a | 74 | endif |
3fcab549 | 75 | |
ce9adab0 JM |
76 | ifeq ($(HAVE_STATFS_FLAGS),yes) |
77 | LCFLAGS += -DHAVE_STATFS_FLAGS | |
78 | endif | |
79 | ||
d9320881 | 80 | default: depend $(LTCOMMAND) |
2bd0ea18 NS |
81 | |
82 | include $(BUILDRULES) | |
83 | ||
84 | install: default | |
595e27db CH |
85 | $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) |
86 | $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) | |
87 | $(LTINSTALL) -m 755 xfs_bmap.sh $(PKG_SBIN_DIR)/xfs_bmap | |
88 | $(LTINSTALL) -m 755 xfs_freeze.sh $(PKG_SBIN_DIR)/xfs_freeze | |
89 | $(LTINSTALL) -m 755 xfs_mkfile.sh $(PKG_SBIN_DIR)/xfs_mkfile | |
fc49813f | 90 | install-dev: |
d9320881 DC |
91 | |
92 | -include .dep |