aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpgtcl/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpgtcl/Makefile.in')
-rw-r--r--src/interfaces/libpgtcl/Makefile.in96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/interfaces/libpgtcl/Makefile.in b/src/interfaces/libpgtcl/Makefile.in
new file mode 100644
index 00000000000..3b0141def03
--- /dev/null
+++ b/src/interfaces/libpgtcl/Makefile.in
@@ -0,0 +1,96 @@
+#-------------------------------------------------------------------------
+#
+# 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.1 1998/01/13 04:18:04 scrappy Exp $
+#
+#-------------------------------------------------------------------------
+
+SRCDIR= ../..
+include $(SRCDIR)/Makefile.global
+
+INCLUDE_OPT= \
+ -I$(SRCDIR)/backend \
+ -I$(SRCDIR)/include \
+ -I$(LIBPQDIR) \
+ -I$(TCL_INCDIR)
+
+PORTNAME=@PORTNAME@
+
+CFLAGS+= $(INCLUDE_OPT)
+ifdef KRBVERS
+CFLAGS+= $(KRBFLAGS)
+endif
+
+# Shared library stuff
+
+install-shlib-dep :=
+shlib :=
+
+ifeq ($(PORTNAME), linux)
+ ifdef LINUX_ELF
+ install-shlib-dep := install-shlib
+ shlib := libpgtcl.so.1
+ CFLAGS += $(CFLAGS_SL)
+ LDFLAGS_SL = -shared -L $(SRCDIR)/interfaces/libpq -lpq
+ endif
+endif
+
+ifeq ($(PORTNAME), bsd)
+ install-shlib-dep := install-shlib
+ shlib := libpgtcl.so.1.0
+ LDFLAGS_SL = -x -Bshareable -Bforcearchive
+ CFLAGS += $(CFLAGS_SL)
+endif
+
+ifeq ($(PORTNAME), i386_solaris)
+ install-shlib-dep := install-shlib
+ shlib := libpgtcl.so.1
+ LDFLAGS_SL = -G -z text
+ CFLAGS += $(CFLAGS_SL)
+endif
+
+OBJS= pgtcl.o pgtclCmds.o pgtclId.o
+
+
+all: libpgtcl.a $(shlib)
+
+libpgtcl.a: $(OBJS)
+ifdef MK_NO_LORDER
+ $(AR) $(AROPT) libpgtcl.a $(OBJS)
+else
+ $(AR) $(AROPT) libpgtcl.a `lorder $(OBJS) | tsort`
+endif
+ $(RANLIB) libpgtcl.a
+
+$(shlib): $(OBJS)
+ $(LD) $(LDFLAGS_SL) -o $@ $(OBJS)
+ ln -sf $@ libpgtcl.so
+
+.PHONY: beforeinstall-headers install-headers
+.PHONY: install install-libpgtcl
+
+install: install-headers install-libpgtcl $(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
+
+install-libpgtcl: libpgtcl.a
+ $(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.a $(DESTDIR)$(LIBDIR)/libpgtcl.a
+
+install-shlib: $(shlib)
+ $(INSTALL) $(INSTL_LIB_OPTS) $(shlib) \
+ $(DESTDIR)$(LIBDIR)/$(shlib)
+ ln -sf $(shlib) $(DESTDIR)$(LIBDIR)/libpgtcl.so
+
+.PHONY: clean
+clean:
+ rm -f $(OBJS) $(shlib) libpgtcl.a libpgtcl.so