VERSION=	0.4b34
DATE=		April 18, 2003

AR=		ar
CC=		gcc
INSTALL=	/bin/install -c
LD=		gcc
LN_S=		ln -s
MV=		/bin/mv
RANLIB=		ranlib
RM=		/bin/rm

BINOWNER=	root
BINGRP=		tty
BINMODE=	0755
MANOWNER=	man
MANGRP=		tty
MANMODE=	0644

INSTALLBIN=	$(INSTALL) -o $(BINOWNER) -g $(BINGRP) -m $(BINMODE)
INSTALLMAN=	$(INSTALL) -o $(MANOWNER) -g $(MANGRP) -m $(MANMODE)

prefix=		/
exec_prefix=	${prefix}
SBINDIR=	${exec_prefix}/sbin
MANDIR=		${prefix}/man/man8

DUMPDATESPATH=	${prefix}/etc/dumpdates
#
# Global include directories
#
GINC=		-I$(top_builddir) -I$(top_srcdir)/compat/include
# indicate where the ext2fs library can be found (this is not needed if you
# have run `make install-libs' in the e2fsprogs source directory).
#GINC+=		-I/usr/src/e2fsprogs-0.5c/lib

#
# Global libraries
#
# indicate where the ext2fs library can be found (this is not needed if you
# have run `make install-libs' in the e2fsprogs source directory).
#GLIBDIR=	-L/usr/src/e2fsprogs-0.5c/lib
GLIBS=		$(GLIBDIR) -L../compat/lib -lcompat -lext2fs -lcom_err

#
# Definitions (don't change them unless you know what you are doing)
#
DEFS=		-DRDUMP -DRRESTORE -D_BSD_SOURCE -D_USE_BSD_SIGNAL -DLINUX_FORK_BUG -DHAVE_LZO -D_PATH_DUMPDATES=\"$(DUMPDATESPATH)\" -D_DUMP_VERSION=\"$(VERSION)\"   

all::

#
# Autoconf magic
#

$(top_builddir)/config.status:	$(top_srcdir)/configure
	(cd $(top_builddir); ./config.status --recheck)

$(top_builddir)/MCONFIG:	$(top_srcdir)/MCONFIG.in \
				$(top_builddir)/config.status
	(cd $(top_builddir); ./config.status)

$(top_builddir)/config.h:	$(top_srcdir)/config.h.in \
				$(top_builddir)/config.status
	(cd $(top_builddir); ./config.status)

Makefile:			$(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
				$(top_builddir)/config.status
	(cd $(top_builddir); ./config.status)

$(top_srcdir)/configure:	$(top_srcdir)/configure.in
	cd $(top_srcdir) && autoconf

$(top_srcdir)/config.h.in:	$(top_srcdir)/configure.in
	cd $(top_srcdir) && autoheader

#
# Make depend magic
#

.depend:			Makefile $(SRCS) $(top_srcdir)/depfix.sed
	if test -n "$(SRCS)" ; then \
		$(CC) -M $(CFLAGS) $(SRCS) | \
			sed -f $(top_srcdir)/depfix.sed \
			    -e 's; $(srcdir)/; $$(srcdir)/;g' \
			    -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
			    -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
			    -e 's; \./; ;g' \
			    -e '/^ *\\$$/d' > .depend; \
	else :; fi

depend::			.depend
	if test -n "$(SRCS)" ; then \
		sed -e '/^# +++ Dependency line eater +++/,$$d' \
			< Makefile | cat - .depend \
			> Makefile.new; \
		$(MV) Makefile Makefile.old; \
		$(MV) Makefile.new Makefile; \
	else :; fi
