#-------------------------------------------------------------------------
#
# Makefile
#    Makefile for libpgtcl library
#
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
#    $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.33 1998/10/19 00:00:41 tgl Exp $
#
#-------------------------------------------------------------------------

NAME= pgtcl
SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 0

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

CFLAGS+= -I$(SRCDIR)/backend \
         -I$(SRCDIR)/include \
         -I$(LIBPQDIR)

ifdef KRBVERS
CFLAGS+= $(KRBFLAGS)
endif

OBJS= pgtcl.o pgtclCmds.o pgtclId.o

SHLIB_LINK= -L../libpq -lpq

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


.PHONY: install beforeinstall-headers install-headers

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

install-headers: beforeinstall-headers libpgtcl.h
	$(INSTALL) $(INSTLOPTS) libpgtcl.h $(HEADERDIR)/libpgtcl.h

beforeinstall-headers:
	@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi


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

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

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