Update copyright dates (again)
[xfstests-dev.git] / include / builddefs.in
1 #
2 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
3
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.
7
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.
11
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.
18
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.
22
23 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 # Mountain View, CA  94043, or:
25
26 # http://www.sgi.com 
27
28 # For further information regarding this notice, see: 
29
30 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31 #
32 # @configure_input@
33 #
34
35 ifndef _BUILDDEFS_INCLUDED_
36 _BUILDDEFS_INCLUDED_ = 1
37
38 DEBUG = @debug_build@
39 OPTIMIZER = @opt_build@
40 MALLOCLIB = @malloc_lib@
41
42 LIBXFS = @libxfs@
43 LIBACL = @libacl@
44 LIBATTR = @libattr@
45 LIBGDBM = @libgdbm@
46 LIBUUID = @libuuid@
47 LIBHANDLE = @libhdl@
48 HAVE_DB = @have_db@
49 CPPFLAGS = -I/usr/include/xfs -I/usr/include/attr
50
51 BUILDRULES = $(TOPDIR)/include/buildrules
52
53 # General package information
54 PKG_NAME = @pkg_name@
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@
66
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).
71
72 CFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall $(LCFLAGS) \
73         -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' -D_GNU_SOURCE \
74         -D_FILE_OFFSET_BITS=64
75
76 LDFLAGS = $(LLDFLAGS)
77 LDLIBS = $(LLDLIBS) $(MALLOCLIB)
78
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
83
84 OBJECTS = $(ASFILES:.s=.o) \
85           $(CFILES:.c=.o) \
86           $(LFILES:.l=.o) \
87           $(YFILES:%.y=%.tab.o)
88
89 MAKE    = @make@
90 CC      = @cc@
91 LD      = @ld@
92 AWK     = @awk@
93 SED     = @sed@
94 INSTALL = $(TOPDIR)/install-sh -o root -g root
95 ECHO    = @echo@
96 LN_S    = @LN_S@
97
98 CCF     = $(CC) $(CFLAGS)
99 MAKEF   = $(MAKE) $(MAKEOPTS)
100 CXXF    = $(CXX) $(CXXFLAGS)
101 LDF     = $(LD) $(LDFLAGS)
102 MAKEDEPEND  = @makedepend@
103
104 ZIP     = @zip@
105 TAR     = @tar@
106 RPM     = @rpm@
107 RPM_VERSION = @rpm_version@
108
109 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
110
111 SHELL = /bin/sh
112 IMAGES_DIR = $(TOPDIR)/all-images
113 DIST_DIR = $(TOPDIR)/dist
114
115 SUBDIRS_MAKERULE = \
116         @for d in $(SUBDIRS) ""; do \
117             if test -d "$$d" -a ! -z "$$d"; then \
118                 $(ECHO) === $$d ===; \
119                 $(MAKEF) -C $$d $@ || exit $$?; \
120             fi; \
121         done
122
123 MAN_MAKERULE = \
124     @for f in *.[12345678] ""; do \
125         if test ! -z "$$f"; then \
126             $(ZIP) --best -c < $$f > $$f.gz; \
127         fi; \
128     done
129
130 INSTALL_MAN = \
131     @for d in $(MAN_PAGES); do \
132         first=true; \
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'`; \
135         do \
136             [ -z "$$m" -o "$$m" = "\\" ] && continue; \
137             t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
138             if $$first; then \
139                 if $(HAVE_ZIPPED_MANPAGES); then \
140                     $(ZIP) --best -c $$d > $$d.gz; _sfx=.gz; \
141                 fi; \
142                 u=$$m.$(MAN_SECTION)$$_sfx; \
143                 echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
144                 $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
145             else \
146                 echo $(INSTALL) -S $$u $${t}$$_sfx; \
147                 $(INSTALL) -S $$u $${t}$$_sfx; \
148             fi; \
149             first=false; \
150         done; \
151     done
152
153 DIST_MAKERULE = \
154         $(MAKEF) -C build dist
155
156 SOURCE_MAKERULE = \
157         @test -z "$$DIR" && DIR="."; \
158         for f in $(SRCFILES) ""; do \
159             if test ! -z "$$f"; then $(ECHO) $$DIR/$$f; fi;\
160         done; \
161         for d in `echo $(SUBDIRS)` ; do \
162             if test -d "$$d" -a ! -z "$$d"; then \
163                 $(MAKEF) DIR=$$DIR/$$d -C $$d $@ || exit $$?; \
164             fi; \
165         done
166
167 endif
168
169 #
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