VPATH = ../bin
vpath %.c $(REISERFS_KERNEL_SOURCE) $(REISERFS_LIB)

# kernel files needed for resizer
#KERNEL_C = prints.c
#KERNEL_OBJS = prints.o

# files from utils's lib directory needed for resizer
LIB_C = misc.c io.c
# version.c io.c reiserfs.c
LIB_OBJS = misc.o io.o
#version.o io.o reiserfs.o


RESIZER_OBJS = resize_reiserfs.o fe.o do_shrink.o bitmap.o $(LIB_OBJS) $(KERNEL_OBJS)

RESIZER = $(TMPBINDIR)/resize_reiserfs

all: $(RESIZER)

.c.o:
	$(CC) $(CFLAGS) -Wall -g $<

$(RESIZER): $(RESIZER_OBJS)
	$(CC) $(LFLAGS) -o $(RESIZER) $(RESIZER_OBJS)

clean:
	rm -f *.o $(RESIZER) *~

dep:
	gcc -MM $(IDIRS) *.c > .depend

install: all
	cp -f $(RESIZER) $(SBIN)

uninstall:
	rm -f $(SBIN)/resize_reiserfs


ifeq (.depend,$(wildcard .depend))
include .depend
endif









