# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2004-2006 Silicon Graphics, Inc.
# All Rights Reserved.
#
# include/builddefs.  Generated from builddefs.in by configure.
#

ifndef _BUILDDEFS_INCLUDED_
_BUILDDEFS_INCLUDED_ = 1

DEBUG = -DDEBUG
OPTIMIZER = -g -O2
MALLOCLIB = 
LOADERFLAGS = 
LTLDFLAGS = 
CFLAGS = -g -O2 -D_FILE_OFFSET_BITS=64
BUILD_CFLAGS = -g -O2 -D_FILE_OFFSET_BITS=64

LIBRT = -lrt
LIBUUID = -luuid
LIBPTHREAD = -lpthread
LIBTERMCAP = 
LIBEDITLINE = 
LIBREADLINE = 
LIBBLKID = -lblkid
LIBDEVMAPPER = 
LIBXFS = $(TOPDIR)/libxfs/libxfs.la
LIBFROG = $(TOPDIR)/libfrog/libfrog.la
LIBXCMD = $(TOPDIR)/libxcmd/libxcmd.la
LIBXLOG = $(TOPDIR)/libxlog/libxlog.la
LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la

PKG_NAME	= xfsprogs
PKG_USER	= thomas
PKG_GROUP	= thomas
PKG_RELEASE	= 1
PKG_VERSION	= 4.20.0
PKG_DISTRIBUTION= Linux

prefix		= /usr
exec_prefix	= ${prefix}
datarootdir	= ${prefix}/share
top_builddir	= ..

PKG_SBIN_DIR	= ${exec_prefix}/sbin
PKG_ROOT_SBIN_DIR = /sbin
PKG_ROOT_LIB_DIR= /lib
PKG_LIB_DIR	= ${exec_prefix}/lib
PKG_INC_DIR	= ${prefix}/include/xfs
DK_INC_DIR	= ${prefix}/include/disk
PKG_MAN_DIR	= ${datarootdir}/man
PKG_DOC_DIR	= ${datarootdir}/doc/xfsprogs
PKG_LOCALE_DIR	= ${datarootdir}/locale

CC		= gcc
BUILD_CC	= gcc
AWK		= gawk
SED		= /bin/sed
TAR		= /bin/tar
ZIP		= /bin/gzip
MAKE		= /usr/bin/make
ECHO		= printf %s\n
SORT		= /usr/bin/sort
LN_S		= ln -s
SHELL		= /bin/bash
LIBTOOL		= $(SHELL) $(top_builddir)/libtool
MAKEDEPEND	= gcc -MM

