]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/builddefs.in
cmd/xfs/bmap/Makefile 1.8 Renamed to cmd/xfsprogs/bmap/Makefile
[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 LIBXFS = $(TOPDIR)/libxfs/libxfs.a
43 LIBATTR = $(TOPDIR)/libattr/libattr.a
44 LIBHANDLE = $(TOPDIR)/handle/libhandle.a
45 LIBUUID = /usr/lib/libuuid.a
46 LIBLVM = @liblvm@
47
48 BUILDRULES = $(TOPDIR)/include/buildrules
49
50 # General package information
51 TARGET_OS = @host_platform@
52 PACKAGE_NAME = @package_name@
53 PACKAGE_RELEASE = @package_release@
54 PACKAGE_VERSION = @package_version@
55 PACKAGE_DISTRIBUTION = @package_distribution@
56 PACKAGE_BUILDER = @package_builder@
57 XFS_CMDS_SBIN_DIR = @xfs_cmds_sbin_dir@
58 XFS_CMDS_BIN_DIR = @xfs_cmds_bin_dir@
59 XFS_CMDS_LIB_DIR = @xfs_cmds_lib_dir@
60 XFS_CMDS_SHARE_DIR = @xfs_cmds_share_dir@
61 XFS_CMDS_INC_DIR = @xfs_cmds_inc_dir@
62 XFS_CMDS_MAN_DIR = @xfs_cmds_man_dir@
63 XFS_CMDS_TMP_DIR = @xfs_cmds_tmp_dir@
64 XFS_CMDS_DOC_DIR = @xfs_cmds_doc_dir@
65
66 # LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in
67 # user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES)
68 # $(CXXFILES), or $(HFILES) and is used to construct the manifest list
69 # during the "dist" phase (packaging).
70
71 CFLAGS += $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -Wno-parentheses \
72 $(LCFLAGS) -I$(TOPDIR)/include '-DVERSION="$(PACKAGE_VERSION)"' \
73 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
74 -DXFS_BIG_FILES=1 -DXFS_BIG_FILESYSTEMS=1 -DHAVE_LIBLVM=@have_liblvm@
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