]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/builddefs.in
initial version for reworked xfsprogs build environment.
[thirdparty/xfsprogs-dev.git] / include / builddefs.in
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
42 LIBUUID = /usr/lib/libuuid.a
43 LIBXFS = -lxfs
44 LIBHANDLE = -lhandle
45
46 LIBLVM = @liblvm@
47 USELVM = -DHAVE_LIBLVM=@have_liblvm@
48
49 BUILDRULES = $(TOPDIR)/include/buildrules
50
51 # General package information
52 PKG_NAME = @pkg_name@
53 PKG_RELEASE = @pkg_release@
54 PKG_VERSION = @pkg_version@
55 PKG_DISTRIBUTION = @pkg_distribution@
56 PKG_BUILDER = @pkg_builder@
57 PKG_BIN_DIR = @pkg_bin_dir@
58 PKG_LIB_DIR = @pkg_lib_dir@
59 PKG_SBIN_DIR = @pkg_sbin_dir@
60 PKG_SLIB_DIR = @pkg_slib_dir@
61 PKG_INC_DIR = @pkg_inc_dir@
62 PKG_MAN_DIR = @pkg_man_dir@
63 PKG_DOC_DIR = @pkg_doc_dir@
64
65 # LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in
66 # user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES)
67 # $(CXXFILES), or $(HFILES) and is used to construct the manifest list
68 # during the "dist" phase (packaging).
69
70 CFLAGS += $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -Wno-parentheses \
71 $(LCFLAGS) -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' \
72 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
73 -DXFS_BIG_FILES=1 -DXFS_BIG_FILESYSTEMS=1
74
75 LDFLAGS = $(LLDFLAGS)
76 LDLIBS = $(LLDLIBS) $(MALLOCLIB)
77
78 MAKEOPTS = --no-print-directory
79 SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES)
80 DIRT = $(LDIRT) dep dep.bak $(OBJECTS) $(CMDTARGET) $(LIBTARGET) \
81 $(STATICLIBTARGET) *.[1-9].gz
82
83 OBJECTS = $(ASFILES:.s=.o) \
84 $(CFILES:.c=.o) \
85 $(LFILES:.l=.o) \
86 $(YFILES:%.y=%.tab.o)
87
88 MAKE = @make@
89 CC = @cc@
90 LD = @ld@
91 AWK = @awk@
92 SED = @sed@
93 INSTALL = $(TOPDIR)/install-sh -o root -g root
94 ECHO = @echo@
95 LN_S = @LN_S@
96
97 CCF = $(CC) $(CFLAGS)
98 MAKEF = $(MAKE) $(MAKEOPTS)
99 CXXF = $(CXX) $(CXXFLAGS)
100 LDF = $(LD) $(LDFLAGS)
101 MAKEDEPEND = @makedepend@
102
103 ZIP = @zip@
104 TAR = @tar@
105 RPM = @rpm@
106 RPM_VERSION = @rpm_version@
107
108 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
109
110 SHELL = /bin/sh
111 IMAGES_DIR = $(TOPDIR)/all-images
112 DIST_DIR = $(TOPDIR)/dist
113
114 SUBDIRS_MAKERULE = \
115 @for d in $(SUBDIRS) ""; do \
116 if test -d "$$d" -a ! -z "$$d"; then \
117 $(ECHO) === $$d ===; \
118 $(MAKEF) -C $$d $@ || exit $$?; \
119 fi; \
120 done
121
122 MAN_MAKERULE = \
123 @for f in *.[12345678] ""; do \
124 if test ! -z "$$f"; then \
125 $(ZIP) --best -c < $$f > $$f.gz; \
126 fi; \
127 done
128
129 INSTALL_MAN = \
130 @for d in $(MAN_PAGES); do \
131 first=true; \
132 for m in `$(AWK) '/^\.SH NAME/ {ok=1; next} ok {print; exit}' $$d \
133 | sed -e 's/,/ /g' -e 's/\\-.*//' -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
134 do \
135 [ -z "$$m" -o "$$m" = "\\" ] && continue; \
136 t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
137 if $$first; then \
138 if $(HAVE_ZIPPED_MANPAGES); then \
139 $(ZIP) --best -c $$d > $$d.gz; _sfx=.gz; \
140 fi; \
141 u=$$m.$(MAN_SECTION)$$_sfx; \
142 echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
143 $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
144 else \
145 echo $(INSTALL) -S $$u $${t}$$_sfx; \
146 $(INSTALL) -S $$u $${t}$$_sfx; \
147 fi; \
148 first=false; \
149 done; \
150 done
151
152 DIST_MAKERULE = \
153 $(MAKEF) -C build dist
154
155 SOURCE_MAKERULE = \
156 @test -z "$$DIR" && DIR="."; \
157 for f in $(SRCFILES) ""; do \
158 if test ! -z "$$f"; then $(ECHO) $$DIR/$$f; fi;\
159 done; \
160 for d in `echo $(SUBDIRS)` ; do \
161 if test -d "$$d" -a ! -z "$$d"; then \
162 $(MAKEF) DIR=$$DIR/$$d -C $$d $@ || exit $$?; \
163 fi; \
164 done
165
166 endif
167
168 #
169 # For targets that should always be rebuilt,
170 # define a target that is never up-to-date.
171 # Targets needing this should depend on $(_FORCE)
172 _FORCE = __force_build