summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq++/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq++/Makefile')
-rw-r--r--src/interfaces/libpq++/Makefile80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/interfaces/libpq++/Makefile b/src/interfaces/libpq++/Makefile
new file mode 100644
index 0000000000..44c008fb7c
--- /dev/null
+++ b/src/interfaces/libpq++/Makefile
@@ -0,0 +1,80 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for libpq++ library
+#
+# Copyright (c) 1994, Regents of the University of California
+#
+# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.22 2000/06/28 18:29:48 petere Exp $
+#
+#-------------------------------------------------------------------------
+
+subdir = src/interfaces/libpq++
+top_builddir = ../../..
+include ../../Makefile.global
+
+NAME= pq++
+SO_MAJOR_VERSION= 3
+SO_MINOR_VERSION= 1
+
+SRCHEADERDIR = $(top_srcdir)/src/include
+CXXFLAGS+= -I$(SRCHEADERDIR) -I$(LIBPQDIR)
+
+OBJS = pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o
+
+ifeq ($(PORTNAME), win)
+SHLIB_LINK+= --driver-name g++ $(LIBPQ)
+else
+SHLIB_LINK= $(LIBPQ)
+endif
+
+# For CC on IRIX, must use CC as linker/archiver of C++ libraries
+ifeq ($(PORTNAME), irix5)
+ ifeq ($(CXX), CC)
+ AR = CC
+ AROPT = -ar -o
+ LD = CC
+ endif
+endif
+
+all: all-lib
+
+# Shared library stuff
+include $(top_builddir)/src/Makefile.shlib
+
+# Pull shared-lib CFLAGS into CXXFLAGS
+CXXFLAGS+= $(CFLAGS_SL)
+
+
+.PHONY: examples
+examples:
+ $(MAKE) -C examples all
+
+install: all installdirs install-headers install-lib
+
+libpqxx_includedir = $(includedir)/libpq++
+MAINHEADER = libpq++.h
+LIBPGXXHEADERS = pgconnection.h pgdatabase.h pgtransdb.h pgcursordb.h pglobject.h
+
+.PHONY: install-headers
+install-headers: $(MAINHEADER) $(LIBPGXXHEADERS)
+ $(INSTALL_DATA) $< $(includedir)
+ for i in $(LIBPGXXHEADERS); do $(INSTALL_DATA) $(srcdir)/$$i $(libpqxx_includedir) || exit 1; done
+
+installdirs:
+ $(mkinstalldirs) $(libdir) $(includedir) $(libpqxx_includedir)
+
+uninstall: uninstall-lib
+ rm -f $(includedir)/$(MAINHEADER)
+ rm -rf $(libpqxx_includedir)
+
+clean distclean maintainer-clean: clean-lib
+ rm -f $(OBJS)
+ -$(MAKE) -C examples clean
+
+
+dep depend:
+ $(CXX) -MM $(CXXFLAGS) *.cc >depend
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif