aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq++/examples/Makefile
blob: 1066d402255cf11dd4a4f850002a3c085c6159a4 (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
#
# Makefile for example programs
#

SRCDIR= ../..
include ../../Makefile.global

CXXFLAGS= $(CFLAGS)

INCLUDE_OPT= \
             -I.. \
             -I../../backend \
             -I../../include \
             -I$(LIBPQDIR) 

CXXFLAGS+= $(INCLUDE_OPT)

LD_ADD+= -L.. -lpq++ -L$(LIBPQDIR) -lpq 

#
# And where libpq goes, so goes the authentication stuff...
#
ifdef KRBVERS
LD_ADD+= $(KRBLIBS)
CXXFLAGS+= $(KRBFLAGS)
endif

PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 testlibpq4 testlo

all: submake $(PROGS)

$(PROGS): % : %.cc ../libpq++.a
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $@.cc $(LD_ADD)

.PHONY: submake
submake: 
	$(MAKE) -C.. libpq++.a

../libpq++.a:
	$(MAKE) -C.. libpq++.a

clean: 
	rm -f $(PROGS)