head	1.15;
access;
symbols
	REL9_0_0:1.15
	REL9_1_ALPHA1:1.15
	REL9_0_RC1:1.15
	REL9_0_BETA4:1.15
	REL9_0_STABLE:1.15.0.6
	REL9_0_BETA3:1.15
	REL9_0_BETA2:1.15
	REL7_4_29:1.13
	REL8_0_25:1.13.6.1
	REL8_1_21:1.14
	REL8_2_17:1.14
	REL8_3_11:1.14
	REL8_4_4:1.14
	REL9_0_BETA1:1.15
	REL9_0_ALPHA5_BRANCH:1.15.0.4
	REL9_0_ALPHA5:1.15
	REL7_4_28:1.13
	REL8_0_24:1.13.6.1
	REL8_1_20:1.14
	REL8_2_16:1.14
	REL8_3_10:1.14
	REL8_4_3:1.14
	REL9_0_ALPHA4:1.15
	REL9_0_ALPHA4_BRANCH:1.15.0.2
	REL8_5_ALPHA3:1.14
	REL8_5_ALPHA3_BRANCH:1.14.0.14
	REL7_4_27:1.13
	REL8_0_23:1.13.6.1
	REL8_1_19:1.14
	REL8_2_15:1.14
	REL8_3_9:1.14
	REL8_4_2:1.14
	REL8_5_ALPHA2:1.14
	REL8_5_ALPHA2_BRANCH:1.14.0.12
	REL7_4_26:1.13
	REL8_0_22:1.13.6.1
	REL8_1_18:1.14
	REL8_2_14:1.14
	REL8_3_8:1.14
	REL8_4_1:1.14
	REL8_5_ALPHA1:1.14
	REL8_5_ALPHA1_BRANCH:1.14.0.10
	REL8_4_STABLE:1.14.0.8
	REL8_4_0:1.14
	REL8_4_RC2:1.14
	REL8_4_RC1:1.14
	REL8_4_BETA2:1.14
	REL8_4_BETA1:1.14
	REL7_4_25:1.13
	REL8_0_21:1.13.6.1
	REL8_1_17:1.14
	REL8_2_13:1.14
	REL8_3_7:1.14
	REL7_4_24:1.13
	REL8_0_20:1.13.6.1
	REL8_1_16:1.14
	REL8_2_12:1.14
	REL8_3_6:1.14
	REL7_4_23:1.13
	REL8_0_19:1.13.6.1
	REL8_1_15:1.14
	REL8_2_11:1.14
	REL8_3_5:1.14
	REL7_4_22:1.13
	REL8_0_18:1.13.6.1
	REL8_1_14:1.14
	REL8_2_10:1.14
	REL8_3_4:1.14
	REL7_4_21:1.13
	REL8_0_17:1.13.6.1
	REL8_1_13:1.14
	REL8_2_9:1.14
	REL8_3_3:1.14
	REL7_4_20:1.13
	REL8_0_16:1.13.6.1
	REL8_1_12:1.14
	REL8_2_8:1.14
	REL8_3_2:1.14
	REL8_2_7:1.14
	REL8_3_1:1.14
	REL8_3_STABLE:1.14.0.6
	REL8_3_0:1.14
	REL8_3_RC2:1.14
	REL7_3_21:1.11
	REL7_4_19:1.13
	REL8_0_15:1.13.6.1
	REL8_1_11:1.14
	REL8_2_6:1.14
	REL8_3_RC1:1.14
	REL8_3_BETA4:1.14
	REL8_3_BETA3:1.14
	REL8_3_BETA2:1.14
	REL8_3_BETA1:1.14
	REL7_3_20:1.11
	REL7_4_18:1.13
	REL8_0_14:1.13.6.1
	REL8_1_10:1.14
	REL8_2_5:1.14
	REL7_3_19:1.11
	REL7_4_17:1.13
	REL8_0_13:1.13.6.1
	REL8_1_9:1.14
	REL8_2_4:1.14
	REL8_0_12:1.13.6.1
	REL8_1_8:1.14
	REL8_2_3:1.14
	REL7_3_18:1.11
	REL7_4_16:1.13
	REL8_0_11:1.13.6.1
	REL8_1_7:1.14
	REL8_2_2:1.14
	REL8_0_10:1.13.6.1
	REL8_1_6:1.14
	REL8_2_1:1.14
	REL7_4_15:1.13
	REL7_3_17:1.11
	REL8_2_STABLE:1.14.0.4
	REL8_2_0:1.14
	REL8_2_RC1:1.14
	REL8_2_BETA3:1.14
	REL8_2_BETA2:1.14
	REL8_1_5:1.14
	REL8_0_9:1.13.6.1
	REL7_4_14:1.13
	REL7_3_16:1.11
	REL8_2_BETA1:1.14
	REL7_3_15:1.11
	REL7_4_13:1.13
	REL8_0_8:1.13.6.1
	REL8_1_4:1.14
	REL7_3_14:1.11
	REL7_4_12:1.13
	REL8_0_7:1.13.6.1
	REL8_1_3:1.14
	REL7_3_13:1.11
	REL7_4_11:1.13
	REL8_0_6:1.13.6.1
	REL8_1_2:1.14
	REL7_3_12:1.11
	REL7_4_10:1.13
	REL8_0_5:1.13.6.1
	REL8_1_1:1.14
	REL8_1_STABLE:1.14.0.2
	REL8_1_0:1.14
	REL8_1_0RC1:1.14
	REL8_1_0BETA4:1.14
	REL8_1_0BETA3:1.14
	REL7_3_11:1.11
	REL7_4_9:1.13
	REL8_0_4:1.13.6.1
	REL8_1_0BETA2:1.14
	REL8_1_0BETA1:1.14
	REL7_2_8:1.11
	REL7_3_10:1.11
	REL7_4_8:1.13
	REL8_0_3:1.13.6.1
	REL8_0_2:1.13.6.1
	REL7_2_7:1.11
	REL7_3_9:1.11
	REL7_4_7:1.13
	REL8_0_1:1.13
	REL8_0_STABLE:1.13.0.6
	REL8_0_0:1.13.0.4
	REL8_0_0RC5:1.13
	REL8_0_0RC4:1.13
	REL8_0_0RC3:1.13
	REL8_0_0RC2:1.13
	REL8_0_0RC1:1.13
	REL8_0_0BETA5:1.13
	REL8_0_0BETA4:1.13
	REL7_4_6:1.13
	REL7_3_8:1.11
	REL7_2_6:1.11
	REL8_0_0BETA3:1.13
	REL8_0_0BETA2:1.13
	REL7_2_5:1.11
	REL7_4_5:1.13
	REL7_3_7:1.11
	REL7_4_4:1.13
	REL8_0_0BETA1:1.13
	REL7_4_3:1.13
	REL7_4_2:1.13
	REL7_3_6:1.11
	REL7_4_1:1.13
	REL7_3_5:1.11
	REL7_4:1.13
	REL7_4_RC2:1.13
	REL7_4_STABLE:1.13.0.2
	REL7_4_RC1:1.13
	REL7_4_BETA5:1.13
	REL7_4_BETA4:1.13
	REL7_4_BETA3:1.12
	REL7_4_BETA2:1.12
	WIN32_DEV:1.12.0.2
	REL7_4_BETA1:1.12
	REL7_3_4:1.11
	REL7_3_2:1.11
	REL7_2_4:1.11
	REL7_3_STABLE:1.11.0.6
	REL7_2_3:1.11
	REL7_2_STABLE:1.11.0.4
	REL7_2:1.11
	REL7_2_RC2:1.11
	REL7_2_RC1:1.11
	REL7_2_BETA5:1.11
	REL7_2_BETA4:1.11
	REL7_2_BETA3:1.11
	REL7_2_BETA2:1.11
	REL7_2_BETA1:1.11
	REL7_1_2:1.11
	REL7_1_STABLE:1.11.0.2
	REL7_1_BETA:1.10
	REL7_1_BETA3:1.10
	REL7_1_BETA2:1.10
	REL7_1:1.11
	REL7_0_PATCHES:1.6.0.6
	REL7_0:1.6
	REL6_5_PATCHES:1.6.0.4
	REL6_5:1.6
	REL6_4:1.6.0.2
	release-6-3:1.6
	REL2_0B:1.4.0.2
	REL2_0:1.4
	Release_2_0_0:1.1.1.1
	Release_1_0_3:1.1.1.1.0.2
	Release_2_0:1.1.1.1
	Release_1_0_2:1.1.1.1
	PG95-1_01:1.1.1.1
	PG95_DIST:1.1.1;
