LIBQUOTA = @STATIC_LIBQUOTA@
LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID)
LIBINTL = @LIBINTL@
+SYSLIBS = @LIBS@
DEPLIBSS = $(LIB)/libss@LIB_EXT@
DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
DEPLIBUUID = @DEPLIBUUID@
+WITH_DIET_LIBC=
+
+# Check whether --with-diet-libc was given.
+if test "${with_diet_libc+set}" = set; then :
+ withval=$with_diet_libc; CC="diet cc -nostdinc"
+WITH_DIET_LIBC=yes
+if test -z "$LIBS"
+then
+ LIBS="-lcompat"
+else
+ LIBS="$LIBS -lcompat"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CC=$CC" >&5
+$as_echo "CC=$CC" >&6; }
+fi
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
fi
-WITH_DIET_LIBC=
-
-# Check whether --with-diet-libc was given.
-if test "${with_diet_libc+set}" = set; then :
- withval=$with_diet_libc; CC="diet cc -nostdinc"
-WITH_DIET_LIBC=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CC=$CC" >&5
-$as_echo "CC=$CC" >&6; }
-fi
# Check whether --with-cc was given.
if test "${with_cc+set}" = set; then :
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e4defrag support by default" >&5
+ if test -z "$WITH_DIET_LIBC"
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e4defrag support by default" >&5
$as_echo "Enabling e4defrag support by default" >&6; }
-DEFRAG_CMT=
+ DEFRAG_CMT=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling e4defrag support by default" >&5
+$as_echo "Disabling e4defrag support by default" >&6; }
+ DEFRAG_CMT="#"
+fi
fi
fi
fi
-for ac_func in __secure_getenv backtrace blkid_probe_get_topology chflags fadvise64 fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 futimes getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llseek lseek64 mallinfo mbstowcs memalign mmap msync nanosleep open64 pathconf posix_fadvise posix_fadvise64 posix_memalign prctl secure_getenv setmntent setresgid setresuid srandom strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc
+for ac_func in __secure_getenv backtrace blkid_probe_get_topology chflags fadvise64 fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 futimes getcwd getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llseek lseek64 mallinfo mbstowcs memalign mempcpy mmap msync nanosleep open64 pathconf posix_fadvise posix_fadvise64 posix_memalign prctl secure_getenv setmntent setresgid setresuid srandom stpcpy strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if test "$USE_INCLUDED_LIBINTL" = "yes" ; then
INCLUDES=$INCLUDES' -I$(top_builddir)/intl -I$(top_srcdir)/intl'
fi
+if test -n "$WITH_DIET_LIBC" ; then
+ INCLUDES="$INCLUDES -D_REENTRANT"
+fi
if test $cross_compiling = no; then
BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H"
AC_SUBST(E2FSPROGS_DAY)
AC_SUBST(E2FSPROGS_VERSION)
AC_SUBST(E2FSPROGS_PKGVER)
-AC_CANONICAL_HOST
-dnl
-dnl Check to see if libdl exists for the sake of dlopen
-dnl
-DLOPEN_LIB=''
-AC_CHECK_LIB(dl, dlopen,
-[DLOPEN_LIB=-ldl
-AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if dlopen/libdl exists])])
-AC_SUBST(DLOPEN_LIB)
dnl
dnl Use diet libc
dnl
[ --with-diet-libc use diet libc],
CC="diet cc -nostdinc"
WITH_DIET_LIBC=yes
+if test -z "$LIBS"
+then
+ LIBS="-lcompat"
+else
+ LIBS="$LIBS -lcompat"
+fi
AC_MSG_RESULT(CC=$CC))dnl
dnl
+AC_CANONICAL_HOST
+dnl
+dnl Check to see if libdl exists for the sake of dlopen
+dnl
+DLOPEN_LIB=''
+AC_CHECK_LIB(dl, dlopen,
+[DLOPEN_LIB=-ldl
+AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if dlopen/libdl exists])])
+AC_SUBST(DLOPEN_LIB)
+dnl
AC_ARG_WITH([cc],
AC_HELP_STRING([--with-cc],[no longer supported, use CC= instead]),
AC_MSG_ERROR([--with-cc no longer supported; use CC= instead]))
AC_MSG_RESULT([Enabling e4defrag support])
fi
,
-AC_MSG_RESULT([Enabling e4defrag support by default])
-DEFRAG_CMT=
+if test -z "$WITH_DIET_LIBC"
+then
+ AC_MSG_RESULT([Enabling e4defrag support by default])
+ DEFRAG_CMT=
+else
+ AC_MSG_RESULT([Disabling e4defrag support by default])
+ DEFRAG_CMT="#"
+fi
)
AC_SUBST(DEFRAG_CMT)
dnl
fstat64
ftruncate64
futimes
+ getcwd
getdtablesize
getmntinfo
getpwuid_r
mallinfo
mbstowcs
memalign
+ mempcpy
mmap
msync
nanosleep
setresgid
setresuid
srandom
+ stpcpy
strcasecmp
strdup
strnlen
if test "$USE_INCLUDED_LIBINTL" = "yes" ; then
INCLUDES=$INCLUDES' -I$(top_builddir)/intl -I$(top_srcdir)/intl'
fi
+if test -n "$WITH_DIET_LIBC" ; then
+ INCLUDES="$INCLUDES -D_REENTRANT"
+fi
AC_SUBST(INCLUDES)
dnl
dnl Build CFLAGS
$(srcdir)/filefrag.c $(srcdir)/extent_inode.c $(srcdir)/zap.c
LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \
- $(LIBUUID)
+ $(LIBUUID) $(SYSLIBS)
DEPLIBS= $(LIBEXT2FS) $(LIBE2P) $(DEPLIBSS) $(DEPLIBCOM_ERR) \
$(DEPLIBBLKID) $(DEPLIBUUID)
STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR) \
- $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(STATIC_LIBE2P)
+ $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(STATIC_LIBE2P) $(SYSLIBS)
STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBSS) \
$(DEPSTATIC_LIBCOM_ERR) $(DEPSTATIC_LIBUUID) \
$(DEPSTATIC_LIBE2P)
FMANPAGES= e2fsck.conf.5
LIBS= $(LIBQUOTA) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBBLKID) $(LIBUUID) \
- $(LIBINTL) $(LIBE2P)
+ $(LIBINTL) $(LIBE2P) $(SYSLIBS)
DEPLIBS= $(DEPLIBQUOTA) $(LIBEXT2FS) $(DEPLIBCOM_ERR) $(DEPLIBBLKID) \
$(DEPLIBUUID) $(DEPLIBE2P)
STATIC_LIBS= $(STATIC_LIBQUOTA) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
- $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) $(STATIC_LIBE2P)
+ $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) $(STATIC_LIBE2P) \
+ $(SYSLIBS)
STATIC_DEPLIBS= $(DEPSTATIC_LIBQUOTA) $(STATIC_LIBEXT2FS) \
$(DEPSTATIC_LIBCOM_ERR) $(DEPSTATIC_LIBBLKID) \
$(DEPSTATIC_LIBUUID) $(DEPSTATIC_LIBE2P)
PROFILED_LIBS= $(PROFILED_LIBQUOTA) $(PROFILED_LIBEXT2FS) \
$(PROFILED_LIBCOM_ERR) $(PROFILED_LIBBLKID) $(PROFILED_LIBUUID) \
- $(PROFILED_LIBE2P) $(LIBINTL)
+ $(PROFILED_LIBE2P) $(LIBINTL) $(SYSLIBS)
PROFILED_DEPLIBS= $(DEPPROFILED_LIBQUOTA) $(PROFILED_LIBEXT2FS) \
$(DEPPROFILED_LIBCOM_ERR) $(DEPPROFILED_LIBBLKID) \
$(DEPPROFILED_LIBUUID) $(DEPPROFILED_LIBE2P)
$(DEPLIBCOM_ERR)
$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_problem \
$(srcdir)/problem.c -DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR) \
- $(LIBINTL)
+ $(LIBINTL) $(SYSLIBS)
tst_crc32: $(srcdir)/crc32.c $(LIBEXT2FS) $(DEPLIBCOM_ERR)
$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32 $(srcdir)/crc32.c \
- -DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR)
+ -DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR) $(SYSLIBS)
tst_refcount: ea_refcount.c $(DEPLIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_refcount $(srcdir)/ea_refcount.c \
- $(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR) $(LIBEXT2FS)
+ $(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR) $(LIBEXT2FS) \
+ $(SYSLIBS)
tst_logfile: $(srcdir)/logfile.c
$(E) " LD $@"
$(Q) $(CC) -o tst_logfile $(srcdir)/logfile.c $(ALL_CFLAGS) \
- -DTEST_PROGRAM
+ -DTEST_PROGRAM $(SYSLIBS)
tst_region: region.c $(DEPLIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_region $(srcdir)/region.c \
- $(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR)
+ $(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR) $(SYSLIBS)
check:: tst_refcount tst_region tst_crc32 tst_problem
LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_refcount
@ifNotGNUmake@ E = @E@
@ifNotGNUmake@ Q = @Q@
+@ifGNUmake@ CHECK=sparse
+@ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null
+@ifGNUmake@ ifeq ("$(C)", "2")
+@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__
+@ifGNUmake@ else
+@ifGNUmake@ ifeq ("$(C)", "1")
+@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS)
+@ifGNUmake@ else
+@ifGNUmake@ CHECK_CMD=@true
+@ifGNUmake@ endif
+@ifGNUmake@ endif
+
+@ifNotGNUmake@ CHECK_CMD=@true
+
l = @INTL_LIBTOOL_SUFFIX_PREFIX@
AR = ar
tst_badblocks: tst_badblocks.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_badblocks tst_badblocks.o $(STATIC_LIBEXT2FS) \
- $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS)
tst_icount: $(srcdir)/icount.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_icount $(srcdir)/icount.c -DDEBUG $(ALL_CFLAGS) \
- $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
tst_iscan: tst_iscan.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_iscan tst_iscan.o $(STATIC_LIBEXT2FS) \
- $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS)
tst_getsize: tst_getsize.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_getsize tst_getsize.o $(STATIC_LIBEXT2FS) \
- $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS)
tst_ismounted: $(srcdir)/ismounted.c $(STATIC_LIBEXT2FS) \
$(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_ismounted $(srcdir)/ismounted.c \
$(STATIC_LIBEXT2FS) -DDEBUG $(ALL_CFLAGS) \
- $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS)
tst_byteswap: tst_byteswap.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_byteswap tst_byteswap.o $(STATIC_LIBEXT2FS) \
- $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS)
tst_bitops: tst_bitops.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_bitops tst_bitops.o $(ALL_CFLAGS) \
- $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
tst_getsectsize: tst_getsectsize.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_sectgetsize tst_getsectsize.o \
- $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
tst_types.o: $(srcdir)/tst_types.c ext2_types.h
tst_types: tst_types.o ext2_types.h
$(E) " LD $@"
- $(Q) $(CC) -o tst_types tst_types.o
+ $(Q) $(CC) -o tst_types tst_types.o $(SYSLIBS)
tst_super_size.o: $(srcdir)/tst_super_size.c $(srcdir)/ext2_fs.h
tst_super_size: tst_super_size.o
$(E) " LD $@"
- $(Q) $(CC) -o tst_super_size tst_super_size.o
+ $(Q) $(CC) -o tst_super_size tst_super_size.o $(SYSLIBS)
tst_fs_struct.o: $(srcdir)/tst_fs_struct.c $(srcdir)/ext2fs.h
tst_fs_struct: tst_fs_struct.o
$(E) " LD $@"
- $(Q) $(CC) -o tst_fs_struct tst_fs_struct.o
+ $(Q) $(CC) -o tst_fs_struct tst_fs_struct.o $(SYSLIBS)
tst_inode_size.o: $(srcdir)/tst_inode_size.c $(srcdir)/ext2_fs.h
tst_inode_size: tst_inode_size.o
$(E) " LD $@"
- $(Q) $(CC) -o tst_inode_size tst_inode_size.o
+ $(Q) $(CC) -o tst_inode_size tst_inode_size.o $(SYSLIBS)
ext2_tdbtool: tdbtool.o
$(E) " LD $@"
- $(Q) $(CC) -o ext2_tdbtool tdbtool.o tdb.o
+ $(Q) $(CC) -o ext2_tdbtool tdbtool.o tdb.o $(SYSLIBS)
extent_dbg.c: $(srcdir)/extent_dbg.ct
$(E) " MK_CMDS $<"
$(DEPSTATIC_LIBSS) $(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o $@ tst_bitmaps.o tst_bitmaps_cmd.o $(ALL_CFLAGS) \
- $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR) \
+ $(SYSLIBS)
tst_extents: $(srcdir)/extent.c $(DEBUG_OBJS) $(DEPSTATIC_LIBSS) \
$(STATIC_LIBE2P) $(DEPLIBUUID) $(DEPLIBBLKID) $(DEPSTATIC_LIBCOM_ERR)
$(Q) $(CC) -o tst_extents $(srcdir)/extent.c \
$(ALL_CFLAGS) -DDEBUG $(DEBUG_OBJS) $(STATIC_LIBSS) \
$(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(LIBBLKID) $(LIBUUID) \
- $(STATIC_LIBCOM_ERR) -I $(top_srcdir)/debugfs
+ $(STATIC_LIBCOM_ERR) $(SYSLIBS) -I $(top_srcdir)/debugfs
tst_inline: $(srcdir)/inline.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o tst_inline $(srcdir)/inline.c $(ALL_CFLAGS) -DDEBUG \
- $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+ $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
tst_csum: csum.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(STATIC_LIBE2P) \
$(top_srcdir)/lib/e2p/e2p.h
$(E) " LD $@"
$(Q) $(CC) -o tst_csum $(srcdir)/csum.c -DDEBUG \
$(ALL_CFLAGS) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
- $(STATIC_LIBE2P)
+ $(STATIC_LIBE2P) $(SYSLIBS)
tst_crc32c: $(srcdir)/crc32c.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
$(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32c $(srcdir)/crc32c.c \
- -DUNITTEST $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+ -DUNITTEST $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
+ $(SYSLIBS)
mkjournal: mkjournal.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR)
$(E) " LD $@"
- $(Q) $(CC) -o mkjournal $(srcdir)/mkjournal.c -DDEBUG $(STATIC_LIBEXT2FS) $(LIBCOM_ERR) $(ALL_CFLAGS)
+ $(Q) $(CC) -o mkjournal $(srcdir)/mkjournal.c -DDEBUG \
+ $(STATIC_LIBEXT2FS) $(LIBCOM_ERR) $(ALL_CFLAGS) $(SYSLIBS)
check:: tst_bitops tst_badblocks tst_iscan tst_types tst_icount \
tst_super_size tst_types tst_inode_size tst_csum tst_crc32c tst_bitmaps \
test_ss: test_ss.o test_cmd.o $(DEPLIBSS) $(DEPLIBCOM_ERR)
$(E) " LD $@"
$(Q) $(CC) -o $@ test_ss.o test_cmd.o $(ALL_CFLAGS) \
- $(LIBSS) $(LIBCOM_ERR)
+ $(LIBSS) $(LIBCOM_ERR) $(SYSLIBS)
check:: all test_ss
$(E) " RUN TEST test_ss"
$(srcdir)/ismounted.c $(srcdir)/../e2fsck/profile.c \
$(srcdir)/e2undo.c $(srcdir)/e2freefrag.c
-LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
+LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
DEPLIBS= $(LIBEXT2FS) $(DEPLIBCOM_ERR)
PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR)
PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(DEPPROFILED_LIBCOM_ERR)
-STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
+STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR)
findsuper: findsuper.o
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o $(LIBS)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o $(LIBS) $(SYSLIBS)
partinfo: partinfo.o
$(E) " LD $@"
e2initrd_helper: e2initrd_helper.o $(DEPLIBS) $(DEPLIBBLKID) $(LIBEXT2FS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -o e2initrd_helper e2initrd_helper.o $(LIBS) \
- $(LIBBLKID) $(LIBEXT2FS) $(LIBINTL)
+ $(LIBBLKID) $(LIBEXT2FS) $(LIBINTL) $(SYSLIBS)
tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBBLKID) \
$(DEPLIBUUID) $(DEPLIBQUOTA) $(LIBEXT2FS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS) \
$(LIBBLKID) $(LIBUUID) $(LIBQUOTA) $(LIBEXT2FS) $(LIBS_E2P) \
- $(LIBINTL)
+ $(LIBINTL) $(SYSLIBS)
tune2fs.static: $(TUNE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBBLKID)
$(E) " LD $@"
$(Q) $(CC) $(LDFLAGS_STATIC) -o tune2fs.static $(TUNE2FS_OBJS) \
$(STATIC_LIBS) $(STATIC_LIBBLKID) $(STATIC_LIBUUID) \
- $(STATIC_LIBQUOTA) $(STATIC_LIBE2P) $(LIBINTL)
+ $(STATIC_LIBQUOTA) $(STATIC_LIBE2P) $(LIBINTL) $(SYSLIBS)
tune2fs.profiled: $(TUNE2FS_OBJS) $(PROFILED_DEPLIBS) \
$(PROFILED_E2P) $(DEPPROFILED_LIBBLKID) $(DEPPROFILED_LIBUUID) \
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o tune2fs.profiled \
$(PROFILED_TUNE2FS_OBJS) $(PROFILED_LIBBLKID) \
$(PROFILED_LIBUUID) $(PROFILED_LIBQUOTA) $(PROFILED_LIBE2P) \
- $(LIBINTL) $(PROFILED_LIBS)
+ $(LIBINTL) $(PROFILED_LIBS) $(SYSLIBS)
blkid: $(BLKID_OBJS) $(DEPLIBBLKID) $(LIBEXT2FS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -o blkid $(BLKID_OBJS) $(LIBBLKID) $(LIBINTL) \
- $(LIBEXT2FS)
+ $(LIBEXT2FS) $(SYSLIBS)
blkid.static: $(BLKID_OBJS) $(STATIC_DEPLIBS) $(DEPSTATIC_LIBBLKID)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -o blkid.static $(BLKID_OBJS) $(STATIC_LIBS) \
- $(STATIC_LIBBLKID) $(LIBINTL)
+ $(STATIC_LIBBLKID) $(LIBINTL) $(SYSLIBS)
blkid.profiled: $(BLKID_OBJS) $(DEPPROFILED_LIBBLKID) \
$(PROFILED_LIBEXT2FS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o blkid.profiled $(PROFILED_BLKID_OBJS) \
- $(PROFILED_LIBBLKID) $(LIBINTL) $(PROFILED_LIBEXT2FS)
+ $(PROFILED_LIBBLKID) $(LIBINTL) $(PROFILED_LIBEXT2FS) $(SYSLIBS)
e2image: $(E2IMAGE_OBJS) $(DEPLIBS)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS) $(LIBINTL)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS) \
+ $(LIBINTL) $(SYSLIBS)
e2image.profiled: $(E2IMAGE_OBJS) $(PROFILED_DEPLIBS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2image.profiled \
- $(PROFILED_E2IMAGE_OBJS) $(PROFILED_LIBS) $(LIBINTL)
+ $(PROFILED_E2IMAGE_OBJS) $(PROFILED_LIBS) $(LIBINTL) $(SYSLIBS)
e2undo: $(E2UNDO_OBJS) $(DEPLIBS)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o e2undo $(E2UNDO_OBJS) $(LIBS) $(LIBINTL)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e2undo $(E2UNDO_OBJS) $(LIBS) \
+ $(LIBINTL) $(SYSLIBS)
e2undo.profiled: $(E2UNDO_OBJS) $(PROFILED_DEPLIBS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2undo.profiled \
- $(PROFILED_E2UNDO_OBJS) $(PROFILED_LIBS) $(LIBINTL)
+ $(PROFILED_E2UNDO_OBJS) $(PROFILED_LIBS) $(LIBINTL) $(SYSLIBS)
e4defrag: $(E4DEFRAG_OBJS) $(DEPLIBS)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o e4defrag $(E4DEFRAG_OBJS) $(LIBS)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e4defrag $(E4DEFRAG_OBJS) $(LIBS) \
+ $(SYSLIBS)
e4defrag.profiled: $(E4DEFRAG_OBJS) $(PROFILED_DEPLIBS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e4defrag.profiled \
- $(PROFILED_E4DEFRAG_OBJS) $(PROFILED_LIBS)
+ $(PROFILED_E4DEFRAG_OBJS) $(PROFILED_LIBS) $(SYSLIBS)
base_device: base_device.c
$(E) " LD $@"
$(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \
- -DDEBUG -o base_device
+ -DDEBUG -o base_device $(SYSLIBS)
check:: base_device
./base_device < $(srcdir)/base_device.tst > base_device.out
mklost+found: $(MKLPF_OBJS)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS) $(LIBINTL)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS) \
+ $(LIBINTL) $(SYSLIBS)
mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBBLKID) $(DEPLIBUUID) \
$(DEPLIBQUOTA) $(LIBEXT2FS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBBLKID) \
- $(LIBUUID) $(LIBQUOTA) $(LIBEXT2FS) $(LIBE2P) $(LIBINTL)
+ $(LIBUUID) $(LIBQUOTA) $(LIBEXT2FS) $(LIBE2P) $(LIBINTL) \
+ $(SYSLIBS)
mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBUUID) \
$(DEPSTATIC_LIBQUOTA) $(DEPSTATIC_LIBBLKID)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \
$(STATIC_LIBQUOTA) $(STATIC_LIBS) $(STATIC_LIBE2P) \
- $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL)
+ $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) $(SYSLIBS)
mke2fs.profiled: $(MKE2FS_OBJS) $(PROFILED_DEPLIBS) \
$(PROFILED_LIBE2P) $(PROFILED_DEPLIBBLKID) $(PROFILED_DEPLIBUUID) \
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o mke2fs.profiled \
$(PROFILED_MKE2FS_OBJS) $(PROFILED_LIBBLKID) \
- $(PROFILED_LIBUUID) $(PROFILED_LIBQUOTA) $(PROFILED_LIBE2P) $(LIBINTL) \
- $(PROFILED_LIBS)
+ $(PROFILED_LIBUUID) $(PROFILED_LIBQUOTA) $(PROFILED_LIBE2P) \
+ $(LIBINTL) $(PROFILED_LIBS) $(SYSLIBS)
chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P) $(LIBINTL)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P) \
+ $(LIBINTL) $(SYSLIBS)
lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P) $(LIBINTL)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P) \
+ $(LIBINTL) $(SYSLIBS)
uuidgen: $(UUIDGEN_OBJS) $(DEPLIBUUID)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID) $(LIBINTL)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID) \
+ $(LIBINTL) $(SYSLIBS)
uuidgen.profiled: $(UUIDGEN_OBJS) $(PROFILED_DEPLIBUUID)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidgen.profiled \
- $(PROFILED_UUIDGEN_OBJS) $(PROFILED_LIBUUID) $(LIBINTL)
+ $(PROFILED_UUIDGEN_OBJS) $(PROFILED_LIBUUID) $(LIBINTL) \
+ $(SYSLIBS)
uuidd: $(UUIDD_OBJS) $(DEPLIBUUID)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o uuidd $(UUIDD_OBJS) $(LIBUUID) $(LIBINTL)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o uuidd $(UUIDD_OBJS) $(LIBUUID) \
+ $(LIBINTL) $(SYSLIBS)
uuidd.profiled: $(UUIDD_OBJS) $(PROFILED_DEPLIBUUID)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidd.profiled $(PROFILED_UUIDD_OBJS) \
- $(PROFILED_LIBUUID) $(LIBINTL)
+ $(PROFILED_LIBUUID) $(LIBINTL) $(SYSLIBS)
dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBUUID)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS) \
- $(LIBS_E2P) $(LIBUUID) $(LIBINTL)
+ $(LIBS_E2P) $(LIBUUID) $(LIBINTL) $(SYSLIBS)
dumpe2fs.profiled: $(DUMPE2FS_OBJS) $(PROFILED_DEPLIBS) \
$(PROFILED_LIBE2P) $(PROFILED_DEPLIBUUID)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o dumpe2fs.profiled \
$(PROFILED_DUMPE2FS_OBJS) $(PROFILED_LIBS) \
- $(PROFILED_LIBE2P) $(PROFILED_LIBUUID) $(LIBINTL)
+ $(PROFILED_LIBE2P) $(PROFILED_LIBUUID) $(LIBINTL) $(SYSLIBS)
fsck: $(FSCK_OBJS) $(DEPLIBBLKID)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBBLKID) $(LIBINTL)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBBLKID) \
+ $(LIBINTL) $(SYSLIBS)
fsck.profiled: $(FSCK_OBJS) $(PROFILED_DEPLIBBLKID)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o fsck.profiled $(PROFILED_FSCK_OBJS) \
- $(PROFILED_LIBBLKID) $(LIBINTL)
+ $(PROFILED_LIBBLKID) $(LIBINTL) $(SYSLIBS)
badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS) $(LIBINTL)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS) \
+ $(LIBINTL) $(SYSLIBS)
badblocks.profiled: $(BADBLOCKS_OBJS) $(PROFILED_DEPLIBS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o badblocks.profiled \
- $(PROFILED_BADBLOCKS_OBJS) $(PROFILED_LIBS) $(LIBINTL)
+ $(PROFILED_BADBLOCKS_OBJS) $(PROFILED_LIBS) $(LIBINTL) \
+ $(SYSLIBS)
logsave: logsave.o
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o logsave logsave.o
+ $(Q) $(CC) $(ALL_LDFLAGS) -o logsave logsave.o $(SYSLIBS)
logsave.profiled: logsave.o
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o logsave.profiled profiled/logsave.o
+ $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o logsave.profiled \
+ profiled/logsave.o $(SYSLIBS)
e2freefrag: $(E2FREEFRAG_OBJS)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o e2freefrag $(E2FREEFRAG_OBJS) $(LIBS)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o e2freefrag $(E2FREEFRAG_OBJS) \
+ $(LIBS) $(SYSLIBS)
e2freefrag.profiled: $(E2FREEFRAG_OBJS) $(PROFILED_DEPLIBS)
$(E) " LD $@"
$(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2freefrag.profiled \
- $(PROFILED_E2FREEFRAG_OBJS) $(PROFILED_LIBS)
+ $(PROFILED_E2FREEFRAG_OBJS) $(PROFILED_LIBS) $(SYSLIBS)
filefrag: $(FILEFRAG_OBJS)
$(E) " LD $@"
- $(Q) $(CC) $(ALL_LDFLAGS) -o filefrag $(FILEFRAG_OBJS)
+ $(Q) $(CC) $(ALL_LDFLAGS) -o filefrag $(FILEFRAG_OBJS) $(SYSLIBS)
filefrag.profiled: $(FILEFRAG_OBJS)
$(E) " LD $@"
tst_ismounted: $(srcdir)/ismounted.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR)
$(E) " LD $@"
$(CC) -o tst_ismounted $(srcdir)/ismounted.c -DDEBUG $(ALL_CFLAGS) \
- $(LIBCOM_ERR)
+ $(LIBCOM_ERR) $(SYSLIBS)
tune2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/tune2fs.8.in
$(E) " SUBST $@"
$(srcdir)/resource_track.c \
$(srcdir)/sim_progress.c
-LIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBINTL)
+LIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBINTL) $(SYSLIBS)
DEPLIBS= $(LIBE2P) $(LIBEXT2FS) $(DEPLIBCOM_ERR)
STATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
- $(LIBINTL)
+ $(LIBINTL) $(SYSLIBS)
DEPSTATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
.c.o:
SRCS= $(srcdir)/test_rel.c
-LIBS= $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR)
+LIBS= $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR) $(SYSLIBS)
DEPLIBS= $(LIBEXT2FS) $(DEPLIBSS) $(DEPLIBCOM_ERR)
.c.o: