#-------------------------------------------------------------------------
#
# Makefile
#    Makefile for pgeasy library
#
# IDENTIFICATION
#    $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile.in,v 1.5 2000/01/10 15:41:28 momjian Exp $
#
#-------------------------------------------------------------------------

NAME= pgeasy
SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 1

SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global

CFLAGS+= -I$(LIBPQDIR)

ifdef KRBVERS
CFLAGS+= $(KRBFLAGS)
endif

OBJS= libpgeasy.o halt.o

SHLIB_LINK+= -L../libpq -lpq

SHLIB_LINK+= -L../libpq -lpq

# If crypt is a separate library, rather than part of libc, it may need
# to be referenced separately to keep (broken) linkers happy.  (This is
# braindead; users of libpq should not need to know what it depends on.)
SHLIB_LINK+= $(findstring -lcrypt,$(LIBS))

# Shared library stuff, also default 'all' target
include $(SRCDIR)/Makefile.shlib


.PHONY: install install-headers

install: install-headers install-lib $(install-shlib-dep)

install-headers: libpgeasy.h
	-@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
	$(INSTALL) $(INSTLOPTS) libpgeasy.h $(HEADERDIR)/libpgeasy.h

.PHONY: clean

clean: clean-shlib
	rm -f lib$(NAME).a $(OBJS)

depend dep:
	$(CC) -MM $(CFLAGS) *.c >depend

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