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