2 # Copyright (c) 2002-2006 Silicon Graphics, Inc. All Rights Reserved.
7 ifndef _BUILDDEFS_INCLUDED_
8 _BUILDDEFS_INCLUDED_ = 1
11 OPTIMIZER = @opt_build@
12 MALLOCLIB = @malloc_lib@
13 LOADERFLAGS = @LDFLAGS@
15 LIBACL = $(TOPDIR)/libacl/libacl.la
17 LIBMISC = $(TOPDIR)/libmisc/libmisc.la
20 exec_prefix = @exec_prefix@
21 top_builddir = @top_builddir@
22 datarootdir = @datarootdir@
26 PKG_GROUP = @pkg_group@
27 PKG_RELEASE = @pkg_release@
28 PKG_VERSION = @pkg_version@
29 PKG_PLATFORM = @pkg_platform@
30 PKG_DISTRIBUTION= @pkg_distribution@
31 PKG_BIN_DIR = @bindir@
32 PKG_SBIN_DIR = @sbindir@
33 PKG_LIB_DIR = @libdir@@libdirsuffix@
34 PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@
35 PKG_INC_DIR = @includedir@
36 PKG_MAN_DIR = @mandir@
37 PKG_DOC_DIR = @datadir@/doc/@pkg_name@
38 PKG_LOCALE_DIR = @datadir@/locale
50 MAKEDEPEND = @makedepend@
58 RPM_VERSION = @rpm_version@
60 ENABLE_SHARED = @enable_shared@
61 ENABLE_GETTEXT = @enable_gettext@
63 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
65 ifneq "$(findstring $(PKG_PLATFORM), linux gnu gnu/kfreebsd gnu/knetbsd)" ""
66 PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
69 ifeq ($(PKG_PLATFORM),linux)
70 DEPENDFLAGS = -D__linux__
72 ifeq ($(PKG_PLATFORM),darwin)
73 DEPENDFLAGS = -D__APPLE__
75 ifeq ($(PKG_PLATFORM),irix)
76 DEPENDFLAGS = -D__sgi__
78 ifeq ($(PKG_PLATFORM),freebsd)
79 DEPENDFLAGS = -D__FreeBSD__
82 GCFLAGS = $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \
83 -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
84 -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include
86 # Global, Platform, Local CFLAGS
87 CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
89 include $(TOPDIR)/include/buildmacros
94 # For targets that should always be rebuilt,
95 # define a target that is never up-to-date.
96 # Targets needing this should depend on $(_FORCE)
97 _FORCE = __force_build