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