]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - include/builddefs.in
xfsprogs: Release v4.18.0-rc0
[thirdparty/xfsprogs-dev.git] / include / builddefs.in
CommitLineData
2bd0ea18 1#
82805b60 2# Copyright (c) 2004-2006 Silicon Graphics, Inc.
f302e9e4 3# All Rights Reserved.
dfc130f3 4#
f302e9e4
NS
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
2bd0ea18 7# published by the Free Software Foundation.
dfc130f3 8#
2bd0ea18
NS
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.
dfc130f3 12#
f302e9e4
NS
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
2bd0ea18
NS
16#
17# @configure_input@
18#
19
6c6508ec
NS
20ifndef _BUILDDEFS_INCLUDED_
21_BUILDDEFS_INCLUDED_ = 1
286ceebb 22
2bd0ea18
NS
23DEBUG = @debug_build@
24OPTIMIZER = @opt_build@
25MALLOCLIB = @malloc_lib@
4d32d744 26LOADERFLAGS = @LDFLAGS@
717e6142 27LTLDFLAGS = @LDFLAGS@
5c0599b7 28CFLAGS = @CFLAGS@ -D_FILE_OFFSET_BITS=64
c4cd2572 29BUILD_CFLAGS = @BUILD_CFLAGS@ -D_FILE_OFFSET_BITS=64
2bd0ea18 30
6ec3f6ba 31LIBRT = @librt@
639231be 32LIBUUID = @libuuid@
949c0f10 33LIBPTHREAD = @libpthread@
541a1d4f 34LIBTERMCAP = @libtermcap@
d4b9ebda 35LIBEDITLINE = @libeditline@
e246ba5f 36LIBREADLINE = @libreadline@
e4da9941 37LIBBLKID = @libblkid@
851c5d11 38LIBDEVMAPPER = @libdevmapper@
f937adac 39LIBXFS = $(TOPDIR)/libxfs/libxfs.la
5caa042b 40LIBFROG = $(TOPDIR)/libfrog/libfrog.la
3d93ccb7 41LIBXCMD = $(TOPDIR)/libxcmd/libxcmd.la
d321ceac 42LIBXLOG = $(TOPDIR)/libxlog/libxlog.la
f937adac 43LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la
fc49813f 44
9440d84d 45PKG_NAME = @pkg_name@
93d9f139
NS
46PKG_USER = @pkg_user@
47PKG_GROUP = @pkg_group@
9440d84d
NS
48PKG_RELEASE = @pkg_release@
49PKG_VERSION = @pkg_version@
50PKG_PLATFORM = @pkg_platform@
51PKG_DISTRIBUTION= @pkg_distribution@
595e27db
CH
52
53prefix = @prefix@
54exec_prefix = @exec_prefix@
55datarootdir = @datarootdir@
56top_builddir = @top_builddir@
57
9440d84d 58PKG_SBIN_DIR = @sbindir@
595e27db
CH
59PKG_ROOT_SBIN_DIR = @root_sbindir@
60PKG_ROOT_LIB_DIR= @root_libdir@@libdirsuffix@
82805b60 61PKG_LIB_DIR = @libdir@@libdirsuffix@
9440d84d 62PKG_INC_DIR = @includedir@/xfs
595e27db 63DK_INC_DIR = @includedir@/disk
9440d84d
NS
64PKG_MAN_DIR = @mandir@
65PKG_DOC_DIR = @datadir@/doc/@pkg_name@
66PKG_LOCALE_DIR = @datadir@/locale
2bd0ea18 67
9440d84d 68CC = @cc@
e14913c1 69BUILD_CC = @BUILD_CC@
9440d84d
NS
70AWK = @awk@
71SED = @sed@
72TAR = @tar@
73ZIP = @zip@
74MAKE = @make@
75ECHO = @echo@
16c44ed2 76SORT = @sort@
9440d84d 77LN_S = @LN_S@
6abbfed5 78SHELL = @SHELL@
9440d84d
NS
79LIBTOOL = @LIBTOOL@
80MAKEDEPEND = @makedepend@
81
82MSGFMT = @msgfmt@
83MSGMERGE = @msgmerge@
1b758ea9 84XGETTEXT = @xgettext@
8c053393 85LOCALIZED_FILES = @LOCALIZED_FILES@
9440d84d
NS
86
87RPM = @rpm@
88RPMBUILD = @rpmbuild@
89RPM_VERSION = @rpm_version@
f937adac 90
82805b60
TS
91ENABLE_SHARED = @enable_shared@
92ENABLE_GETTEXT = @enable_gettext@
93ENABLE_EDITLINE = @enable_editline@
94ENABLE_READLINE = @enable_readline@
6635d6ab 95ENABLE_BLKID = @enable_blkid@
82805b60 96
9440d84d
NS
97HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
98
0bba1a49
NS
99HAVE_FADVISE = @have_fadvise@
100HAVE_MADVISE = @have_madvise@
101HAVE_MINCORE = @have_mincore@
102HAVE_SENDFILE = @have_sendfile@
cfe6e3f0
NS
103HAVE_GETMNTENT = @have_getmntent@
104HAVE_GETMNTINFO = @have_getmntinfo@
c0b5232a 105HAVE_FALLOCATE = @have_fallocate@
8f0e0912 106HAVE_FIEMAP = @have_fiemap@
197d5828 107HAVE_PREADV = @have_preadv@
c5deeac9 108HAVE_PWRITEV2 = @have_pwritev2@
628e112a 109HAVE_COPY_FILE_RANGE = @have_copy_file_range@
197d5828 110HAVE_SYNC_FILE_RANGE = @have_sync_file_range@
eb24bcff 111HAVE_SYNCFS = @have_syncfs@
3bc05641 112HAVE_READDIR = @have_readdir@
5ae294ea 113HAVE_MNTENT = @have_mntent@
5121281b 114HAVE_FLS = @have_fls@
c14c7b79 115HAVE_FSETXATTR = @have_fsetxattr@
a49984b3 116HAVE_MREMAP = @have_mremap@
6529e656 117NEED_INTERNAL_FSXATTR = @need_internal_fsxattr@
71956d72 118HAVE_GETFSMAP = @have_getfsmap@
ce9adab0 119HAVE_STATFS_FLAGS = @have_statfs_flags@
dad79683 120HAVE_MAP_SYNC = @have_map_sync@
851c5d11 121HAVE_DEVMAPPER = @have_devmapper@
173a0283 122HAVE_MALLINFO = @have_mallinfo@
396cd022 123HAVE_LIBATTR = @have_libattr@
bff5d1a4 124HAVE_LIBICU = @have_libicu@
b364a9c0
DW
125HAVE_OPENAT = @have_openat@
126HAVE_FSTATAT = @have_fstatat@
03c0cd8f
DW
127HAVE_SG_IO = @have_sg_io@
128HAVE_HDIO_GETGEO = @have_hdio_getgeo@
824b5807
DW
129HAVE_SYSTEMD = @have_systemd@
130SYSTEMD_SYSTEM_UNIT_DIR = @systemd_system_unit_dir@
131HAVE_CROND = @have_crond@
132CROND_DIR = @crond_dir@
0bba1a49 133
f8149110 134GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
5e656dbb 135# -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
d3a8db8a 136
9440d84d 137ifeq ($(PKG_PLATFORM),linux)
4a066166 138PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS)
cd960ece
MS
139ifeq ($(HAVE_UMODE_T),yes)
140PCFLAGS += -DHAVE_UMODE_T
141endif
d931d17e 142DEPENDFLAGS = -D__linux__
93d9f139 143endif
2ee06c8d
PS
144ifeq ($(PKG_PLATFORM),gnukfreebsd)
145PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS)
146endif
93d9f139 147ifeq ($(PKG_PLATFORM),darwin)
96f2cfb2 148PCFLAGS = $(GCCFLAGS)
b35b4eb8 149DEPENDFLAGS = -D__APPLE__ -D_DARWIN_FEATURE_64_BIT_INODE
9440d84d 150endif
4f1631ae
RC
151ifeq ($(PKG_PLATFORM),freebsd)
152PLDLIBS = -L/usr/local/lib -lintl
d3a8db8a 153PCFLAGS = -I/usr/local/include $(GCCFLAGS)
d931d17e 154DEPENDFLAGS = -D__FreeBSD__
4f1631ae 155endif
5121281b
JT
156ifeq ($(HAVE_FLS),yes)
157LCFLAGS+= -DHAVE_FLS
158endif
5ae294ea
JT
159ifeq ($(HAVE_MNTENT),yes)
160PCFLAGS+= -DHAVE_MNTENT
161endif
c14c7b79
JT
162ifeq ($(HAVE_FSETXATTR),yes)
163PCFLAGS+= -DHAVE_FSETXATTR
164endif
6635d6ab
JT
165ifeq ($(ENABLE_BLKID),yes)
166PCFLAGS+= -DENABLE_BLKID
167endif
6529e656
DW
168ifeq ($(NEED_INTERNAL_FSXATTR),yes)
169PCFLAGS+= -DOVERRIDE_SYSTEM_FSXATTR
170endif
71956d72
DW
171ifeq ($(HAVE_GETFSMAP),yes)
172PCFLAGS+= -DHAVE_GETFSMAP
173endif
6635d6ab 174
bff5d1a4
DW
175LIBICU_LIBS = @libicu_LIBS@
176LIBICU_CFLAGS = @libicu_CFLAGS@
177
30127fbf
DW
178SANITIZER_CFLAGS += @addrsan_cflags@ @threadsan_cflags@ @ubsan_cflags@
179SANITIZER_LDFLAGS += @addrsan_ldflags@ @threadsan_ldflags@ @ubsan_ldflags@
9440d84d 180
1b0adc71
DW
181# Enable retpolines if available
182HAVE_RETPOLINE = @have_retpoline@
183ifeq ($(HAVE_RETPOLINE),yes)
184OPTIMIZER += @retpoline_cflags@
185LOADERFLAGS += @retpoline_ldflags@
186endif
187
e61f1552
DW
188# Use special ar/ranlib wrappers if we have lto
189HAVE_LTO = @have_lto@
190ifeq ($(HAVE_LTO),yes)
191OPTIMIZER += @lto_cflags@
192LOADERFLAGS += @lto_ldflags@
193AR = @gcc_ar@
194RANLIB = @gcc_ranlib@
195endif
196
0a71e383 197GCFLAGS = $(DEBUG) \
062998e3 198 -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
6b803e5a 199 -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs
f937adac 200
e84ec15d
AM
201ifeq ($(ENABLE_GETTEXT),yes)
202GCFLAGS += -DENABLE_GETTEXT
203endif
204
0a71e383 205BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS)
e99e3d7d
DW
206# First, Sanitizer, Global, Platform, Local CFLAGS
207CFLAGS += $(FCFLAGS) $(SANITIZER_CFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
2bd0ea18 208
3ded4129 209include $(TOPDIR)/include/buildmacros
286ceebb
NS
210
211endif
212
213#
214# For targets that should always be rebuilt,
215# define a target that is never up-to-date.
216# Targets needing this should depend on $(_FORCE)
217_FORCE = __force_build