2 # Copyright (c) 2003 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@
23 LIBTEST = $(TOPDIR)/lib/libtest.la
27 PKG_GROUP = @pkg_group@
28 PKG_RELEASE = @pkg_release@
29 PKG_VERSION = @pkg_version@
30 PKG_PLATFORM = @pkg_platform@
31 PKG_DISTRIBUTION= @pkg_distribution@
32 PKG_SBIN_DIR = @sbindir@
33 # A bit of a hack; by rights only state should probably go here
35 PKG_LIB_DIR = /var/lib/@pkg_name@
47 MAKEDEPEND = @makedepend@
54 RPM_VERSION = @rpm_version@
56 ENABLE_SHARED = @enable_shared@
59 HAVE_DMAPI = @have_dmapi@
60 HAVE_ATTR_LIST = @have_attr_list@
62 GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
64 ifeq ($(PKG_PLATFORM),linux)
65 PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
66 DEPENDFLAGS = -D__linux__
68 ifeq ($(PKG_PLATFORM),darwin)
69 PCFLAGS = -traditional-cpp $(GCCFLAGS)
70 DEPENDFLAGS = -D__APPLE__
72 ifeq ($(PKG_PLATFORM),irix)
73 PCFLAGS = -nostdinc -I$(ROOT)/usr/include -I$(TOPDIR)/../irix/include
74 DEPENDFLAGS = -D__sgi__
76 ifeq ($(PKG_PLATFORM),freebsd)
77 DEPENDFLAGS = -D__FreeBSD__
80 GCFLAGS = $(OPTIMIZER) $(DEBUG) $(CPPFLAGS) \
81 -I$(TOPDIR)/include -DVERSION=\"$(PKG_VERSION)\"
83 # Global, Platform, Local CFLAGS
84 CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
86 include $(TOPDIR)/include/buildmacros
91 # For targets that should always be rebuilt,
92 # define a target that is never up-to-date.
93 # Targets needing this should depend on $(_FORCE)
94 _FORCE = __force_build