]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/builddefs.in
fd274ddc66d80bd70180632753087117128d73fd
[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@ -D_FILE_OFFSET_BITS=64
29 BUILD_CFLAGS = @BUILD_CFLAGS@ -D_FILE_OFFSET_BITS=64
30
31 LIBRT = @librt@
32 LIBUUID = @libuuid@
33 LIBPTHREAD = @libpthread@
34 LIBTERMCAP = @libtermcap@
35 LIBEDITLINE = @libeditline@
36 LIBREADLINE = @libreadline@
37 LIBBLKID = @libblkid@
38 LIBXFS = $(TOPDIR)/libxfs/libxfs.la
39 LIBXCMD = $(TOPDIR)/libxcmd/libxcmd.la
40 LIBXLOG = $(TOPDIR)/libxlog/libxlog.la
41 LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la
42
43 PKG_NAME = @pkg_name@
44 PKG_USER = @pkg_user@
45 PKG_GROUP = @pkg_group@
46 PKG_RELEASE = @pkg_release@
47 PKG_VERSION = @pkg_version@
48 PKG_PLATFORM = @pkg_platform@
49 PKG_DISTRIBUTION= @pkg_distribution@
50
51 prefix = @prefix@
52 exec_prefix = @exec_prefix@
53 datarootdir = @datarootdir@
54 top_builddir = @top_builddir@
55
56 PKG_SBIN_DIR = @sbindir@
57 PKG_ROOT_SBIN_DIR = @root_sbindir@
58 PKG_ROOT_LIB_DIR= @root_libdir@@libdirsuffix@
59 PKG_LIB_DIR = @libdir@@libdirsuffix@
60 PKG_INC_DIR = @includedir@/xfs
61 DK_INC_DIR = @includedir@/disk
62 PKG_MAN_DIR = @mandir@
63 PKG_DOC_DIR = @datadir@/doc/@pkg_name@
64 PKG_LOCALE_DIR = @datadir@/locale
65
66 CC = @cc@
67 BUILD_CC = @BUILD_CC@
68 AWK = @awk@
69 SED = @sed@
70 TAR = @tar@
71 ZIP = @zip@
72 MAKE = @make@
73 ECHO = @echo@
74 SORT = @sort@
75 LN_S = @LN_S@
76 SHELL = @SHELL@
77 LIBTOOL = @LIBTOOL@
78 MAKEDEPEND = @makedepend@
79
80 MSGFMT = @msgfmt@
81 MSGMERGE = @msgmerge@
82 XGETTEXT = @xgettext@
83 LOCALIZED_FILES = @LOCALIZED_FILES@
84
85 RPM = @rpm@
86 RPMBUILD = @rpmbuild@
87 RPM_VERSION = @rpm_version@
88
89 ENABLE_SHARED = @enable_shared@
90 ENABLE_GETTEXT = @enable_gettext@
91 ENABLE_EDITLINE = @enable_editline@
92 ENABLE_READLINE = @enable_readline@
93 ENABLE_BLKID = @enable_blkid@
94
95 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
96
97 HAVE_FADVISE = @have_fadvise@
98 HAVE_MADVISE = @have_madvise@
99 HAVE_MINCORE = @have_mincore@
100 HAVE_SENDFILE = @have_sendfile@
101 HAVE_GETMNTENT = @have_getmntent@
102 HAVE_GETMNTINFO = @have_getmntinfo@
103 HAVE_FALLOCATE = @have_fallocate@
104 HAVE_FIEMAP = @have_fiemap@
105 HAVE_PREADV = @have_preadv@
106 HAVE_PWRITEV2 = @have_pwritev2@
107 HAVE_COPY_FILE_RANGE = @have_copy_file_range@
108 HAVE_SYNC_FILE_RANGE = @have_sync_file_range@
109 HAVE_SYNCFS = @have_syncfs@
110 HAVE_READDIR = @have_readdir@
111 HAVE_MNTENT = @have_mntent@
112 HAVE_FLS = @have_fls@
113 HAVE_FSETXATTR = @have_fsetxattr@
114 HAVE_MREMAP = @have_mremap@
115 NEED_INTERNAL_FSXATTR = @need_internal_fsxattr@
116 HAVE_GETFSMAP = @have_getfsmap@
117 HAVE_STATFS_FLAGS = @have_statfs_flags@
118
119 GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
120 # -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
121
122 ifeq ($(PKG_PLATFORM),linux)
123 PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS)
124 ifeq ($(HAVE_UMODE_T),yes)
125 PCFLAGS += -DHAVE_UMODE_T
126 endif
127 DEPENDFLAGS = -D__linux__
128 endif
129 ifeq ($(PKG_PLATFORM),gnukfreebsd)
130 PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS)
131 endif
132 ifeq ($(PKG_PLATFORM),darwin)
133 PCFLAGS = $(GCCFLAGS)
134 DEPENDFLAGS = -D__APPLE__ -D_DARWIN_FEATURE_64_BIT_INODE
135 endif
136 ifeq ($(PKG_PLATFORM),freebsd)
137 PLDLIBS = -L/usr/local/lib -lintl
138 PCFLAGS = -I/usr/local/include $(GCCFLAGS)
139 DEPENDFLAGS = -D__FreeBSD__
140 endif
141 ifeq ($(HAVE_FLS),yes)
142 LCFLAGS+= -DHAVE_FLS
143 endif
144 ifeq ($(HAVE_MNTENT),yes)
145 PCFLAGS+= -DHAVE_MNTENT
146 endif
147 ifeq ($(HAVE_FSETXATTR),yes)
148 PCFLAGS+= -DHAVE_FSETXATTR
149 endif
150 ifeq ($(ENABLE_BLKID),yes)
151 PCFLAGS+= -DENABLE_BLKID
152 endif
153 ifeq ($(NEED_INTERNAL_FSXATTR),yes)
154 PCFLAGS+= -DOVERRIDE_SYSTEM_FSXATTR
155 endif
156 ifeq ($(HAVE_GETFSMAP),yes)
157 PCFLAGS+= -DHAVE_GETFSMAP
158 endif
159
160 SANITIZER_CFLAGS += @addrsan_cflags@ @threadsan_cflags@ @ubsan_cflags@
161 SANITIZER_LDFLAGS += @addrsan_ldflags@ @threadsan_ldflags@ @ubsan_ldflags@
162
163 GCFLAGS = $(DEBUG) \
164 -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
165 -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs
166
167 ifeq ($(ENABLE_GETTEXT),yes)
168 GCFLAGS += -DENABLE_GETTEXT
169 endif
170
171 BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS)
172 # First, Sanitizer, Global, Platform, Local CFLAGS
173 CFLAGS += $(FCFLAGS) $(SANITIZER_CFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
174
175 include $(TOPDIR)/include/buildmacros
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