CC=		gcc
CFLAGS=		$(PROF) -g -O -Wall -I../lib
LDFLAGS=	$(PROF)
PROGS=		e2fsck flushb
MANPAGES=	e2fsck.8 mke2fs.8 mklost+found.8
BINDIR=		/etc
ETCDIR=		/etc
MANDIR=		/usr/man/man8

MK_CMDS=	../lib/ss/mk_cmds

LIBS= -L../lib -lss -lcom_err -lext2fs
DEPLIBS= ../lib/libss.a ../lib/libcom_err.a ../lib/libext2fs.a

#
# Flags for profiling --- uncomment to produce profiling e2fsck
#
#PROF=		-pg
#LIBS= -L../lib -lss -lcom_err_p -lext2fs_p 
#DEPLIBS= ../lib/libss.a ../lib/libcom_err_p.a ../lib/libext2fs_p.a

OBJS= e2fsck.o pass1.o pass1b.o pass2.o pass3.o pass4.o pass5.o \
	util.o dirmap.o

all: $(PROGS)

e2fsck: $(OBJS)  $(DEPLIBS)
	cc $(LDFLAGS) -o e2fsck $(OBJS) $(LIBS) 

flushb: flushb.o
	cc $(LDFLAGS) -o flushb flushb.o 

clean:
	rm -f $(PROGS) \#* *\# *.s *.o *.a *~ core

really-clean:
	rm -f .depend

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

include .depend
