# Makefile for the second extended file system programs
#
# Copyright (C) 1992, 1993 Remy Card (card@masi.ibp.fr)
#
# This file can be redistributed under the terms of the GNU General
# Public License

LDFLAGS:=	$(LDFLAGS) -L../lib
LDLIBS:=	$(LDLIBS) -le2p

SPROGS=		dirdump e2fsck mke2fs mklost+found tune2fs# convertefs
UPROGS=		chattr lsattr
EPROGS=		mksuper testfs
PROGS=		$(SPROGS) $(UPROGS) $(EPROGS)

all:		$(PROGS)

e2fsck:		badblocks1.o cache.o e2fsck.o inode.o lpf.o rdwr.o \
		tables1.o truncate.o

mke2fs:		badblocks2.o countblocks.o mke2fs.o tables2.o

clean:
	rm -f $(PROGS) *.o core

realclean clobber spotless:	clean
	rm -f *~ .depend

install:	$(PROGS)
	cp $(SPROGS) $(SBINDIR)
	ln -sf mke2fs $(SBINDIR)/mkfs.ext2
	ln -sf e2fsck $(SBINDIR)/fsck.ext2
	cp $(UPROGS) $(UBINDIR)

dep depend .depend:
	rm -f .depend
	$(CPP) -M *.c >.depend

include .depend
