]>
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@ |
f937adac | 38 | LIBXFS = $(TOPDIR)/libxfs/libxfs.la |
5caa042b | 39 | LIBFROG = $(TOPDIR)/libfrog/libfrog.la |
3d93ccb7 | 40 | LIBXCMD = $(TOPDIR)/libxcmd/libxcmd.la |
d321ceac | 41 | LIBXLOG = $(TOPDIR)/libxlog/libxlog.la |
f937adac | 42 | LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la |
fc49813f | 43 | |
9440d84d | 44 | PKG_NAME = @pkg_name@ |
93d9f139 NS |
45 | PKG_USER = @pkg_user@ |
46 | PKG_GROUP = @pkg_group@ | |
9440d84d NS |
47 | PKG_RELEASE = @pkg_release@ |
48 | PKG_VERSION = @pkg_version@ | |
49 | PKG_PLATFORM = @pkg_platform@ | |
50 | PKG_DISTRIBUTION= @pkg_distribution@ | |
595e27db CH |
51 | |
52 | prefix = @prefix@ | |
53 | exec_prefix = @exec_prefix@ | |
54 | datarootdir = @datarootdir@ | |
55 | top_builddir = @top_builddir@ | |
56 | ||
9440d84d | 57 | PKG_SBIN_DIR = @sbindir@ |
595e27db CH |
58 | PKG_ROOT_SBIN_DIR = @root_sbindir@ |
59 | PKG_ROOT_LIB_DIR= @root_libdir@@libdirsuffix@ | |
82805b60 | 60 | PKG_LIB_DIR = @libdir@@libdirsuffix@ |
9440d84d | 61 | PKG_INC_DIR = @includedir@/xfs |
595e27db | 62 | DK_INC_DIR = @includedir@/disk |
9440d84d NS |
63 | PKG_MAN_DIR = @mandir@ |
64 | PKG_DOC_DIR = @datadir@/doc/@pkg_name@ | |
65 | PKG_LOCALE_DIR = @datadir@/locale | |
2bd0ea18 | 66 | |
9440d84d | 67 | CC = @cc@ |
e14913c1 | 68 | BUILD_CC = @BUILD_CC@ |
9440d84d NS |
69 | AWK = @awk@ |
70 | SED = @sed@ | |
71 | TAR = @tar@ | |
72 | ZIP = @zip@ | |
73 | MAKE = @make@ | |
74 | ECHO = @echo@ | |
16c44ed2 | 75 | SORT = @sort@ |
9440d84d | 76 | LN_S = @LN_S@ |
6abbfed5 | 77 | SHELL = @SHELL@ |
9440d84d NS |
78 | LIBTOOL = @LIBTOOL@ |
79 | MAKEDEPEND = @makedepend@ | |
80 | ||
81 | MSGFMT = @msgfmt@ | |
82 | MSGMERGE = @msgmerge@ | |
1b758ea9 | 83 | XGETTEXT = @xgettext@ |
8c053393 | 84 | LOCALIZED_FILES = @LOCALIZED_FILES@ |
9440d84d NS |
85 | |
86 | RPM = @rpm@ | |
87 | RPMBUILD = @rpmbuild@ | |
88 | RPM_VERSION = @rpm_version@ | |
f937adac | 89 | |
82805b60 TS |
90 | ENABLE_SHARED = @enable_shared@ |
91 | ENABLE_GETTEXT = @enable_gettext@ | |
92 | ENABLE_EDITLINE = @enable_editline@ | |
93 | ENABLE_READLINE = @enable_readline@ | |
6635d6ab | 94 | ENABLE_BLKID = @enable_blkid@ |
82805b60 | 95 | |
9440d84d NS |
96 | HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@ |
97 | ||
0bba1a49 NS |
98 | HAVE_FADVISE = @have_fadvise@ |
99 | HAVE_MADVISE = @have_madvise@ | |
100 | HAVE_MINCORE = @have_mincore@ | |
101 | HAVE_SENDFILE = @have_sendfile@ | |
cfe6e3f0 NS |
102 | HAVE_GETMNTENT = @have_getmntent@ |
103 | HAVE_GETMNTINFO = @have_getmntinfo@ | |
c0b5232a | 104 | HAVE_FALLOCATE = @have_fallocate@ |
8f0e0912 | 105 | HAVE_FIEMAP = @have_fiemap@ |
197d5828 | 106 | HAVE_PREADV = @have_preadv@ |
c5deeac9 | 107 | HAVE_PWRITEV2 = @have_pwritev2@ |
628e112a | 108 | HAVE_COPY_FILE_RANGE = @have_copy_file_range@ |
197d5828 | 109 | HAVE_SYNC_FILE_RANGE = @have_sync_file_range@ |
eb24bcff | 110 | HAVE_SYNCFS = @have_syncfs@ |
3bc05641 | 111 | HAVE_READDIR = @have_readdir@ |
5ae294ea | 112 | HAVE_MNTENT = @have_mntent@ |
5121281b | 113 | HAVE_FLS = @have_fls@ |
c14c7b79 | 114 | HAVE_FSETXATTR = @have_fsetxattr@ |
a49984b3 | 115 | HAVE_MREMAP = @have_mremap@ |
6529e656 | 116 | NEED_INTERNAL_FSXATTR = @need_internal_fsxattr@ |
71956d72 | 117 | HAVE_GETFSMAP = @have_getfsmap@ |
ce9adab0 | 118 | HAVE_STATFS_FLAGS = @have_statfs_flags@ |
0bba1a49 | 119 | |
f8149110 | 120 | GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall |
5e656dbb | 121 | # -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl |
d3a8db8a | 122 | |
9440d84d | 123 | ifeq ($(PKG_PLATFORM),linux) |
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__ |
93d9f139 | 129 | endif |
2ee06c8d PS |
130 | ifeq ($(PKG_PLATFORM),gnukfreebsd) |
131 | PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS) | |
132 | endif | |
93d9f139 | 133 | ifeq ($(PKG_PLATFORM),darwin) |
96f2cfb2 | 134 | PCFLAGS = $(GCCFLAGS) |
b35b4eb8 | 135 | DEPENDFLAGS = -D__APPLE__ -D_DARWIN_FEATURE_64_BIT_INODE |
9440d84d | 136 | endif |
4f1631ae RC |
137 | ifeq ($(PKG_PLATFORM),freebsd) |
138 | PLDLIBS = -L/usr/local/lib -lintl | |
d3a8db8a | 139 | PCFLAGS = -I/usr/local/include $(GCCFLAGS) |
d931d17e | 140 | DEPENDFLAGS = -D__FreeBSD__ |
4f1631ae | 141 | endif |
5121281b JT |
142 | ifeq ($(HAVE_FLS),yes) |
143 | LCFLAGS+= -DHAVE_FLS | |
144 | endif | |
5ae294ea JT |
145 | ifeq ($(HAVE_MNTENT),yes) |
146 | PCFLAGS+= -DHAVE_MNTENT | |
147 | endif | |
c14c7b79 JT |
148 | ifeq ($(HAVE_FSETXATTR),yes) |
149 | PCFLAGS+= -DHAVE_FSETXATTR | |
150 | endif | |
6635d6ab JT |
151 | ifeq ($(ENABLE_BLKID),yes) |
152 | PCFLAGS+= -DENABLE_BLKID | |
153 | endif | |
6529e656 DW |
154 | ifeq ($(NEED_INTERNAL_FSXATTR),yes) |
155 | PCFLAGS+= -DOVERRIDE_SYSTEM_FSXATTR | |
156 | endif | |
71956d72 DW |
157 | ifeq ($(HAVE_GETFSMAP),yes) |
158 | PCFLAGS+= -DHAVE_GETFSMAP | |
159 | endif | |
6635d6ab | 160 | |
30127fbf DW |
161 | SANITIZER_CFLAGS += @addrsan_cflags@ @threadsan_cflags@ @ubsan_cflags@ |
162 | SANITIZER_LDFLAGS += @addrsan_ldflags@ @threadsan_ldflags@ @ubsan_ldflags@ | |
9440d84d | 163 | |
0a71e383 | 164 | GCFLAGS = $(DEBUG) \ |
062998e3 | 165 | -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \ |
6b803e5a | 166 | -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs |
f937adac | 167 | |
e84ec15d AM |
168 | ifeq ($(ENABLE_GETTEXT),yes) |
169 | GCFLAGS += -DENABLE_GETTEXT | |
170 | endif | |
171 | ||
0a71e383 | 172 | BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS) |
e99e3d7d DW |
173 | # First, Sanitizer, Global, Platform, Local CFLAGS |
174 | CFLAGS += $(FCFLAGS) $(SANITIZER_CFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS) | |
2bd0ea18 | 175 | |
3ded4129 | 176 | include $(TOPDIR)/include/buildmacros |
286ceebb NS |
177 | |
178 | endif | |
179 | ||
180 | # | |
181 | # For targets that should always be rebuilt, | |
182 | # define a target that is never up-to-date. | |
183 | # Targets needing this should depend on $(_FORCE) | |
184 | _FORCE = __force_build |