MSGFMT		= /usr/bin/msgfmt
MSGMERGE	= /usr/bin/msgmerge
XGETTEXT	= /usr/bin/xgettext
LOCALIZED_FILES	=  $(TOPDIR)/./mdrestore/xfs_mdrestore.c $(TOPDIR)/./scrub/filemap.c $(TOPDIR)/./scrub/unicrash.c $(TOPDIR)/./scrub/phase2.c $(TOPDIR)/./scrub/scrub.c $(TOPDIR)/./scrub/phase5.c $(TOPDIR)/./scrub/spacemap.c $(TOPDIR)/./scrub/phase6.c $(TOPDIR)/./scrub/inodes.c $(TOPDIR)/./scrub/bitmap.c $(TOPDIR)/./scrub/common.c $(TOPDIR)/./scrub/read_verify.c $(TOPDIR)/./scrub/phase7.c $(TOPDIR)/./scrub/counter.c $(TOPDIR)/./scrub/progress.c $(TOPDIR)/./scrub/vfs.c $(TOPDIR)/./scrub/xfs_scrub.c $(TOPDIR)/./scrub/repair.c $(TOPDIR)/./scrub/disk.c $(TOPDIR)/./scrub/phase3.c $(TOPDIR)/./scrub/phase1.c $(TOPDIR)/./scrub/fscounters.c $(TOPDIR)/./scrub/phase4.c $(TOPDIR)/./mkfs/xfs_mkfs.c $(TOPDIR)/./mkfs/proto.c $(TOPDIR)/./io/fsmap.c $(TOPDIR)/./io/fadvise.c $(TOPDIR)/./io/seek.c $(TOPDIR)/./io/log_writes.c $(TOPDIR)/./io/cowextsize.c $(TOPDIR)/./io/sendfile.c $(TOPDIR)/./io/scrub.c $(TOPDIR)/./io/readdir.c $(TOPDIR)/./io/madvise.c $(TOPDIR)/./io/attr.c $(TOPDIR)/./io/label.c $(TOPDIR)/./io/shutdown.c $(TOPDIR)/./io/truncate.c $(TOPDIR)/./io/encrypt.c $(TOPDIR)/./io/reflink.c $(TOPDIR)/./io/init.c $(TOPDIR)/./io/open.c $(TOPDIR)/./io/link.c $(TOPDIR)/./io/mincore.c $(TOPDIR)/./io/bmap.c $(TOPDIR)/./io/crc32cselftest.c $(TOPDIR)/./io/stat.c $(TOPDIR)/./io/pwrite.c $(TOPDIR)/./io/copy_file_range.c $(TOPDIR)/./io/resblks.c $(TOPDIR)/./io/freeze.c $(TOPDIR)/./io/imap.c $(TOPDIR)/./io/parent.c $(TOPDIR)/./io/sync_file_range.c $(TOPDIR)/./io/file.c $(TOPDIR)/./io/mmap.c $(TOPDIR)/./io/inject.c $(TOPDIR)/./io/sync.c $(TOPDIR)/./io/fsync.c $(TOPDIR)/./io/fiemap.c $(TOPDIR)/./io/prealloc.c $(TOPDIR)/./io/pread.c $(TOPDIR)/./io/utimes.c $(TOPDIR)/./io/swapext.c $(TOPDIR)/./io/getrusage.c $(TOPDIR)/./quota/free.c $(TOPDIR)/./quota/util.c $(TOPDIR)/./quota/quota.c $(TOPDIR)/./quota/project.c $(TOPDIR)/./quota/quot.c $(TOPDIR)/./quota/path.c $(TOPDIR)/./quota/init.c $(TOPDIR)/./quota/linux.c $(TOPDIR)/./quota/report.c $(TOPDIR)/./quota/state.c $(TOPDIR)/./quota/edit.c $(TOPDIR)/./libfrog/fsgeom.c $(TOPDIR)/./libfrog/topology.c $(TOPDIR)/./libfrog/util.c $(TOPDIR)/./libfrog/projects.c $(TOPDIR)/./libfrog/gen_crc32table.c $(TOPDIR)/./libfrog/paths.c $(TOPDIR)/./libfrog/radix-tree.c $(TOPDIR)/./libfrog/ptvar.c $(TOPDIR)/./libfrog/list_sort.c $(TOPDIR)/./libfrog/linux.c $(TOPDIR)/./libfrog/workqueue.c $(TOPDIR)/./libfrog/avl64.c $(TOPDIR)/./libfrog/crc32.c $(TOPDIR)/./libfrog/convert.c $(TOPDIR)/./libxlog/xfs_log_recover.c $(TOPDIR)/./libxlog/util.c $(TOPDIR)/./repair/scan.c $(TOPDIR)/./repair/incore_ino.c $(TOPDIR)/./repair/versions.c $(TOPDIR)/./repair/da_util.c $(TOPDIR)/./repair/phase2.c $(TOPDIR)/./repair/phase5.c $(TOPDIR)/./repair/avl.c $(TOPDIR)/./repair/incore_ext.c $(TOPDIR)/./repair/phase6.c $(TOPDIR)/./repair/globals.c $(TOPDIR)/./repair/xfs_repair.c $(TOPDIR)/./repair/btree.c $(TOPDIR)/./repair/init.c $(TOPDIR)/./repair/dir2.c $(TOPDIR)/./repair/rmap.c $(TOPDIR)/./repair/attr_repair.c $(TOPDIR)/./repair/dino_chunks.c $(TOPDIR)/./repair/prefetch.c $(TOPDIR)/./repair/bmap.c $(TOPDIR)/./repair/phase7.c $(TOPDIR)/./repair/incore.c $(TOPDIR)/./repair/threads.c $(TOPDIR)/./repair/progress.c $(TOPDIR)/./repair/agheader.c $(TOPDIR)/./repair/rt.c $(TOPDIR)/./repair/dinode.c $(TOPDIR)/./repair/slab.c $(TOPDIR)/./repair/sb.c $(TOPDIR)/./repair/phase3.c $(TOPDIR)/./repair/phase1.c $(TOPDIR)/./repair/incore_bmc.c $(TOPDIR)/./repair/phase4.c $(TOPDIR)/./libxcmd/help.c $(TOPDIR)/./libxcmd/quit.c $(TOPDIR)/./libxcmd/command.c $(TOPDIR)/./libxcmd/input.c $(TOPDIR)/./rtcp/xfs_rtcp.c $(TOPDIR)/./fsr/xfs_fsr.c $(TOPDIR)/./logprint/logprint.c $(TOPDIR)/./logprint/log_print_all.c $(TOPDIR)/./logprint/log_dump.c $(TOPDIR)/./logprint/log_print_trans.c $(TOPDIR)/./logprint/log_misc.c $(TOPDIR)/./logprint/log_redo.c $(TOPDIR)/./logprint/log_copy.c $(TOPDIR)/./libhandle/jdm.c $(TOPDIR)/./libhandle/handle.c $(TOPDIR)/./libxfs/xfs_refcount.c $(TOPDIR)/./libxfs/xfs_ag_resv.c $(TOPDIR)/./libxfs/xfs_rmap.c $(TOPDIR)/./libxfs/xfs_log_rlimit.c $(TOPDIR)/./libxfs/xfs_dir2.c $(TOPDIR)/./libxfs/util.c $(TOPDIR)/./libxfs/xfs_dir2_data.c $(TOPDIR)/./libxfs/xfs_refcount_btree.c $(TOPDIR)/./libxfs/xfs_iext_tree.c $(TOPDIR)/./libxfs/xfs_attr_remote.c $(TOPDIR)/./libxfs/xfs_dir2_leaf.c $(TOPDIR)/./libxfs/xfs_da_btree.c $(TOPDIR)/./libxfs/kmem.c $(TOPDIR)/./libxfs/rdwr.c $(TOPDIR)/./libxfs/xfs_btree.c $(TOPDIR)/./libxfs/xfs_inode_buf.c $(TOPDIR)/./libxfs/cache.c $(TOPDIR)/./libxfs/xfs_alloc.c $(TOPDIR)/./libxfs/init.c $(TOPDIR)/./libxfs/xfs_types.c $(TOPDIR)/./libxfs/xfs_bit.c $(TOPDIR)/./libxfs/trans.c $(TOPDIR)/./libxfs/xfs_inode_fork.c $(TOPDIR)/./libxfs/xfs_bmap.c $(TOPDIR)/./libxfs/xfs_dir2_sf.c $(TOPDIR)/./libxfs/xfs_sb.c $(TOPDIR)/./libxfs/xfs_rtbitmap.c $(TOPDIR)/./libxfs/xfs_trans_resv.c $(TOPDIR)/./libxfs/xfs_alloc_btree.c $(TOPDIR)/./libxfs/xfs_attr_leaf.c $(TOPDIR)/./libxfs/xfs_ag.c $(TOPDIR)/./libxfs/xfs_ialloc.c $(TOPDIR)/./libxfs/xfs_symlink_remote.c $(TOPDIR)/./libxfs/xfs_attr.c $(TOPDIR)/./libxfs/defer_item.c $(TOPDIR)/./libxfs/xfs_dir2_block.c $(TOPDIR)/./libxfs/logitem.c $(TOPDIR)/./libxfs/xfs_dquot_buf.c $(TOPDIR)/./libxfs/xfs_da_format.c $(TOPDIR)/./libxfs/xfs_rmap_btree.c $(TOPDIR)/./libxfs/xfs_dir2_node.c $(TOPDIR)/./libxfs/xfs_defer.c $(TOPDIR)/./libxfs/xfs_bmap_btree.c $(TOPDIR)/./libxfs/xfs_ialloc_btree.c $(TOPDIR)/./spaceman/info.c $(TOPDIR)/./spaceman/init.c $(TOPDIR)/./spaceman/freesp.c $(TOPDIR)/./spaceman/trim.c $(TOPDIR)/./spaceman/file.c $(TOPDIR)/./spaceman/prealloc.c $(TOPDIR)/./db/fsmap.c $(TOPDIR)/./db/fprint.c $(TOPDIR)/./db/symlink.c $(TOPDIR)/./db/block.c $(TOPDIR)/./db/frag.c $(TOPDIR)/./db/help.c $(TOPDIR)/./db/attr.c $(TOPDIR)/./db/print.c $(TOPDIR)/./db/quit.c $(TOPDIR)/./db/info.c $(TOPDIR)/./db/echo.c $(TOPDIR)/./db/attrshort.c $(TOPDIR)/./db/check.c $(TOPDIR)/./db/debug.c $(TOPDIR)/./db/io.c $(TOPDIR)/./db/bit.c $(TOPDIR)/./db/fuzz.c $(TOPDIR)/./db/output.c $(TOPDIR)/./db/dquot.c $(TOPDIR)/./db/sig.c $(TOPDIR)/./db/metadump.c $(TOPDIR)/./db/text.c $(TOPDIR)/./db/strvec.c $(TOPDIR)/./db/bmroot.c $(TOPDIR)/./db/command.c $(TOPDIR)/./db/agfl.c $(TOPDIR)/./db/write.c $(TOPDIR)/./db/init.c $(TOPDIR)/./db/btdump.c $(TOPDIR)/./db/malloc.c $(TOPDIR)/./db/dir2.c $(TOPDIR)/./db/dir2sf.c $(TOPDIR)/./db/agf.c $(TOPDIR)/./db/bmap.c $(TOPDIR)/./db/crc.c $(TOPDIR)/./db/freesp.c $(TOPDIR)/./db/flist.c $(TOPDIR)/./db/input.c $(TOPDIR)/./db/field.c $(TOPDIR)/./db/logformat.c $(TOPDIR)/./db/agi.c $(TOPDIR)/./db/btblock.c $(TOPDIR)/./db/hash.c $(TOPDIR)/./db/attrset.c $(TOPDIR)/./db/sb.c $(TOPDIR)/./db/type.c $(TOPDIR)/./db/inode.c $(TOPDIR)/./db/faddr.c $(TOPDIR)/./db/convert.c $(TOPDIR)/./db/addr.c $(TOPDIR)/./estimate/xfs_estimate.c $(TOPDIR)/./growfs/xfs_growfs.c $(TOPDIR)/./copy/xfs_copy.c

