]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/builddefs.in
xfs_io: implement 'copy_range' command
[thirdparty/xfsprogs-dev.git] / include / builddefs.in
1 #
2 # Copyright (c) 2004-2006 Silicon Graphics, Inc.
3 # All Rights Reserved.
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it would be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write the Free Software Foundation,
15 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 #
17 # @configure_input@
18 #
19
20 ifndef _BUILDDEFS_INCLUDED_
21 _BUILDDEFS_INCLUDED_ = 1
22
23 DEBUG = @debug_build@
24 OPTIMIZER = @opt_build@
25 MALLOCLIB = @malloc_lib@
26 LOADERFLAGS = @LDFLAGS@
27 LTLDFLAGS = @LDFLAGS@
28 CFLAGS = @CFLAGS@
29
30 LIBRT = @librt@
31 LIBUUID = @libuuid@
32 LIBPTHREAD = @libpthread@
33 LIBTERMCAP = @libtermcap@
34 LIBEDITLINE = @libeditline@
35 LIBREADLINE = @libreadline@
36 LIBBLKID = @libblkid@
37 LIBXFS = $(TOPDIR)/libxfs/libxfs.la
38 LIBXCMD = $(TOPDIR)/libxcmd/libxcmd.la
39 LIBXLOG = $(TOPDIR)/libxlog/libxlog.la
40 LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la
41
42 PKG_NAME = @pkg_name@
43 PKG_USER = @pkg_user@
44 PKG_GROUP = @pkg_group@
45 PKG_RELEASE = @pkg_release@
46 PKG_VERSION = @pkg_version@
47 PKG_PLATFORM = @pkg_platform@
48 PKG_DISTRIBUTION= @pkg_distribution@
49
50 prefix = @prefix@
51 exec_prefix = @exec_prefix@
52 datarootdir = @datarootdir@
53 top_builddir = @top_builddir@
54
55 PKG_SBIN_DIR = @sbindir@
56 PKG_ROOT_SBIN_DIR = @root_sbindir@
57 PKG_ROOT_LIB_DIR= @root_libdir@@libdirsuffix@
58 PKG_LIB_DIR = @libdir@@libdirsuffix@
59 PKG_INC_DIR = @includedir@/xfs
60 DK_INC_DIR = @includedir@/disk
61 PKG_MAN_DIR = @mandir@
62 PKG_DOC_DIR = @datadir@/doc/@pkg_name@
63 PKG_LOCALE_DIR = @datadir@/locale
64
65 CC = @cc@
66 BUILD_CC = @BUILD_CC@
67 AWK = @awk@
68 SED = @sed@
69 TAR = @tar@
70 ZIP = @zip@
71 MAKE = @make@
72 ECHO = @echo@
73 SORT = @sort@
74 LN_S = @LN_S@
75 SHELL = @SHELL@
76 LIBTOOL = @LIBTOOL@
77 MAKEDEPEND = @makedepend@
78
79 MSGFMT = @msgfmt@
80 MSGMERGE = @msgmerge@
81 XGETTEXT = @xgettext@
82 LOCALIZED_FILES = @LOCALIZED_FILES@
83
84 RPM = @rpm@
85 RPMBUILD = @rpmbuild@
86 RPM_VERSION = @rpm_version@
87
88 ENABLE_SHARED = @enable_shared@
89 ENABLE_GETTEXT = @enable_gettext@
90 ENABLE_EDITLINE = @enable_editline@
91 ENABLE_READLINE = @enable_readline@
92 ENABLE_BLKID = @enable_blkid@
93
94 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
95
96 HAVE_FADVISE = @have_fadvise@
97 HAVE_MADVISE = @have_madvise@
98 HAVE_MINCORE = @have_mincore@
99 HAVE_SENDFILE = @have_sendfile@
100 HAVE_GETMNTENT = @have_getmntent@
101 HAVE_GETMNTINFO = @have_getmntinfo@
102 HAVE_FALLOCATE = @have_fallocate@
103 HAVE_FIEMAP = @have_fiemap@
104 HAVE_PREADV = @have_preadv@
105 HAVE_COPY_FILE_RANGE = @have_copy_file_range@
106 HAVE_SYNC_FILE_RANGE = @have_sync_file_range@
107 HAVE_READDIR = @have_readdir@
108 HAVE_MNTENT = @have_mntent@
109 HAVE_FLS = @have_fls@
110 HAVE_FSETXATTR = @have_fsetxattr@
111 HAVE_MREMAP = @have_mremap@
112
113 GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
114 # -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
115
116 ifeq ($(PKG_PLATFORM),linux)
117 PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
118 ifeq ($(HAVE_UMODE_T),yes)
119 PCFLAGS += -DHAVE_UMODE_T
120 endif
121 DEPENDFLAGS = -D__linux__
122 endif
123 ifeq ($(PKG_PLATFORM),gnukfreebsd)
124 PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS)
125 endif
126 ifeq ($(PKG_PLATFORM),darwin)
127 PCFLAGS = $(GCCFLAGS)
128 DEPENDFLAGS = -D__APPLE__ -D_DARWIN_FEATURE_64_BIT_INODE
129 endif
130 ifeq ($(PKG_PLATFORM),irix)
131 PLDLIBS = -ldisk -lgen
132 DEPENDFLAGS = -D__sgi__
133 endif
134 ifeq ($(PKG_PLATFORM),freebsd)
135 PLDLIBS = -L/usr/local/lib -lintl
136 PCFLAGS = -I/usr/local/include $(GCCFLAGS)
137 DEPENDFLAGS = -D__FreeBSD__
138 endif
139 ifeq ($(HAVE_FLS),yes)
140 LCFLAGS+= -DHAVE_FLS
141 endif
142 ifeq ($(HAVE_MNTENT),yes)
143 PCFLAGS+= -DHAVE_MNTENT
144 endif
145 ifeq ($(HAVE_FSETXATTR),yes)
146 PCFLAGS+= -DHAVE_FSETXATTR
147 endif
148 ifeq ($(ENABLE_BLKID),yes)
149 PCFLAGS+= -DENABLE_BLKID
150 endif
151
152
153 GCFLAGS = $(OPTIMIZER) $(DEBUG) \
154 -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
155 -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs
156
157 ifeq ($(ENABLE_GETTEXT),yes)
158 GCFLAGS += -DENABLE_GETTEXT
159 endif
160
161 # First, Global, Platform, Local CFLAGS
162 CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
163
164 include $(TOPDIR)/include/buildmacros
165
166 endif
167
168 #
169 # For targets that should always be rebuilt,
170 # define a target that is never up-to-date.
171 # Targets needing this should depend on $(_FORCE)
172 _FORCE = __force_build