]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - io/Makefile
xfs_io: implement 'utimes' command
[thirdparty/xfsprogs-dev.git] / io / Makefile
1 #
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 cowextsize.c encrypt.c file.c freeze.c fsync.c \
13 getrusage.c imap.c link.c mmap.c open.c parent.c pread.c prealloc.c \
14 pwrite.c reflink.c seek.c shutdown.c sync.c truncate.c utimes.c
15
16 LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBPTHREAD)
17 LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE)
18 LLDFLAGS = -static-libtool-libs
19
20 ifeq ($(HAVE_FADVISE),yes)
21 CFILES += fadvise.c
22 LCFLAGS += -DHAVE_FADVISE
23 else
24 LSRCFILES += fadvise.c
25 endif
26
27 ifeq ($(HAVE_MADVISE),yes)
28 CFILES += madvise.c
29 LCFLAGS += -DHAVE_MADVISE
30 else
31 LSRCFILES += madvise.c
32 endif
33
34 ifeq ($(HAVE_MINCORE),yes)
35 CFILES += mincore.c
36 LCFLAGS += -DHAVE_MINCORE
37 else
38 LSRCFILES += mincore.c
39 endif
40
41 ifeq ($(HAVE_SENDFILE),yes)
42 CFILES += sendfile.c
43 LCFLAGS += -DHAVE_SENDFILE
44 else
45 LSRCFILES += sendfile.c
46 endif
47
48 ifeq ($(HAVE_FIEMAP),yes)
49 CFILES += fiemap.c
50 LCFLAGS += -DHAVE_FIEMAP
51 else
52 LSRCFILES += fiemap.c
53 endif
54
55 ifeq ($(PKG_PLATFORM),irix)
56 LSRCFILES += inject.c resblks.c
57 else
58 CFILES += inject.c resblks.c
59 LCFLAGS += -DHAVE_INJECT -DHAVE_RESBLKS
60 endif
61
62 ifeq ($(HAVE_COPY_FILE_RANGE),yes)
63 CFILES += copy_file_range.c
64 LCFLAGS += -DHAVE_COPY_FILE_RANGE
65 endif
66
67 ifeq ($(HAVE_SYNC_FILE_RANGE),yes)
68 CFILES += sync_file_range.c
69 LCFLAGS += -DHAVE_SYNC_FILE_RANGE
70 endif
71
72 ifeq ($(HAVE_SYNCFS),yes)
73 LCFLAGS += -DHAVE_SYNCFS
74 endif
75
76 ifeq ($(ENABLE_READLINE),yes)
77 LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
78 endif
79
80 ifeq ($(ENABLE_EDITLINE),yes)
81 LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
82 endif
83
84 ifeq ($(HAVE_FALLOCATE),yes)
85 LCFLAGS += -DHAVE_FALLOCATE
86 endif
87
88 # Also implies PWRITEV
89 ifeq ($(HAVE_PREADV),yes)
90 LCFLAGS += -DHAVE_PREADV -DHAVE_PWRITEV
91 endif
92
93 ifeq ($(HAVE_READDIR),yes)
94 CFILES += readdir.c
95 LCFLAGS += -DHAVE_READDIR
96 endif
97
98 ifeq ($(HAVE_MREMAP),yes)
99 LCFLAGS += -DHAVE_MREMAP
100 endif
101
102 default: depend $(LTCOMMAND)
103
104 include $(BUILDRULES)
105
106 install: default
107 $(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
108 $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
109 $(LTINSTALL) -m 755 xfs_bmap.sh $(PKG_SBIN_DIR)/xfs_bmap
110 $(LTINSTALL) -m 755 xfs_freeze.sh $(PKG_SBIN_DIR)/xfs_freeze
111 $(LTINSTALL) -m 755 xfs_mkfile.sh $(PKG_SBIN_DIR)/xfs_mkfile
112 install-dev:
113
114 -include .dep