#
# $Id: Makefile.in,v 1.9 2000/07/21 13:05:13 lha Exp $
#

SHELL	= /bin/sh

srcdir	= @srcdir@
VPATH	= @srcdir@

CC	= @CC@
AR	= ar
RANLIB	= @RANLIB@
INCLUDES = -I.					\
	   -I$(srcdir)				\
	   -I$(srcdir)/../mlog			\
	   -I$(srcdir)/../dpart			\
	   -I$(srcdir)/../voldb			\
	   -I$(srcdir)/../vstatus		\
	   -I$(srcdir)/../../../lib/bufdir	\
	   -I../vstatus				\
	   -I$(srcdir)/../../fs			\
	   -I$(srcdir)/../../..			\
	   -I../../../rxdef			\
	   -I../../../include			\
	   $(KRB4_INC_FLAGS)			\
	   -I$(srcdir)/../../include		\
	   -I$(srcdir)/../../../include

CFLAGS	= @CFLAGS@
KRB4_INC_FLAGS= @KRB4_INC_FLAGS@

INSTALL = @INSTALL@
INSTALL_DATA	= @INSTALL_DATA@
MKINSTALLDIRS = @top_srcdir@/mkinstalldirs

prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
sysconfdir = @sysconfdir@
ARLACACHEDIR = @ARLACACHEDIR@
ARLACONFFILE = @ARLACONFFILE@

#PICFLAGS = @PICFLAGS@
 
LIBNAME = $(LIBPREFIX)vld
#LIBEXT = @LIBEXT@
LIBEXT = a
#SHLIBEXT = @SHLIBEXT@
#LIBPREFIX = @LIBPREFIX@
LIBPREFIX = lib
#LDSHARED = @LDSHARED@
LIB = $(LIBNAME).$(LIBEXT)

DEFS	= @DEFS@

LIB_SOURCES = mnode.c vld.c mdir.c glue.c svol.c fvol.c common.c salvage.c debug.c

SOURCES = $(LIB_SOURCES)

LIB_OBJECTS = mnode.o vld.o mdir.o glue.o svol.o fvol.o common.o salvage.o debug.o

OBJECTS = $(LIB_OBJECTS) 

all: $(LIB)

Wall:
	make CFLAGS="-g -Wall -Wno-comment -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"

.c.o:
	$(CC) -c $(CPPFLAGS) $(DEFS) $(INCLUDES) $(CFLAGS) $(PICFLAGS) $<

install: all
	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(libdir)/$(LIB)

uninstall:
	rm -f $(DESTDIR)$(libdir)/$(LIB)

TAGS: $(SOURCES)
	etags $(SOURCES)

check:

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

mostlyclean: clean

distclean: clean
	rm -f Makefile *~

realclean: distclean
	rm -f TAGS

$(LIBNAME).a: $(LIB_OBJECTS)
	rm -f $@
	$(AR) cr $@ $(LIB_OBJECTS)
	-$(RANLIB) $@

#$(LIBNAME).$(SHLIBEXT): $(LIB_OBJECTS)
#	rm -f $@
#	$(LDSHARED) -o $@ $(LIB_OBJECTS)

$(OBJECTS): ../../../include/config.h

Makefile:	Makefile.in ../../../config.status
	cd ../../..; CONFIG_FILES=milko/lib/vld/Makefile CONFIG_HEADERS= $(SHELL) config.status


.PHONY: all install uninstall check clean mostlyclean distclean realclean
