1 # Beginning of file MCONFIG
9 COMPRESS_EXT = gz bz2 bz Z
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@
22 localedir = $(datadir)/locale
23 root_sysconfdir= @root_sysconfdir@
24 includedir = @includedir@
26 man1dir = $(mandir)/man1
27 man3dir = $(mandir)/man3
28 man5dir = $(mandir)/man5
29 man8dir = $(mandir)/man8
32 pkgconfigdir = $(libdir)/pkgconfig
37 @ifGNUmake@ ifeq ($(strip $(V)),)
38 @ifGNUmake@ # E = @echo
39 @ifGNUmake@ # ES = echo
50 @ifNotGNUmake@ E = @E@
51 @ifNotGNUmake@ ES = @ES@
52 @ifNotGNUmake@ Q = @Q@
54 @ifGNUmake@ CHECK=sparse
55 @ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null
56 @ifGNUmake@ ifeq ("$(C)", "2")
57 @ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__
59 @ifGNUmake@ ifeq ("$(C)", "1")
60 @ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS)
62 @ifGNUmake@ CHECK_CMD=@true
66 @ifNotGNUmake@ CHECK_CMD=@true
70 CFLAGS = @CFLAGS@ @DEFS@
72 ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
74 ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@
75 LDFLAGS_STATIC = $(LDFLAGS) @LDFLAG_STATIC@
76 BUILD_CFLAGS = @BUILD_CFLAGS@
77 BUILD_LDFLAGS = @BUILD_LDFLAGS@
79 LINK_BUILD_FLAGS = @LINK_BUILD_FLAGS@
80 LINK_INSTALL_FLAGS = @LINK_INSTALL_FLAGS@
97 INSTALL_PROGRAM = @INSTALL_PROGRAM@
98 INSTALL_DATA = @INSTALL_DATA@
99 INSTALL_SCRIPT = @INSTALL_SCRIPT@
100 MKINSTALLDIRS = @MKINSTALLDIRS@
103 # Library definitions
105 LIB = $(top_builddir)/lib
106 LIBSS = $(LIB)/libss@LIB_EXT@ @PRIVATE_LIBS_CMT@ @DLOPEN_LIB@
107 LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@
108 LIBE2P = $(LIB)/libe2p@LIB_EXT@
109 LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
110 LIBUUID = @LIBUUID@ @SOCKET_LIB@
111 LIBQUOTA = @STATIC_LIBQUOTA@
112 LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID)
115 DEPLIBSS = $(LIB)/libss@LIB_EXT@
116 DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
117 DEPLIBUUID = @DEPLIBUUID@
118 DEPLIBQUOTA = @DEPSTATIC_LIBQUOTA@
119 DEPLIBBLKID = @DEPLIBBLKID@ @PRIVATE_LIBS_CMT@ $(DEPLIBUUID)
120 TESTENV = LD_LIBRARY_PATH="$(LIB):$${LD_LIBRARY_PATH}" DYLD_LIBRARY_PATH="$(LIB):$${DYLD_LIBRARY_PATH}"
122 STATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@ @DLOPEN_LIB@
123 STATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@ @SEM_INIT_LIB@
124 STATIC_LIBE2P = $(LIB)/libe2p@STATIC_LIB_EXT@
125 STATIC_LIBEXT2FS = $(LIB)/libext2fs@STATIC_LIB_EXT@
126 STATIC_LIBUUID = @STATIC_LIBUUID@ @SOCKET_LIB@
127 STATIC_LIBQUOTA = @STATIC_LIBQUOTA@
128 STATIC_LIBBLKID = @STATIC_LIBBLKID@ $(STATIC_LIBUUID)
129 DEPSTATIC_LIBSS = $(LIB)/libss@STATIC_LIB_EXT@
130 DEPSTATIC_LIBCOM_ERR = $(LIB)/libcom_err@STATIC_LIB_EXT@
131 DEPSTATIC_LIBUUID = @DEPSTATIC_LIBUUID@
132 DEPSTATIC_LIBQUOTA = @DEPSTATIC_LIBQUOTA@
133 DEPSTATIC_LIBBLKID = @DEPSTATIC_LIBBLKID@ $(DEPSTATIC_LIBUUID)
135 PROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@ @DLOPEN_LIB@
136 PROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@ @SEM_INIT_LIB@
137 PROFILED_LIBE2P = $(LIB)/libe2p@PROFILED_LIB_EXT@
138 PROFILED_LIBEXT2FS = $(LIB)/libext2fs@PROFILED_LIB_EXT@
139 PROFILED_LIBUUID = @PROFILED_LIBUUID@ @SOCKET_LIB@
140 PROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
141 PROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(PROFILED_LIBUUID)
142 DEPPROFILED_LIBSS = $(LIB)/libss@PROFILED_LIB_EXT@
143 DEPPROFILED_LIBCOM_ERR = $(LIB)/libcom_err@PROFILED_LIB_EXT@
144 DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@
145 DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
146 DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID)
149 # A fast substitution command for fixing up man pages, shell scripts, etc.
151 SUBST_CONF=$(top_builddir)/util/subst.conf
152 SUBSTITUTE= $(top_builddir)/util/subst -f $(SUBST_CONF)
153 SUBSTITUTE_UPTIME= $(top_builddir)/util/subst -t -f $(SUBST_CONF)
154 DEP_SUBSTITUTE= $(top_builddir)/util/subst $(SUBST_CONF)
156 $(top_builddir)/util/subst:
157 cd $(top_builddir)/util ; $(MAKE) subst
160 # Script for installing symlinks (for shared libraries)
162 $(top_builddir)/util/install-symlink: $(top_srcdir)/util/install-symlink.in \
163 $(top_builddir)/config.status
164 cd $(top_builddir); CONFIG_FILES=util/install-symlink ./config.status
165 chmod +x $(top_builddir)/util/install-symlink
167 $(top_builddir)/util/symlinks:
168 cd $(top_builddir)/util ; $(MAKE) symlinks
170 INSTALL_SYMLINK = /bin/sh $(top_builddir)/util/install-symlink \
172 --symlinks=$(top_builddir)/util/symlinks
173 DEP_INSTALL_SYMLINK = $(top_builddir)/util/install-symlink \
174 $(top_builddir)/util/symlinks
179 # Run make gcc-wall to do a build with warning messages.
182 WFLAGS= -std=c99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
183 -pedantic $(WFLAGS_EXTRA) \
184 -Wall -W -Wwrite-strings -Wpointer-arith \
185 -Wcast-qual -Wcast-align -Wno-variadic-macros \
186 -Wstrict-prototypes -Wmissing-prototypes \
187 -Wformat-security -Wformat-nonliteral \
188 -Wmissing-format-attribute -O2 -Wstrict-aliasing \
189 -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow \
193 (make CFLAGS="@CFLAGS@ $(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup
196 make clean > /dev/null
200 # Installation user and groups
219 DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.library \
220 $(top_srcdir)/lib/Makefile.elf-lib \
221 $(top_srcdir)/lib/Makefile.bsd-lib \
222 $(top_srcdir)/lib/Makefile.darwin-lib \
223 $(top_srcdir)/lib/Makefile.solaris-lib \
224 $(top_srcdir)/lib/Makefile.profile
226 $(top_builddir)/config.status: $(top_srcdir)/configure
227 cd $(top_builddir); ./config.status --recheck
229 $(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status
230 cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status
232 $(top_builddir)/lib/config.h: $(top_srcdir)/lib/config.h.in \
233 $(top_builddir)/config.status
234 cd $(top_builddir); CONFIG_FILES=lib/config.h ./config.status
236 $(top_builddir)/lib/dirpaths.h: $(DEP_SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in
238 $(Q) $(SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in $@
240 $(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \
241 $(top_builddir)/config.status
242 cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status
244 $(top_builddir)/util/subst.conf: $(top_srcdir)/util/subst.conf.in \
245 $(top_builddir)/config.status
246 cd $(top_builddir); CONFIG_FILES=util/subst.conf ./config.status
248 Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
249 $(DEP_MAKEFILE) $(top_builddir)/config.status
250 cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status
252 $(top_srcdir)/configure: $(top_srcdir)/configure.in
253 cd $(top_srcdir) && autoheader && autoconf
255 coverage.txt: Makefile $(SRCS)
256 if test -n "$(SRCS)"; then \
257 gcov -s $(top_srcdir) -o . $(SRCS) > coverage.txt 2>&1 ; \
261 $(RM) -f *.gcda *.gcov *.gcno coverage.txt
264 # Make depend magic...
267 .depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
268 if test -n "$(SRCS)" ; then \
269 $(CC) -M $(ALL_CFLAGS) $(DEPEND_CFLAGS) $(SRCS) | \
270 $(SED) -f $(top_srcdir)/depfix.sed \
271 -e 's; $(srcdir)/; $$(srcdir)/;g' \
272 -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
273 -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
277 $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \
281 if test -n "$(SRCS)" ; then \
282 sed -e '/^# +++ Dependency line eater +++/,$$d' \
283 < $(srcdir)/Makefile.in | cat - .depend \
284 > $(srcdir)/Makefile.in.new; \
285 if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \
286 $(RM) $(srcdir)/Makefile.in.new ; \
288 $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
289 $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
292 # End of file MCONFIG