#
# Copyright 1999, TaBE Project, All Rights Reserved.
# Copyright 1999, Pai-Hsiang Hsiao, All Rights Reserved.
#
# $Id: Makefile.in,v 1.7 2001/12/04 15:05:16 thhsieh Exp $
#
CC              = @CC@
CFLAGS          = @CFLAGS@
CPPFLAGS        = @CPPFLAGS@
DEFS            = @DEFS@
RANLIB          = @RANLIB@
LN_S            = @LN_S@
LDFLAGS         = @with_db_lib@
INC             = -I../.. -I@x_includes@ @with_db_inc@
INSTALL         = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA    = @INSTALL_DATA@
@SET_MAKE@

program_prefix	= @program_prefix@
srcdir		= @srcdir@
top_srcdir	= @top_srcdir@
prefix		= $(program_prefix)@prefix@
exec_prefix	= @exec_prefix@
libdir		= @libdir@
bindir		= @bindir@
includedir	= @includedir@
LIBTOOL		= $(top_srcdir)/libtool

RELEASE_VER	= @RELEASE_VER@
CURRENT_VER	= @CURRENT_VER@
REVISION_VER	= @REVISION_VER@
AGE_VER		= @AGE_VER@

AR          = ar cr
RM          = rm -rf

LIBNAME     = libbims.la
INCLUDES    = bims.h
SRC         = bims.c
LIBOBJS     = bims.lo


all: $(LIBNAME)

$(LIBNAME): $(LIBOBJS)
	$(LIBTOOL) --mode=link $(CC) -o $@ $(LIBOBJS) -rpath $(libdir) \
		-version-info $(CURRENT_VER):$(REVISION_VER):$(AGE_VER)

bims.lo: bims.c bims.h
	$(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(DEFS) $(INC) -o $@ bims.c


.PHONY: clean distclean install
clean:
	$(RM) $(LIBOBJS) *.o core $(LIBNAME) .libs
distclean: clean
	if [ -d obj-s ]; then rmdir obj-s; fi
	$(RM) Makefile

install: all
	if [ ! -d $(libdir) ]; then $(INSTALL) -d $(libdir); fi
	if [ ! -d $(includedir) ]; then $(INSTALL) -d $(includedir); fi
	$(LIBTOOL) --mode=install $(INSTALL_DATA) $(LIBNAME) $(libdir)
	$(INSTALL_DATA) $(INCLUDES) $(includedir)
