]>
Commit | Line | Data |
---|---|---|
50e1e10f TT |
1 | # Beginning of file MCONFIG |
2 | ||
ef8901be TT |
3 | all:: |
4 | ||
3e377db2 TT |
5 | check:: |
6 | ||
50e1e10f TT |
7 | SHELL = /bin/sh |
8 | ||
482afc44 TT |
9 | COMPRESS_EXT = gz bz2 bz Z |
10 | ||
50e1e10f | 11 | prefix = @prefix@ |
a4b2d3ce | 12 | root_prefix = @root_prefix@ |
50e1e10f | 13 | exec_prefix = @exec_prefix@ |
b5ffeade TT |
14 | root_bindir = @root_bindir@ |
15 | root_sbindir = @root_sbindir@ | |
16 | root_libdir = @root_libdir@ | |
b6b65c3d | 17 | datarootdir = @datarootdir@ |
a4b2d3ce TT |
18 | bindir = @bindir@ |
19 | sbindir = @sbindir@ | |
20 | libdir = @libdir@ | |
b5ffeade | 21 | datadir= @datadir@ |
a04eba3f | 22 | localedir = $(datadir)/locale |
b5ffeade | 23 | root_sysconfdir= @root_sysconfdir@ |
a4b2d3ce TT |
24 | includedir = @includedir@ |
25 | mandir = @mandir@ | |
a4bf69d9 TT |
26 | man1dir = $(mandir)/man1 |
27 | man3dir = $(mandir)/man3 | |
9dc6ad1e | 28 | man5dir = $(mandir)/man5 |
a4bf69d9 | 29 | man8dir = $(mandir)/man8 |
a4b2d3ce TT |
30 | infodir = @infodir@ |
31 | datadir = @datadir@ | |
4e2d9f7f | 32 | pkgconfigdir = $(libdir)/pkgconfig |
50e1e10f TT |
33 | |
34 | @SET_MAKE@ | |
35 | ||
bcb915b0 TT |
36 | @ifGNUmake@ V = |
37 | @ifGNUmake@ ifeq ($(strip $(V)),) | |
38 | @ifGNUmake@ # E = @echo | |
c1986ecb | 39 | @ifGNUmake@ # ES = echo |
bcb915b0 TT |
40 | @ifGNUmake@ # Q = @ |
41 | @ifGNUmake@ E = @E@ | |
c1986ecb | 42 | @ifGNUmake@ ES = @ES@ |
bcb915b0 TT |
43 | @ifGNUmake@ Q = @Q@ |
44 | @ifGNUmake@ else | |
45 | @ifGNUmake@ E = @\# | |
c1986ecb | 46 | @ifGNUmake@ ES = \# |
bcb915b0 TT |
47 | @ifGNUmake@ Q = |
48 | @ifGNUmake@ endif | |
c13351f6 | 49 | |
bcb915b0 | 50 | @ifNotGNUmake@ E = @E@ |
c1986ecb | 51 | @ifNotGNUmake@ ES = @ES@ |
bcb915b0 | 52 | @ifNotGNUmake@ Q = @Q@ |
c13351f6 | 53 | |
5f16f6c3 TT |
54 | @ifGNUmake@ CHECK=sparse |
55 | @ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null | |
f1605243 | 56 | @ifGNUmake@ CPPCHECK=cppcheck |
a46300fe | 57 | @ifGNUmake@ CPPCHECK_OPTS=--force --enable=all --quiet |
5f16f6c3 TT |
58 | @ifGNUmake@ ifeq ("$(C)", "2") |
59 | @ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__ | |
f1605243 | 60 | @ifGNUmake@ CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS) |
5f16f6c3 TT |
61 | @ifGNUmake@ else |
62 | @ifGNUmake@ ifeq ("$(C)", "1") | |
63 | @ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) | |
f1605243 | 64 | @ifGNUmake@ CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS) |
5f16f6c3 TT |
65 | @ifGNUmake@ else |
66 | @ifGNUmake@ CHECK_CMD=@true | |
f1605243 | 67 | @ifGNUmake@ CPPCHECK_CMD=@true |
5f16f6c3 TT |
68 | @ifGNUmake@ endif |
69 | @ifGNUmake@ endif | |
70 | ||
71 | @ifNotGNUmake@ CHECK_CMD=@true | |
f1605243 | 72 | @ifNotGNUmake@ CPPHECK_CMD=@true |
5f16f6c3 | 73 | |
50e1e10f | 74 | CC = @CC@ |
6c133523 | 75 | BUILD_CC = @BUILD_CC@ |
ed9881bb | 76 | CFLAGS = @CFLAGS@ |
fd1677e8 TT |
77 | CFLAGS_SHLIB = @CFLAGS_SHLIB@ |
78 | CFLAGS_STLIB = @CFLAGS_STLIB@ | |
d1154eb4 | 79 | CPPFLAGS = @INCLUDES@ |
c2ff6bac TT |
80 | ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) $(CFLAGS_WARN) @DEFS@ $(LOCAL_CFLAGS) |
81 | ALL_CFLAGS_SHLIB = $(CPPFLAGS) $(CFLAGS_SHLIB) $(CFLAGS_WARN) @DEFS@ $(LOCAL_CFLAGS) | |
82 | ALL_CFLAGS_STLIB = $(CPPFLAGS) $(CFLAGS_STLIB) $(CFLAGS_WARN) @DEFS@ $(LOCAL_CFLAGS) | |
50e1e10f | 83 | LDFLAGS = @LDFLAGS@ |
fd1677e8 | 84 | LDFLAGS_SHLIB = @LDFLAGS_SHLIB@ |
55da9876 | 85 | ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@ |
fd1677e8 | 86 | LDFLAGS_STATIC = @LDFLAGS_STATIC@ |
dd947da2 TT |
87 | BUILD_CFLAGS = @BUILD_CFLAGS@ |
88 | BUILD_LDFLAGS = @BUILD_LDFLAGS@ | |
9b3018a8 | 89 | RDYNAMIC = @RDYNAMIC@ |
5aa6c3f6 TT |
90 | LINK_BUILD_FLAGS = @LINK_BUILD_FLAGS@ |
91 | LINK_INSTALL_FLAGS = @LINK_INSTALL_FLAGS@ | |
50e1e10f TT |
92 | RM = @RM@ |
93 | LN = @LN@ | |
fc6d9d51 | 94 | LN_S = @LN_S@ |
50e1e10f TT |
95 | MV = @MV@ |
96 | CP = @CP@ | |
97 | CHMOD = @CHMOD@ | |
98 | AR = @AR@ | |
99 | AWK = @AWK@ | |
100 | SED = @SED@ | |
9d564f73 | 101 | PERL = @PERL@ |
50e1e10f TT |
102 | RANLIB = @RANLIB@ |
103 | STRIP = @STRIP@ | |
104 | LD = $(PURE) @CC@ | |
105 | ARUPD = $(AR) r | |
47204ff9 | 106 | ARGEN = $(AR) rc |
250f79f0 | 107 | LDCONFIG = @LDCONFIG@ |
6d402278 TT |
108 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
109 | INSTALL_DATA = @INSTALL_DATA@ | |
110 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
111 | MKINSTALLDIRS = @MKINSTALLDIRS@ | |
50e1e10f | 112 | |
a4d09610 TT |
113 | # |
114 | # Library definitions | |
115 | # | |
116 | LIB = $(top_builddir)/lib | |
55da9876 | 117 | LIBSS = $(LIB)/libss@LIB_EXT@ @PRIVATE_LIBS_CMT@ @DLOPEN_LIB@ |
d7f45af8 | 118 | LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@ |
a4d09610 TT |
119 | LIBE2P = $(LIB)/libe2p@LIB_EXT@ |
120 | LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@ | |
39fd3d4f | 121 | LIBUUID = @LIBUUID@ @SOCKET_LIB@ |
b291c11f | 122 | LIBMAGIC = @MAGIC_LIB@ |
81cbf1ef | 123 | LIBFUSE = @FUSE_LIB@ |
ca82d22b | 124 | LIBSUPPORT = $(LIBINTL) $(LIB)/libsupport@STATIC_LIB_EXT@ |
14b596d4 | 125 | LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID) |
a04eba3f | 126 | LIBINTL = @LIBINTL@ |
6c59a665 | 127 | SYSLIBS = @LIBS@ |
9d99416e | 128 | DEPLIBSS = $(LIB)/libss@LIB_EXT@ |
a6a1c081 | 129 | DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ |
39fd3d4f | 130 | DEPLIBUUID = @DEPLIBUUID@ |
ca82d22b | 131 | DEPLIBSUPPORT = $(LIB)/libsupport@STATIC_LIB_EXT@ |
4a1e15a8 | 132 | DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID) |
60abcd73 | 133 | TESTENV = LD_LIBRARY_PATH="$(LIB):$${LD_LIBRARY_PATH}" DYLD_LIBRARY_PATH="$(LIB):$${DYLD_LIBRARY_PATH}" |
a4d09610 | 134 | |
daf7a6e5 | 135 | STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@ |
d7f45af8 | 136 | STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@ |
a4d09610 TT |
137 | STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@ |
138 | STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@ | |
39fd3d4f | 139 | STATIC_LIBUUID = @STATIC_LIBUUID@ @SOCKET_LIB@ |
ca82d22b | 140 | STATIC_LIBSUPPORT = $(LIBINTL) $(LIBSUPPORT) |
14b596d4 | 141 | STATIC_LIBBLKID = @STATIC_LIBBLKID@ $(STATIC_LIBUUID) |
9d99416e | 142 | DEPSTATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ |
a6a1c081 | 143 | DEPSTATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ |
39fd3d4f | 144 | DEPSTATIC_LIBUUID = @DEPSTATIC_LIBUUID@ |
f34af41b | 145 | DEPSTATIC_LIBSUPPORT = $(DEPLIBSUPPORT) |
5f70f2e6 | 146 | DEPSTATIC_LIBBLKID = @DEPSTATIC_LIBBLKID@ $(DEPSTATIC_LIBUUID) |
a4d09610 | 147 | |
daf7a6e5 | 148 | PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ @DLOPEN_LIB@ |
992a2f7f | 149 | PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ @SEM_INIT_LIB@ |
a4d09610 TT |
150 | PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@ |
151 | PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@ | |
39fd3d4f | 152 | PROFILED_LIBUUID = @PROFILED_LIBUUID@ @SOCKET_LIB@ |
ca82d22b | 153 | PROFILED_LIBSUPPORT = $(LIBINTL) $(LIB)/libsupport@PROFILED_LIB_EXT@ |
14b596d4 | 154 | PROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(PROFILED_LIBUUID) |
a6a1c081 TT |
155 | DEPPROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ |
156 | DEPPROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ | |
39fd3d4f | 157 | DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@ |
f34af41b | 158 | DEPPROFILED_LIBSUPPORT = $(PROFILED_LIBSUPPORT) |
5f70f2e6 | 159 | DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID) |
a4d09610 | 160 | |
a4d09610 TT |
161 | # |
162 | # A fast substitution command for fixing up man pages, shell scripts, etc. | |
163 | # | |
44339bdf TT |
164 | SUBST_CONF=$(top_builddir)/util/subst.conf |
165 | SUBSTITUTE= $(top_builddir)/util/subst -f $(SUBST_CONF) | |
dd607056 | 166 | SUBSTITUTE_UPTIME= $(top_builddir)/util/subst -t -f $(SUBST_CONF) |
44339bdf | 167 | DEP_SUBSTITUTE= $(top_builddir)/util/subst $(SUBST_CONF) |
a4d09610 | 168 | |
ef8901be | 169 | $(top_builddir)/util/subst: |
e8aed8c8 | 170 | cd $(top_builddir)/util ; $(MAKE) subst |
ef8901be | 171 | |
183c73b0 TT |
172 | # |
173 | # Script for installing symlinks (for shared libraries) | |
174 | # | |
175 | $(top_builddir)/util/install-symlink: $(top_srcdir)/util/install-symlink.in \ | |
176 | $(top_builddir)/config.status | |
177 | cd $(top_builddir); CONFIG_FILES=util/install-symlink ./config.status | |
178 | chmod +x $(top_builddir)/util/install-symlink | |
179 | ||
180 | $(top_builddir)/util/symlinks: | |
181 | cd $(top_builddir)/util ; $(MAKE) symlinks | |
182 | ||
183 | INSTALL_SYMLINK = /bin/sh $(top_builddir)/util/install-symlink \ | |
184 | @SYMLINK_RELATIVE@ \ | |
185 | --symlinks=$(top_builddir)/util/symlinks | |
186 | DEP_INSTALL_SYMLINK = $(top_builddir)/util/install-symlink \ | |
187 | $(top_builddir)/util/symlinks | |
188 | ||
50e1e10f TT |
189 | # |
190 | # Warning flags | |
191 | # | |
4d0f3e17 | 192 | # Run make gcc-wall to do a build with warning messages. |
50e1e10f TT |
193 | # |
194 | # | |
a46300fe | 195 | WFLAGS= -std=gnu99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \ |
19c000e8 | 196 | -pedantic $(WFLAGS_EXTRA) \ |
032a763f | 197 | -Wall -W -Wwrite-strings -Wpointer-arith \ |
19c000e8 | 198 | -Wcast-qual -Wcast-align -Wno-variadic-macros \ |
4d0f3e17 | 199 | -Wstrict-prototypes -Wmissing-prototypes \ |
48e6e813 | 200 | -Wformat-security -Wformat-nonliteral \ |
19c000e8 | 201 | -Wmissing-format-attribute -O2 -Wstrict-aliasing \ |
032a763f TT |
202 | -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow \ |
203 | -UENABLE_NLS | |
4d0f3e17 | 204 | |
c8c071a0 | 205 | gcc-wall-new: |
c2ff6bac | 206 | ($(MAKE) CFLAGS_WARN="$(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup |
c8c071a0 | 207 | |
4d0f3e17 | 208 | gcc-wall: |
a46300fe DW |
209 | $(MAKE) clean > /dev/null |
210 | $(MAKE) gcc-wall-new | |
211 | ||
212 | static-check: | |
ed9881bb | 213 | ($(MAKE) C=1 V=1 CFLAGS="$(ALL_CFLAGS) $(WFLAGS)") 2>&1 | sed -f $(top_srcdir)/util/static-analysis-cleanup |
a46300fe DW |
214 | |
215 | static-check-all: | |
216 | $(MAKE) clean > /dev/null | |
217 | $(MAKE) static-check | |
50e1e10f TT |
218 | |
219 | # | |
220 | # Installation user and groups | |
221 | # | |
222 | BINGRP= bin | |
223 | BINOWN= bin | |
224 | BINMODE= 555 | |
225 | INCGRP= bin | |
226 | INCOWN= bin | |
227 | INCMODE= 444 | |
228 | LIBOWN= bin | |
229 | LIBGRP= bin | |
230 | LIBMODE= 444 | |
231 | MANGRP= bin | |
232 | MANOWN= bin | |
233 | MANMODE= 444 | |
234 | ||
fc6d9d51 TT |
235 | # |
236 | # Autoconf magic... | |
237 | # | |
238 | ||
5aa6c3f6 TT |
239 | DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.library \ |
240 | $(top_srcdir)/lib/Makefile.elf-lib \ | |
2f8d0251 ES |
241 | $(top_srcdir)/lib/Makefile.bsd-lib \ |
242 | $(top_srcdir)/lib/Makefile.darwin-lib \ | |
243 | $(top_srcdir)/lib/Makefile.solaris-lib \ | |
2b5901d9 | 244 | $(top_srcdir)/lib/Makefile.profile |
a4b2d3ce | 245 | |
fc6d9d51 | 246 | $(top_builddir)/config.status: $(top_srcdir)/configure |
e8aed8c8 | 247 | cd $(top_builddir); ./config.status --recheck |
fc6d9d51 TT |
248 | |
249 | $(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status | |
e8aed8c8 | 250 | cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status |
fc6d9d51 | 251 | |
d1154eb4 TT |
252 | $(top_builddir)/lib/config.h: $(top_srcdir)/lib/config.h.in \ |
253 | $(top_builddir)/config.status | |
254 | cd $(top_builddir); CONFIG_FILES=lib/config.h ./config.status | |
255 | ||
256 | $(top_builddir)/lib/dirpaths.h: $(DEP_SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in | |
257 | $(E) " SUBST $@" | |
258 | $(Q) $(SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in $@ | |
259 | ||
fc6d9d51 TT |
260 | $(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \ |
261 | $(top_builddir)/config.status | |
e8aed8c8 | 262 | cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status |
fc6d9d51 | 263 | |
bf2602be TT |
264 | $(top_builddir)/util/subst.conf: $(top_srcdir)/util/subst.conf.in \ |
265 | $(top_builddir)/config.status | |
e8aed8c8 | 266 | cd $(top_builddir); CONFIG_FILES=util/subst.conf ./config.status |
bf2602be | 267 | |
fc6d9d51 | 268 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \ |
a4b2d3ce | 269 | $(DEP_MAKEFILE) $(top_builddir)/config.status |
e8aed8c8 | 270 | cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status |
fc6d9d51 | 271 | |
5ea7aee4 | 272 | @MAINTAINER_CMT@$(top_srcdir)/configure: $(top_srcdir)/configure.ac |
d1154eb4 | 273 | @MAINTAINER_CMT@ cd $(top_srcdir) && autoheader && autoconf |
fc6d9d51 | 274 | |
fedfb27f TT |
275 | coverage.txt: Makefile $(SRCS) |
276 | if test -n "$(SRCS)"; then \ | |
277 | gcov -s $(top_srcdir) -o . $(SRCS) > coverage.txt 2>&1 ; \ | |
278 | fi | |
279 | ||
280 | clean:: | |
281 | $(RM) -f *.gcda *.gcov *.gcno coverage.txt | |
282 | ||
50e1e10f TT |
283 | # |
284 | # Make depend magic... | |
285 | # | |
286 | ||
9d564f73 | 287 | .depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl |
50e1e10f | 288 | if test -n "$(SRCS)" ; then \ |
ceff962c | 289 | $(CC) -M $(ALL_CFLAGS) $(DEPEND_CFLAGS) $(SRCS) | \ |
9d564f73 | 290 | $(SED) -f $(top_srcdir)/depfix.sed \ |
fc6d9d51 TT |
291 | -e 's; $(srcdir)/; $$(srcdir)/;g' \ |
292 | -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \ | |
293 | -e 's; $(top_builddir)/; $$(top_builddir)/;g' \ | |
294 | -e 's; \./; ;g' \ | |
6d402278 | 295 | -e '/^#/d' \ |
9d564f73 TT |
296 | -e '/^ *\\$$/d' | \ |
297 | $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \ | |
50e1e10f TT |
298 | else :; fi |
299 | ||
300 | depend:: .depend | |
301 | if test -n "$(SRCS)" ; then \ | |
302 | sed -e '/^# +++ Dependency line eater +++/,$$d' \ | |
303 | < $(srcdir)/Makefile.in | cat - .depend \ | |
304 | > $(srcdir)/Makefile.in.new; \ | |
9d564f73 TT |
305 | if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \ |
306 | $(RM) $(srcdir)/Makefile.in.new ; \ | |
307 | else \ | |
308 | $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \ | |
309 | $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \ | |
310 | fi ; else :; fi | |
50e1e10f | 311 | |
50e1e10f | 312 | # End of file MCONFIG |