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