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