]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - io/Makefile
configure: don't check for sync_file_range
[thirdparty/xfsprogs-dev.git] / io / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
3 #
4
5 TOPDIR = ..
6 include $(TOPDIR)/include/builddefs
7
8 LTCOMMAND = xfs_io
9 LSRCFILES = xfs_bmap.sh xfs_freeze.sh xfs_mkfile.sh
10 HFILES = init.h io.h
11 CFILES = init.c \
12 attr.c bmap.c bulkstat.c crc32cselftest.c cowextsize.c encrypt.c \
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 \
15 resblks.c scrub.c seek.c shutdown.c stat.c swapext.c sync.c \
16 truncate.c utimes.c fadvise.c sendfile.c madvise.c mincore.c fiemap.c \
17 sync_file_range.c
18
19 LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBUUID)
20 LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG)
21 LLDFLAGS = -static-libtool-libs
22
23 ifeq ($(HAVE_COPY_FILE_RANGE),yes)
24 CFILES += copy_file_range.c
25 LCFLAGS += -DHAVE_COPY_FILE_RANGE
26 endif
27
28 ifeq ($(HAVE_SYNCFS),yes)
29 LCFLAGS += -DHAVE_SYNCFS
30 endif
31
32 ifeq ($(ENABLE_EDITLINE),yes)
33 LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
34 endif
35
36 ifeq ($(HAVE_FALLOCATE),yes)
37 LCFLAGS += -DHAVE_FALLOCATE
38 endif
39
40 # Also implies PWRITEV
41 ifeq ($(HAVE_PREADV),yes)
42 LCFLAGS += -DHAVE_PREADV -DHAVE_PWRITEV
43 endif
44
45 ifeq ($(HAVE_PWRITEV2),yes)
46 LCFLAGS += -DHAVE_PWRITEV2
47 endif
48
49 ifeq ($(HAVE_READDIR),yes)
50 CFILES += readdir.c
51 LCFLAGS += -DHAVE_READDIR
52 endif
53
54 ifeq ($(HAVE_MREMAP),yes)
55 LCFLAGS += -DHAVE_MREMAP
56 endif
57
58 ifeq ($(HAVE_MAP_SYNC),yes)
59 LCFLAGS += -DHAVE_MAP_SYNC
60 endif
61
62 ifeq ($(HAVE_DEVMAPPER),yes)
63 CFILES += log_writes.c
64 LLDLIBS += $(LIBDEVMAPPER)
65 LCFLAGS += -DHAVE_DEVMAPPER
66 endif
67
68 ifeq ($(HAVE_GETFSMAP),yes)
69 CFILES += fsmap.c
70 endif
71
72 ifeq ($(HAVE_STATFS_FLAGS),yes)
73 LCFLAGS += -DHAVE_STATFS_FLAGS
74 endif
75
76 default: depend $(LTCOMMAND)
77
78 include $(BUILDRULES)
79
80 install: default
81 $(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
82 $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
83 $(LTINSTALL) -m 755 xfs_bmap.sh $(PKG_SBIN_DIR)/xfs_bmap
84 $(LTINSTALL) -m 755 xfs_freeze.sh $(PKG_SBIN_DIR)/xfs_freeze
85 $(LTINSTALL) -m 755 xfs_mkfile.sh $(PKG_SBIN_DIR)/xfs_mkfile
86 install-dev:
87
88 -include .dep