blob: 58937c556ece07d7fe18871dcd371022b1c0b952 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
#-------------------------------------------------------------------------
#
# Makefile
# Makefile for libpq++ library
#
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.16 1999/07/08 03:30:16 momjian Exp $
#
#-------------------------------------------------------------------------
NAME= pq++
SO_MAJOR_VERSION= 3
SO_MINOR_VERSION= 0
SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
CXX=@CXX@
SRCHEADERDIR = $(SRCDIR)/include
LIBPQHEADERDIR = $(SRCHEADERDIR)/libpq
# We have to override -Werror, which makes warnings fatal, because we
# inevitably get the warning, "abstract declarator used as declaration"
# because of our inclusion of c.h and we don't know how to stop that.
ifeq ($(CXX), g++)
CXXFLAGS+= -Wno-error
endif
CXXFLAGS+= -I$(SRCDIR)/backend \
-I$(SRCHEADERDIR) \
-I$(LIBPQDIR)
#CXXFLAGS+= -DDEBUG
ifdef KRBVERS
CXXFLAGS+= $(KRBFLAGS)
endif
OBJS = pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o
ifeq ($(PORTNAME), win)
SHLIB_LINK+= --driver-name g++ -L../libpq -lpq
else
SHLIB_LINK= -L../libpq -lpq
endif
# Shared library stuff, also default 'all' target
include $(SRCDIR)/Makefile.shlib
# Pull shared-lib CFLAGS into CXXFLAGS
CXXFLAGS+= $(CFLAGS)
.PHONY: examples
examples:
$(MAKE) -C examples all
.PHONY: install beforeinstall-headers install-headers
install: install-headers install-lib $(install-shlib-dep)
LIBPGXXDIR = libpq++
LIBPGXXHEADERDIR = $(HEADERDIR)/$(LIBPGXXDIR)
MAINHEADER = libpq++.H
LIBPGXXHEADERS = pgconnection.h \
pgdatabase.h \
pgtransdb.h \
pgcursordb.h \
pglobject.h
install-headers: beforeinstall-headers $(MAINHEADER)
@$(INSTALL) $(INSTLOPTS) $(MAINHEADER) $(HEADERDIR)/$(MAINHEADER)
@for i in ${LIBPGXXHEADERS}; do \
echo "Installing $(LIBPGXXHEADERDIR)/$$i."; \
$(INSTALL) $(INSTLOPTS) $$i $(LIBPGXXHEADERDIR)/$$i; \
done
beforeinstall-headers:
@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
@if [ ! -d $(LIBPGXXHEADERDIR) ]; then mkdir $(LIBPGXXHEADERDIR); fi
.PHONY: clean
clean: clean-shlib
rm -f libpq++.a $(OBJS)
$(MAKE) -C examples clean
dep depend:
$(CXX) -MM $(CXXFLAGS) *.cc >depend
ifeq (depend,$(wildcard depend))
include depend
endif
|