]>
Commit | Line | Data |
---|---|---|
2bd0ea18 NS |
1 | # |
2 | # Copyright (c) 2000 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 | ||
639231be | 42 | LIBUUID = @libuuid@ |
f937adac NS |
43 | LIBXFS = $(TOPDIR)/libxfs/libxfs.la |
44 | LIBDISK = $(TOPDIR)/libdisk/libdisk.la | |
45 | LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la | |
fc49813f | 46 | |
2bd0ea18 | 47 | LIBLVM = @liblvm@ |
fc49813f | 48 | USELVM = -DHAVE_LIBLVM=@have_liblvm@ |
f937adac | 49 | DK_INC_DIR = @dk_inc_dir@ |
2bd0ea18 | 50 | |
fc49813f NS |
51 | PKG_NAME = @pkg_name@ |
52 | PKG_RELEASE = @pkg_release@ | |
53 | PKG_VERSION = @pkg_version@ | |
54 | PKG_DISTRIBUTION = @pkg_distribution@ | |
55 | PKG_BUILDER = @pkg_builder@ | |
56 | PKG_BIN_DIR = @pkg_bin_dir@ | |
57 | PKG_LIB_DIR = @pkg_lib_dir@ | |
58 | PKG_SBIN_DIR = @pkg_sbin_dir@ | |
59 | PKG_SLIB_DIR = @pkg_slib_dir@ | |
60 | PKG_INC_DIR = @pkg_inc_dir@ | |
61 | PKG_MAN_DIR = @pkg_man_dir@ | |
62 | PKG_DOC_DIR = @pkg_doc_dir@ | |
2bd0ea18 | 63 | |
f937adac NS |
64 | CC = @cc@ |
65 | LD = @ld@ | |
66 | AWK = @awk@ | |
67 | SED = @sed@ | |
68 | MAKE = @make@ | |
69 | ECHO = @echo@ | |
70 | LN_S = @LN_S@ | |
71 | ZIP = @zip@ | |
72 | TAR = @tar@ | |
73 | RPM = @rpm@ | |
74 | ||
75 | RPM_VERSION = @rpm_version@ | |
76 | HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@ | |
77 | MAKEDEPEND = @makedepend@ | |
78 | ||
79 | LIBTOOL = @LIBTOOL@ | |
80 | LIBTOOL_DEPS = @LIBTOOL_DEPS@ | |
81 | ENABLE_SHARED = @enable_shared@ | |
82 | ||
83 | # | |
84 | # end configure'd section | |
85 | ||
86 | ||
87 | BUILDRULES = $(TOPDIR)/include/buildrules | |
88 | ||
2bd0ea18 NS |
89 | # LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in |
90 | # user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES) | |
91 | # $(CXXFILES), or $(HFILES) and is used to construct the manifest list | |
92 | # during the "dist" phase (packaging). | |
93 | ||
f91dde66 | 94 | CFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall $(LCFLAGS) \ |
27527004 NS |
95 | -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' -D_GNU_SOURCE \ |
96 | -D_FILE_OFFSET_BITS=64 -DXFS_BIG_FILES=1 -DXFS_BIG_FILESYSTEMS=1 | |
2bd0ea18 NS |
97 | |
98 | LDFLAGS = $(LLDFLAGS) | |
99 | LDLIBS = $(LLDLIBS) $(MALLOCLIB) | |
100 | ||
101 | MAKEOPTS = --no-print-directory | |
102 | SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES) | |
f937adac | 103 | DIRT = $(LDIRT) dep dep.bak $(OBJECTS) $(LTCOMMAND) $(LTLIBRARY) *.[1-9].gz |
2bd0ea18 NS |
104 | |
105 | OBJECTS = $(ASFILES:.s=.o) \ | |
106 | $(CFILES:.c=.o) \ | |
107 | $(LFILES:.l=.o) \ | |
108 | $(YFILES:%.y=%.tab.o) | |
109 | ||
2bd0ea18 | 110 | INSTALL = $(TOPDIR)/install-sh -o root -g root |
f937adac NS |
111 | |
112 | SHELL = /bin/sh | |
113 | IMAGES_DIR = $(TOPDIR)/all-images | |
114 | DIST_DIR = $(TOPDIR)/dist | |
2bd0ea18 NS |
115 | |
116 | CCF = $(CC) $(CFLAGS) | |
117 | MAKEF = $(MAKE) $(MAKEOPTS) | |
118 | CXXF = $(CXX) $(CXXFLAGS) | |
119 | LDF = $(LD) $(LDFLAGS) | |
2bd0ea18 | 120 | |
f937adac NS |
121 | # For libtool. Pieces from Automake, slightly modified. |
122 | top_builddir = $(TOPDIR) | |
123 | DIRT += $(LTOBJECTS) $(LTLIBRARY) | |
124 | LTLINK = $(LIBTOOL) --mode=link $(CC) | |
125 | LTEXEC = $(LIBTOOL) --mode=execute | |
126 | LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF) -D_REENTRANT | |
127 | LTVERSION = $(LT_CURRENT).$(LT_REVISION).$(LT_AGE) | |
128 | LTOBJECTS = $(OBJECTS:.o=.lo) | |
129 | ifeq ($(ENABLE_SHARED),yes) | |
130 | LTLDFLAGS += -rpath $(PKG_LIB_DIR) | |
131 | LTLDFLAGS += -version-info $(subst .,:,$(LTVERSION)) | |
132 | endif | |
133 | LIBNAME = $(basename $(LTLIBRARY)) | |
134 | ||
135 | ifeq ($(ENABLE_SHARED),yes) | |
136 | INSTALL_LTLIB = \ | |
137 | cd $(TOPDIR)/$(LIBNAME)/.libs; \ | |
138 | ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ | |
139 | ../$(INSTALL) -m 644 $(LIBNAME).so.$(LTVERSION) $(PKG_LIB_DIR); \ | |
140 | test "$(PKG_DISTRIBUTION)" = debian || \ | |
141 | ../$(INSTALL) -S $(LIBNAME).so.$(LTVERSION) $(PKG_LIB_DIR)/$(LIBNAME).so.$(LT_CURRENT) | |
142 | endif | |
2bd0ea18 | 143 | |
f937adac NS |
144 | ifeq ($(ENABLE_SHARED),yes) |
145 | INSTALL_LTLIB_DEV = \ | |
146 | cd $(TOPDIR)/$(LIBNAME)/.libs; \ | |
147 | ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ | |
148 | ../$(INSTALL) -m 644 $(LIBNAME).a $(PKG_LIB_DIR); \ | |
149 | ../$(INSTALL) -S $(LIBNAME).so.$(LT_CURRENT) $(PKG_LIB_DIR)/$(LIBNAME).so | |
150 | else | |
151 | INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC) | |
152 | endif | |
2bd0ea18 | 153 | |
f937adac NS |
154 | INSTALL_LTLIB_STATIC = \ |
155 | cd $(TOPDIR)/$(LIBNAME)/.libs; \ | |
156 | ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ | |
157 | ../$(INSTALL) -m 644 $(LIBNAME).a $(PKG_LIB_DIR) | |
2bd0ea18 NS |
158 | |
159 | INSTALL_MAN = \ | |
160 | @for d in $(MAN_PAGES); do \ | |
161 | first=true; \ | |
162 | for m in `$(AWK) '/^\.SH NAME/ {ok=1; next} ok {print; exit}' $$d \ | |
163 | | sed -e 's/,/ /g' -e 's/\\-.*//' -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \ | |
164 | do \ | |
165 | [ -z "$$m" -o "$$m" = "\\" ] && continue; \ | |
166 | t=$(MAN_DEST)/$$m.$(MAN_SECTION); \ | |
167 | if $$first; then \ | |
168 | if $(HAVE_ZIPPED_MANPAGES); then \ | |
169 | $(ZIP) --best -c $$d > $$d.gz; _sfx=.gz; \ | |
170 | fi; \ | |
171 | u=$$m.$(MAN_SECTION)$$_sfx; \ | |
172 | echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \ | |
173 | $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \ | |
174 | else \ | |
175 | echo $(INSTALL) -S $$u $${t}$$_sfx; \ | |
176 | $(INSTALL) -S $$u $${t}$$_sfx; \ | |
177 | fi; \ | |
178 | first=false; \ | |
179 | done; \ | |
180 | done | |
181 | ||
f937adac NS |
182 | SUBDIRS_MAKERULE = \ |
183 | @for d in $(SUBDIRS) ""; do \ | |
184 | if test -d "$$d" -a ! -z "$$d"; then \ | |
185 | $(ECHO) === $$d ===; \ | |
186 | $(MAKEF) -C $$d $@ || exit $$?; \ | |
187 | fi; \ | |
188 | done | |
189 | ||
190 | MAN_MAKERULE = \ | |
191 | @for f in *.[12345678] ""; do \ | |
192 | if test ! -z "$$f"; then \ | |
193 | $(ZIP) --best -c < $$f > $$f.gz; \ | |
194 | fi; \ | |
195 | done | |
196 | ||
2bd0ea18 NS |
197 | DIST_MAKERULE = \ |
198 | $(MAKEF) -C build dist | |
199 | ||
200 | SOURCE_MAKERULE = \ | |
201 | @test -z "$$DIR" && DIR="."; \ | |
202 | for f in $(SRCFILES) ""; do \ | |
203 | if test ! -z "$$f"; then $(ECHO) $$DIR/$$f; fi;\ | |
204 | done; \ | |
205 | for d in `echo $(SUBDIRS)` ; do \ | |
206 | if test -d "$$d" -a ! -z "$$d"; then \ | |
207 | $(MAKEF) DIR=$$DIR/$$d -C $$d $@ || exit $$?; \ | |
208 | fi; \ | |
209 | done | |
210 | ||
211 | endif | |
212 | ||
213 | # | |
214 | # For targets that should always be rebuilt, | |
215 | # define a target that is never up-to-date. | |
216 | # Targets needing this should depend on $(_FORCE) | |
217 | _FORCE = __force_build |