locks; strict;
comment	@# @;


1.15
date	2009.12.31.00.16.47;	author adunstan;	state Exp;
branches;
next	1.14;

1.14
date	2005.03.25.18.17.14;	author momjian;	state Exp;
branches;
next	1.13;

1.13
date	2003.09.20.21.14.57;	author tgl;	state Exp;
branches
	1.13.6.1;
next	1.12;

1.12
date	2003.06.22.00.29.29;	author tgl;	state Exp;
branches;
next	1.11;

1.11
date	2001.02.20.19.20.30;	author petere;	state Exp;
branches;
next	1.10;

1.10
date	2000.10.24.00.04.11;	author tgl;	state Exp;
branches;
next	1.9;

1.9
date	2000.10.20.21.04.21;	author petere;	state Exp;
branches;
next	1.8;

1.8
date	2000.08.31.16.12.24;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	2000.06.17.00.10.31;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	97.09.25.16.35.42;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	97.04.04.10.43.16;	author scrappy;	state Exp;
branches;
next	1.4;

1.4
date	96.11.13.10.36.09;	author bryanh;	state Exp;
branches;
next	1.3;

1.3
date	96.11.12.11.43.00;	author bryanh;	state Exp;
branches;
next	1.2;

1.2
date	96.11.04.05.15.07;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	96.07.09.06.22.23;	author scrappy;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.07.09.06.22.23;	author scrappy;	state Exp;
branches;
next	;

