summaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/GNUmakefile.in
diff options
context:
space:
mode:
authorThomas G. Lockhart <lockhart@fourpalms.org>1998-10-06 05:58:41 +0000
committerThomas G. Lockhart <lockhart@fourpalms.org>1998-10-06 05:58:41 +0000
commit1eab86e26da7d6a18d8acc4c320d72b0df2527b7 (patch)
treeba44aa02a8eeda677e1f1ca4ae0425230881b1b8 /src/interfaces/odbc/GNUmakefile.in
parentdfde7f14f01a42eb77e356df97071c4cc5ff5efd (diff)
downloadpostgresql-1eab86e26da7d6a18d8acc4c320d72b0df2527b7.tar.gz
Update source code to Byron's v6.30.0250 sources plus minor cleanup
to get rid of unused variables. Get clean compile on Linux (Thomas and Gerald). Implement autoconf/configure for standalone builds and use the existing autoconf/configure system when in the Postgres source tree. Code tests and functions with ApplixWare-4.4.1beta on a Linux box. Changes should be backward compatible with WIN32 but still needs testing.
Diffstat (limited to 'src/interfaces/odbc/GNUmakefile.in')
-rw-r--r--src/interfaces/odbc/GNUmakefile.in127
1 files changed, 127 insertions, 0 deletions
diff --git a/src/interfaces/odbc/GNUmakefile.in b/src/interfaces/odbc/GNUmakefile.in
new file mode 100644
index 0000000000..8feee81ef4
--- /dev/null
+++ b/src/interfaces/odbc/GNUmakefile.in
@@ -0,0 +1,127 @@
+#-------------------------------------------------------------------------
+#
+# Makefile.inc--
+# Build and install postgres.
+#
+# Copyright (c) 1994, Regents of the University of California
+#
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile.in,v 1.1 1998/10/06 05:57:56 thomas Exp $
+#
+#-------------------------------------------------------------------------
+@SET_MAKE@
+
+NAME = psqlodbc
+SRCDIR=@srcdir@
+ODBCSRCDIR=@srcdir@
+include $(ODBCSRCDIR)/Makefile.global
+
+include Version.mk
+PORTNAME= @PORTNAME@
+
+FIND = @find@
+
+# assuming gnu tar and split here
+TAR = @tar@
+SPLIT = @split@
+
+ifeq ($(PORTNAME), linux)
+ install-shlib-dep := install-shlib
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LDFLAGS_SL = -shared -soname lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ LDFLAGS_SL += -Bsymbolic $(LDFLAGS) -lc -lm
+ CFLAGS += -I. $(CFLAGS_SL)
+endif
+
+ifeq ($(PORTNAME), bsd)
+ ifdef BSD_SHLIB
+ install-shlib-dep := install-shlib
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LDFLAGS_SL = -x -Bshareable -Bforcearchive $(LDFLAGS)
+ CFLAGS += -I. $(CFLAGS_SL)
+ endif
+endif
+
+SOURCES = *.c *.h *.in Config.mk Makefile Makefile.unx README.Linux \
+ TODO.txt Version.mk config.guess config.sub configure \
+ install-sh license.txt notice.txt odbcinst.ini patch \
+ psqlodbc.aps psqlodbc.def psqlodbc.mak psqlodbc.mdp \
+ psqlodbc.ncb psqlodbc.rc readme.txt
+
+OBJECTS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
+ environ.o execute.o lobj.o misc.o options.o \
+ pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o statement.o \
+ gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX)
+
+CFLAGS += @DEFS@
+
+all: libpsqlodbc.a $(shlib)
+
+libpsqlodbc.a: $(OBJECTS)
+ $(AR) $(AROPT) libpsqlodbc.a $(OBJS)
+ $(RANLIB) libpsqlodbc.a
+
+$(shlib): $(OBJECTS)
+ $(LD) $(LDFLAGS_SL) $(OBJECTS) \
+ -o $(shlib) $(LIBS)
+
+.PHONY: beforeinstall-headers
+
+.PHONY: install
+
+install: $(HEADERDIR) $(LIBDIR) $(ODBCINST) install-headers \
+ install-libpsqlodbc install-ini $(install-shlib-dep)
+
+$(HEADERDIR) $(LIBDIR) $(ODBCINST):
+ mkdir -p $@
+
+install-headers: beforeinstall-headers isql.h isqlext.h iodbc.h
+ $(INSTALL) $(INSTLOPTS) iodbc.h $(HEADERDIR)/iodbc/iodbc.h
+ $(INSTALL) $(INSTLOPTS) isql.h $(HEADERDIR)/iodbc/isql.h
+ $(INSTALL) $(INSTLOPTS) isqlext.h $(HEADERDIR)/iodbc/isqlext.h
+
+beforeinstall-headers:
+ @if [ ! -d $(HEADERDIR)/iodbc ]; then mkdir -p $(HEADERDIR)/iodbc; fi
+
+install-libpsqlodbc: libpsqlodbc.a
+ $(INSTALL) $(INSTL_LIB_OPTS) libpsqlodbc.a $(DESTDIR)$(LIBDIR)/lib$(NAME).a
+
+install-shlib: $(shlib)
+ $(INSTALL) $(INSTL_LIB_OPTS) $(shlib) $(DESTDIR)$(LIBDIR)/$(shlib)
+ rm -f $(DESTDIR)$(LIBDIR)/lib$(NAME)$(DLSUFFIX)
+ rm -f $(DESTDIR)$(LIBDIR)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ cd $(DESTDIR)$(LIBDIR) && $(LN_S) -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ cd $(DESTDIR)$(LIBDIR) && $(LN_S) -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) lib$(NAME)$(DLSUFFIX)
+
+install-ini: odbcinst.ini
+ $(INSTALL) $(INSTL_LIB_OPTS) odbcinst.ini $(ODBCINST)/odbcinst.ini
+
+depend dep:
+ $(CC) -MM *.c >depend
+
+.PHONY: clean
+
+clean:
+ -rm -f lib$(NAME).a $(shlib) $(OBJECTS) lib$(NAME)$(DLSUFFIX)
+ -rm -f config.log config.cache config.status
+
+.PHONY: distclean
+
+distclean: clean
+ -rm -f config.h GNUmakefile Makefile.global
+
+.PHONY: standalone
+
+standalone:
+ -rm -f psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar.gz
+ tar -cf psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar $(SOURCES)
+ tar -r -C ../.. -f psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar template
+ gzip psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar
+
+.PHONY: integrated
+
+integrated:
+ -rm -f psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION)-int.tar.gz
+ tar -cf psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION)-int.tar $(SOURCES)
+ gzip psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION)-int.tar