2 # Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of version 2 of the GNU General Public License as
6 # published by the Free Software Foundation.
8 # This program is distributed in the hope that it would be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 # Further, this software is distributed without any warranty that it is
13 # free of the rightful claim of any third person regarding infringement
14 # or the like. Any license provided herein, whether implied or
15 # otherwise, applies only to this software file. Patent licenses, if
16 # any, provided herein do not apply to combinations of this program with
17 # other software, or any other product whatsoever.
19 # You should have received a copy of the GNU General Public License along
20 # with this program; if not, write the Free Software Foundation, Inc., 59
21 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 # Mountain View, CA 94043, or:
28 # For further information regarding this notice, see:
30 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
35 ifndef _BUILDDEFS_INCLUDED_
36 _BUILDDEFS_INCLUDED_ = 1
39 OPTIMIZER = @opt_build@
40 MALLOCLIB = @malloc_lib@
49 CPPFLAGS = -I/usr/include/xfs -I/usr/include/attr
51 BUILDRULES = $(TOPDIR)/include/buildrules
53 # General package information
55 PKG_RELEASE = @pkg_release@
56 PKG_VERSION = @pkg_version@
57 PKG_DISTRIBUTION = @pkg_distribution@
58 PKG_BUILDER = @pkg_builder@
59 PKG_BIN_DIR = @pkg_bin_dir@
60 PKG_LIB_DIR = @pkg_lib_dir@
61 PKG_SBIN_DIR = @pkg_sbin_dir@
62 PKG_SLIB_DIR = @pkg_slib_dir@
63 PKG_INC_DIR = @pkg_inc_dir@
64 PKG_MAN_DIR = @pkg_man_dir@
65 PKG_DOC_DIR = @pkg_doc_dir@
67 # LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in
68 # user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES)
69 # $(CXXFILES), or $(HFILES) and is used to construct the manifest list
70 # during the "dist" phase (packaging).
72 CFLAGS += $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -Wno-parentheses \
73 $(LCFLAGS) -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' \
74 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
77 LDLIBS = $(LLDLIBS) $(MALLOCLIB)
79 MAKEOPTS = --no-print-directory
80 SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES)
81 DIRT = $(LDIRT) dep dep.bak $(OBJECTS) $(CMDTARGET) $(LIBTARGET) \
82 $(STATICLIBTARGET) *.[1-9].gz
84 OBJECTS = $(ASFILES:.s=.o) \
94 INSTALL = $(TOPDIR)/install-sh -o root -g root
99 MAKEF = $(MAKE) $(MAKEOPTS)
100 CXXF = $(CXX) $(CXXFLAGS)
101 LDF = $(LD) $(LDFLAGS)
102 MAKEDEPEND = @makedepend@
107 RPM_VERSION = @rpm_version@
109 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
112 IMAGES_DIR = $(TOPDIR)/all-images
113 DIST_DIR = $(TOPDIR)/dist
116 @for d in $(SUBDIRS) ""; do \
117 if test -d "$$d" -a ! -z "$$d"; then \
118 $(ECHO) === $$d ===; \
119 $(MAKEF) -C $$d $@ || exit $$?; \
124 @for f in *.[12345678] ""; do \
125 if test ! -z "$$f"; then \
126 $(ZIP) --best -c < $$f > $$f.gz; \
131 @for d in $(MAN_PAGES); do \
133 for m in `$(AWK) '/^\.SH NAME/ {ok=1; next} ok {print; exit}' $$d \
134 | sed -e 's/,/ /g' -e 's/\\-.*//' -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
136 [ -z "$$m" -o "$$m" = "\\" ] && continue; \
137 t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
139 if $(HAVE_ZIPPED_MANPAGES); then \
140 $(ZIP) --best -c $$d > $$d.gz; _sfx=.gz; \
142 u=$$m.$(MAN_SECTION)$$_sfx; \
143 echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
144 $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
146 echo $(INSTALL) -S $$u $${t}$$_sfx; \
147 $(INSTALL) -S $$u $${t}$$_sfx; \
154 $(MAKEF) -C build dist
157 @test -z "$$DIR" && DIR="."; \
158 for f in $(SRCFILES) ""; do \
159 if test ! -z "$$f"; then $(ECHO) $$DIR/$$f; fi;\
161 for d in `echo $(SUBDIRS)` ; do \
162 if test -d "$$d" -a ! -z "$$d"; then \
163 $(MAKEF) DIR=$$DIR/$$d -C $$d $@ || exit $$?; \
170 # For targets that should always be rebuilt,
171 # define a target that is never up-to-date.
172 # Targets needing this should depend on $(_FORCE)
173 _FORCE = __force_build