1.13.6.1
date	2005.03.25.18.18.41;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.15
log
@enable examples to compile on Windows. patch from Hiroshi Saito.
@
text
@#
# Makefile for example programs
#

subdir = src/test/examples
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global

ifeq ($(PORTNAME), win32)
LDLIBS += -lws2_32
endif

override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
override LDLIBS := $(libpq_pgport) $(LDLIBS)


PROGS = testlibpq testlibpq2 testlibpq3 testlibpq4 testlo

all: $(PROGS)

clean: 
	rm -f $(PROGS)
@


1.14
log
@Have libpgport link before libpq so that PG client applications are more
immunte to changes in libpq's usage of pgport between major versions.
@
text
@d9 4
@


1.13
log
@Attaching -lpq to LDFLAGS doesn't work, because the generated command
puts that before the .c file name.
@
text
@d10 1
a10 1
override LDLIBS := $(libpq) -lpgport $(LDLIBS)
@


1.13.6.1
log
@Have libpgport link before libpq so that PG client applications are more
immunte to changes in libpq's usage of pgport between major versions.

Backpatch to 8.0.X.
@
text
@d10 1
a10 1
override LDLIBS := $(libpq_pgport) $(LDLIBS)
@


1.12
log
@Bring the libpq example programs into the 21st century.
@
text
@d10 1
a10 1
LDFLAGS += $(libpq)
@


1.11
log
@Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
@
text
@d10 1
a10 1
LIBS += $(libpq)
a12 1
# PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 testlibpq4 testlo
@


1.10
log
@Remove testlo2.c --- there seems to be no difference between this and
testlo.c, except it's even skimpier on error checking :-(
@
text
@d9 1
a9 1
override CPPFLAGS+= -I$(libpq_srcdir)
@


1.9
log
@Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
@
text
@d14 1
a14 1
PROGS = testlibpq testlibpq2 testlibpq3 testlibpq4 testlo testlo2
@


1.8
log
@Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
@
text
@d9 2
a10 3
CPPFLAGS+= -I$(libpq_srcdir)

LDFLAGS+= $(libpq)
a16 3

$(PROGS): % : %.c 
	$(CC) $(CFLAGS) -o $@@ $@@.c $(LDFLAGS)
@


1.7
log
@Remove fmgrstamp-h business -- not needed and confusing