RPM		= 
RPMBUILD	= 
RPM_VERSION	= 0

ENABLE_SHARED	= yes
ENABLE_GETTEXT	= yes
ENABLE_EDITLINE	= no
ENABLE_READLINE	= no
ENABLE_BLKID	= yes
ENABLE_SCRUB	= yes

HAVE_ZIPPED_MANPAGES = false

HAVE_FADVISE = yes
HAVE_MADVISE = yes
HAVE_MINCORE = yes
HAVE_SENDFILE = yes
HAVE_GETMNTENT = yes
HAVE_FALLOCATE = yes
HAVE_FIEMAP = yes
HAVE_PREADV = yes
HAVE_PWRITEV2 = yes
HAVE_COPY_FILE_RANGE = yes
HAVE_SYNC_FILE_RANGE = yes
HAVE_SYNCFS = yes
HAVE_READDIR = yes
HAVE_MNTENT = yes
HAVE_FLS = 
HAVE_FSETXATTR = yes
HAVE_MREMAP = yes
NEED_INTERNAL_FSXATTR = 
HAVE_GETFSMAP = yes
HAVE_STATFS_FLAGS = yes
HAVE_MAP_SYNC = yes
HAVE_DEVMAPPER = no
HAVE_MALLINFO = yes
HAVE_LIBATTR = yes
HAVE_LIBICU = yes
HAVE_OPENAT = yes
HAVE_FSTATAT = yes
HAVE_SG_IO = yes
HAVE_HDIO_GETGEO = yes
HAVE_SYSTEMD = yes
SYSTEMD_SYSTEM_UNIT_DIR = /lib/systemd/system
HAVE_CROND = yes
CROND_DIR = /etc/cron.d

GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
#	   -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl

PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS)
ifeq ($(HAVE_UMODE_T),yes)
PCFLAGS += -DHAVE_UMODE_T
endif
DEPENDFLAGS = -D__linux__
ifeq ($(HAVE_FLS),yes)
LCFLAGS+= -DHAVE_FLS
endif
ifeq ($(HAVE_MNTENT),yes)
PCFLAGS+= -DHAVE_MNTENT
endif
ifeq ($(HAVE_FSETXATTR),yes)
PCFLAGS+= -DHAVE_FSETXATTR
endif
ifeq ($(ENABLE_BLKID),yes)
PCFLAGS+= -DENABLE_BLKID
endif
ifeq ($(NEED_INTERNAL_FSXATTR),yes)
PCFLAGS+= -DOVERRIDE_SYSTEM_FSXATTR
endif
ifeq ($(HAVE_GETFSMAP),yes)
PCFLAGS+= -DHAVE_GETFSMAP
endif

LIBICU_LIBS = -licui18n -licuuc -licudata
LIBICU_CFLAGS = 

SANITIZER_CFLAGS +=   
SANITIZER_LDFLAGS +=   

# Use special ar/ranlib wrappers if we have lto
HAVE_LTO = 
ifeq ($(HAVE_LTO),yes)
OPTIMIZER += 
LOADERFLAGS += 
AR = 
RANLIB = 
endif

GCFLAGS = $(DEBUG) \
	  -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\"  \
	  -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs

ifeq ($(ENABLE_GETTEXT),yes)
GCFLAGS += -DENABLE_GETTEXT
endif

BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS)
# First, Sanitizer, Global, Platform, Local CFLAGS
CFLAGS += $(FCFLAGS) $(SANITIZER_CFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)

include $(TOPDIR)/include/buildmacros

endif

#
# For targets that should always be rebuilt,
# define a target that is never up-to-date.
# Targets needing this should depend on $(_FORCE)
_FORCE = __force_build
