1 # Beginning of file MCONFIG 2 3 all:: 4 5 check:: 6 7 SHELL = /bin/sh 8 9 COMPRESS_EXT = gz bz2 bz Z 10 11 prefix = @prefix@ 12 root_prefix = @root_prefix@ 13 exec_prefix = @exec_prefix@ 14 root_bindir = @root_bindir@ 15 root_sbindir = @root_sbindir@ 16 root_libdir = @root_libdir@ 17 datarootdir = @datarootdir@ 18 bindir = @bindir@ 19 sbindir = @sbindir@ 20 libdir = @libdir@ 21 datadir= @datadir@ 22 localedir = $(datadir)/locale 23 root_sysconfdir= @root_sysconfdir@ 24 includedir = @includedir@ 25 mandir = @mandir@ 26 man1dir = $(mandir)/man1 27 man3dir = $(mandir)/man3 28 man5dir = $(mandir)/man5 29 man8dir = $(mandir)/man8 30 infodir = @infodir@ 31 datadir = @datadir@ 32 pkgconfigdir = $(libdir)/pkgconfig 33 34 @SET_MAKE@ 35 36 @ifGNUmake@ V = 37 @ifGNUmake@ ifeq ($(strip $(V)),) 38 @ifGNUmake@ # E = @echo 39 @ifGNUmake@ # ES = echo 40 @ifGNUmake@ # Q = @ 41 @ifGNUmake@ E = @E@ 42 @ifGNUmake@ ES = @ES@ 43 @ifGNUmake@ Q = @Q@ 44 @ifGNUmake@ else 45 @ifGNUmake@ E = @\# 46 @ifGNUmake@ ES = \# 47 @ifGNUmake@ Q = 48 @ifGNUmake@ endif 49 50 @ifNotGNUmake@ E = @E@ 51 @ifNotGNUmake@ ES = @ES@ 52 @ifNotGNUmake@ Q = @Q@ 53 54 @ifGNUmake@ CHECK=sparse 55 @ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null 56 @ifGNUmake@ CPPCHECK=cppcheck 57 @ifGNUmake@ CPPCHECK_OPTS=--force --enable=all --quiet 58 @ifGNUmake@ ifeq ("$(C)", "2") 59 @ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__ 60 @ifGNUmake@ CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS) 61 @ifGNUmake@ else 62 @ifGNUmake@ ifeq ("$(C)", "1") 63 @ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) 64 @ifGNUmake@ CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS) 65 @ifGNUmake@ else 66 @ifGNUmake@ CHECK_CMD=@true 67 @ifGNUmake@ CPPCHECK_CMD=@true 68 @ifGNUmake@ endif 69 @ifGNUmake@ endif 70 71 @ifNotGNUmake@ CHECK_CMD=true 72 @ifNotGNUmake@ CPPCHECK_CMD=true 73 74 CC = @CC@ 75 BUILD_CC = @BUILD_CC@ 76 CFLAGS = @CFLAGS@ 77 CFLAGS_SHLIB = @CFLAGS_SHLIB@ 78 CFLAGS_STLIB = @CFLAGS_STLIB@ 79 CPPFLAGS = @INCLUDES@ 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) 83 LDFLAGS = @LDFLAGS@ 84 LDFLAGS_SHLIB = @LDFLAGS_SHLIB@ 85 ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@ 86 LDFLAGS_STATIC = @LDFLAGS_STATIC@ 87 BUILD_CFLAGS = @BUILD_CFLAGS@ 88 BUILD_LDFLAGS = @BUILD_LDFLAGS@ 89 RDYNAMIC = @RDYNAMIC@ 90 LINK_BUILD_FLAGS = @LINK_BUILD_FLAGS@ 91 LINK_INSTALL_FLAGS = @LINK_INSTALL_FLAGS@ 92 RM = @RM@ 93 LN = @LN@ 94 LN_S = @LN_S@ 95 MV = @MV@ 96 CP = @CP@ 97 CHMOD = @CHMOD@ 98 AR = @AR@ 99 AWK = @AWK@ 100 SED = @SED@ 101 PERL = @PERL@ 102 RANLIB = @RANLIB@ 103 STRIP = @STRIP@ 104 LD = $(PURE) @CC@ 105 ARUPD = $(AR) r 106 ARGEN = $(AR) rc 107 LDCONFIG = @LDCONFIG@ 108 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 109 INSTALL_DATA = @INSTALL_DATA@ 110 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 111 MKINSTALLDIRS = @MKINSTALLDIRS@ 112 113 # 114 # Library definitions 115 # 116 LIB = $(top_builddir)/lib 117 LIBSS = $(LIB)/libss@LIB_EXT@ @PRIVATE_LIBS_CMT@ @DLOPEN_LIB@ 118 LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@ 119 LIBE2P = $(LIB)/libe2p@LIB_EXT@ 120 LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@ 121 LIBUUID = @LIBUUID@ @SOCKET_LIB@ 122 LIBMAGIC = @MAGIC_LIB@ 123 LIBFUSE = @FUSE_LIB@ 124 LIBSUPPORT = $(LIBINTL) $(LIB)/libsupport@STATIC_LIB_EXT@ 125 LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID) 126 LIBINTL = @LIBINTL@ 127 SYSLIBS = @LIBS@ 128 DEPLIBSS = $(LIB)/libss@LIB_EXT@ 129 DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ 130 DEPLIBUUID = @DEPLIBUUID@ 131 DEPLIBSUPPORT = $(LIB)/libsupport@STATIC_LIB_EXT@ 132 DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID) 133 TESTENV = LD_LIBRARY_PATH="$(LIB):$${LD_LIBRARY_PATH}" DYLD_LIBRARY_PATH="$(LIB):$${DYLD_LIBRARY_PATH}" 134 135 STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@ 136 STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@ 137 STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@ 138 STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@ 139 STATIC_LIBUUID = @STATIC_LIBUUID@ @SOCKET_LIB@ 140 STATIC_LIBSUPPORT = $(LIBINTL) $(LIBSUPPORT) 141 STATIC_LIBBLKID = @STATIC_LIBBLKID@ $(STATIC_LIBUUID) 142 DEPSTATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ 143 DEPSTATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ 144 DEPSTATIC_LIBUUID = @DEPSTATIC_LIBUUID@ 145 DEPSTATIC_LIBSUPPORT = $(DEPLIBSUPPORT) 146 DEPSTATIC_LIBBLKID = @DEPSTATIC_LIBBLKID@ $(DEPSTATIC_LIBUUID) 147 148 PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ @DLOPEN_LIB@ 149 PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ @SEM_INIT_LIB@ 150 PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@ 151 PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@ 152 PROFILED_LIBUUID = @PROFILED_LIBUUID@ @SOCKET_LIB@ 153 PROFILED_LIBSUPPORT = $(LIBINTL) $(LIB)/libsupport@PROFILED_LIB_EXT@ 154 PROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(PROFILED_LIBUUID) 155 DEPPROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ 156 DEPPROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ 157 DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@ 158 DEPPROFILED_LIBSUPPORT = $(PROFILED_LIBSUPPORT) 159 DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID) 160 161 # 162 # A fast substitution command for fixing up man pages, shell scripts, etc. 163 # 164 SUBST_CONF=$(top_builddir)/util/subst.conf 165 SUBSTITUTE= $(top_builddir)/util/subst -f $(SUBST_CONF) 166 SUBSTITUTE_UPTIME= $(top_builddir)/util/subst -t -f $(SUBST_CONF) 167 DEP_SUBSTITUTE= $(top_builddir)/util/subst $(SUBST_CONF) 168 169 $(top_builddir)/util/subst: 170 cd $(top_builddir)/util ; $(MAKE) subst 171 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 189 # 190 # Warning flags 191 # 192 # Run make gcc-wall to do a build with warning messages. 193 # 194 # 195 WFLAGS= -std=gnu99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \ 196 -pedantic $(WFLAGS_EXTRA) \ 197 -Wall -W -Wwrite-strings -Wpointer-arith \ 198 -Wcast-qual -Wcast-align -Wno-variadic-macros \ 199 -Wstrict-prototypes -Wmissing-prototypes \ 200 -Wformat-security -Wformat-nonliteral \ 201 -Wmissing-format-attribute -O2 -Wstrict-aliasing \ 202 -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow \ 203 -UENABLE_NLS 204 205 gcc-wall-new: 206 ($(MAKE) CFLAGS_WARN="$(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup 207 208 gcc-wall: 209 $(MAKE) clean > /dev/null 210 $(MAKE) gcc-wall-new 211 212 static-check: 213 ($(MAKE) C=1 V=1 CFLAGS="$(ALL_CFLAGS) $(WFLAGS)") 2>&1 | sed -f $(top_srcdir)/util/static-analysis-cleanup 214 215 static-check-all: 216 $(MAKE) clean > /dev/null 217 $(MAKE) static-check 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 235 # 236 # Autoconf magic... 237 # 238 239 DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.library \ 240 $(top_srcdir)/lib/Makefile.elf-lib \ 241 $(top_srcdir)/lib/Makefile.bsd-lib \ 242 $(top_srcdir)/lib/Makefile.darwin-lib \ 243 $(top_srcdir)/lib/Makefile.solaris-lib \ 244 $(top_srcdir)/lib/Makefile.profile 245 246 $(top_builddir)/config.status: $(top_srcdir)/configure 247 cd $(top_builddir); ./config.status --recheck 248 249 $(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status 250 cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status 251 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 260 $(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \ 261 $(top_builddir)/config.status 262 cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status 263 264 $(top_builddir)/util/subst.conf: $(top_srcdir)/util/subst.conf.in \ 265 $(top_builddir)/config.status 266 cd $(top_builddir); CONFIG_FILES=util/subst.conf ./config.status 267 268 Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \ 269 $(DEP_MAKEFILE) $(top_builddir)/config.status 270 cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status 271 272 @MAINTAINER_CMT@$(top_srcdir)/configure: $(top_srcdir)/configure.ac 273 @MAINTAINER_CMT@ cd $(top_srcdir) && autoheader && autoconf 274 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 283 # 284 # Make depend magic... 285 # 286 287 .depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl 288 if test -n "$(SRCS)" ; then \ 289 $(CC) -M $(ALL_CFLAGS) $(DEPEND_CFLAGS) $(SRCS) | \ 290 $(SED) -f $(top_srcdir)/depfix.sed \ 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' \ 295 -e '/^#/d' \ 296 -e '/^ *\\$$/d' | \ 297 $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \ 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; \ 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 311 312 # End of file MCONFIG 313