#
# Copyright (c) 2004-2006 Silicon Graphics, Inc.
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it would be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write the Free Software Foundation,
# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
# include/builddefs.  Generated from builddefs.in by configure.
#

ifndef _BUILDDEFS_INCLUDED_
_BUILDDEFS_INCLUDED_ = 1

DEBUG = -DDEBUG
OPTIMIZER = -g -O2
MALLOCLIB = 
LOADERFLAGS = 

LIBRT = -lrt
LIBUUID = -luuid
LIBPTHREAD = -lpthread
LIBTERMCAP = 
LIBEDITLINE = 
LIBREADLINE = 
LIBXFS = $(TOPDIR)/libxfs/libxfs.la
LIBXCMD = $(TOPDIR)/libxcmd/libxcmd.la
LIBXLOG = $(TOPDIR)/libxlog/libxlog.la
LIBDISK = $(TOPDIR)/libdisk/libdisk.la
LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la

DK_INC_DIR = /usr/include/disk

prefix = /
exec_prefix = /
datarootdir = ${prefix}/share

PKG_NAME	= xfsprogs
PKG_USER	= felixb
PKG_GROUP	= sys1
PKG_RELEASE	= 1
PKG_VERSION	= 3.0.0
PKG_PLATFORM	= linux
PKG_DISTRIBUTION= Linux
PKG_BIN_DIR	= /usr/sbin
PKG_SBIN_DIR	= /sbin
PKG_LIB_DIR	= /lib
PKG_DEVLIB_DIR	= /usr/lib
PKG_INC_DIR	= /usr/include/xfs
PKG_MAN_DIR	= /usr/share/man
PKG_DOC_DIR	= /usr/share/doc/xfsprogs
PKG_LOCALE_DIR	= /usr/share/locale

CC		= gcc
AWK		= /bin/awk
SED		= /bin/sed
TAR		= /bin/tar
ZIP		= /bin/gzip
MAKE		= /usr/bin/gmake
ECHO		= /bin/echo
SORT		= /bin/sort
LN_S		= ln -s
LIBTOOL		= /usr/bin/libtool
MAKEDEPEND	= /bin/true

MSGFMT		= /usr/bin/msgfmt
MSGMERGE	= /usr/bin/msgmerge
XGETTEXT	= /usr/bin/xgettext

RPM		= /bin/rpm
RPMBUILD	= /usr/bin/rpmbuild
RPM_VERSION	= 4

ENABLE_SHARED	= yes
ENABLE_GETTEXT	= yes
ENABLE_EDITLINE	= no
ENABLE_READLINE	= no

HAVE_ZIPPED_MANPAGES = false

HAVE_FADVISE = yes
HAVE_MADVISE = yes
HAVE_MINCORE = yes
HAVE_SENDFILE = yes
HAVE_GETMNTENT = yes
HAVE_GETMNTINFO = 

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

ifeq ($(PKG_PLATFORM),linux)
PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
DEPENDFLAGS = -D__linux__
endif
ifeq ($(PKG_PLATFORM),darwin)
PCFLAGS = -traditional-cpp $(GCCFLAGS)
DEPENDFLAGS = -D__APPLE__
endif
ifeq ($(PKG_PLATFORM),irix)
PLDLIBS = -ldisk -lgen
DEPENDFLAGS = -D__sgi__
endif
ifeq ($(PKG_PLATFORM),freebsd)
PLDLIBS = -L/usr/local/lib -lintl
PCFLAGS = -I/usr/local/include $(GCCFLAGS)
DEPENDFLAGS = -D__FreeBSD__
endif

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

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

# First, Global, Platform, Local CFLAGS
CFLAGS += $(FCFLAGS) $(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