Add options to configure to automatically build for Kerberos
support; no more editing of make files.
@
text
@d5 3
a7 2
SRCDIR= ../..
include ../../Makefile.global
d9 1
a9 1
CFLAGS+= -I$(LIBPQDIR)
d11 1
a11 1
LDFLAGS+= -L$(LIBPQDIR) -lpq 
@


1.6
log
@Massive examples fix from Nicola Bernardelli
@
text
@a11 7
#
# And where libpq goes, so goes the authentication stuff...
#
ifdef KRBVERS
LDFLAGS+= $(KRBLIBS)
CFLAGS+= $(KRBFLAGS)
endif
@


1.5
log
@This commit represents a clean compile with the new templates under
FreeBSD

The Makefile(s) have all been cleaned up such that there is a single
LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE.  The Makefile(s)
should be alot more straightforward then they were before...and
consistent
@
text
@d20 2
a21 1
PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 testlibpq4 testlo
@


1.4
log
@Eliminate MKDIR, srcdir, objdir.  Centralize setting of LIBPQDIR.
@
text
@d10 1
a10 1
LD_ADD+= -L$(LIBPQDIR) -lpq 
d16 1
a16 1
LD_ADD+= $(KRBLIBS)
d25 1
a25 1
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@@ $@@.c $(LD_ADD)
@


1.3
log
@End of the make file simplifications.
@
text
@a5 1
LIBPQDIR= $(SRCDIR)/libpq
@


1.2
log
@Rename CDEBUG to COPT
@
text
@d5 3
a7 2
MKDIR=	../../mk
include $(MKDIR)/postgres.mk
d9 1
a9 1
CFLAGS+= -I$(HEADERDIR) -I$(srcdir)/backend -I$(srcdir)/backend/include
d11 1
a11 3
LIBPQ:=  -L$(LIBDIR) -lpq

LD_ADD+=$(LIBPQ)
d21 1
a21 50
P1_PROG:= testlibpq
P1_OBJS:= testlibpq.o

$(P1_PROG):  $(addprefix $(objdir)/,$(P1_OBJS))
	$(CC) $(CFLAGS) -o $(objdir)/$(@@F) $< $(LD_ADD)

P2_PROG:= testlibpq2
P2_OBJS:= testlibpq2.o

$(P2_PROG):  $(addprefix $(objdir)/,$(P2_OBJS))
	$(CC) $(CFLAGS) -o $(objdir)/$(@@F) $< $(LD_ADD)


P3_PROG:= testlibpq3
P3_OBJS:= testlibpq3.o

$(P3_PROG):  $(addprefix $(objdir)/,$(P3_OBJS))
	$(CC) $(CFLAGS) -o $(objdir)/$(@@F) $< $(LD_ADD)

P4_PROG:= testlo
P4_OBJS:= testlo.o

$(P4_PROG):  $(addprefix $(objdir)/,$(P4_OBJS))
	$(CC) $(CFLAGS) -o $(objdir)/$(@@F) $< $(LD_ADD)

OBJS:= $(P1_OBJS) $(P2_OBJS) $(P3_OBJS) $(P4_OBJS)
PROGS:= $(P1_PROG) $(P2_PROG) $(P3_PROG) $(P4_PROG)

CLEANFILES+= $(OBJS) $(PROGS)

all:: $(PROGS)

install:: $(PROGS)
	@@for i in ${PROGS}; do \
		echo "Installing $$i"; \
		$(INSTALL) $(objdir)/$$i $(DESTDIR)$(BINDIR)/$$i;\
	done
	












d23 1
d25 2
d28 2
@


1.1
log
@Initial revision
@
text
@d26 1
a26 1
	$(CC) $(CDEBUG) -o $(objdir)/$(@@F) $< $(LD_ADD)
d32 1
a32 1
	$(CC) $(CDEBUG) -o $(objdir)/$(@@F) $< $(LD_ADD)
d39 1
a39 1
	$(CC) $(CDEBUG) -o $(objdir)/$(@@F) $< $(LD_ADD)
d45 1
a45 1
	$(CC) $(CDEBUG) -o $(objdir)/$(@@F) $< $(LD_ADD)
@


1.1.1.1
log
@Postgres95 1.01 Distribution - Virgin Sources
@
text
@@
