aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/Makefile
blob: c88f43896c107958304b2138c9fb2858c0aad889 (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
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.53 2006/02/08 09:10:05 meskes Exp $

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

override CPPFLAGS := -I$(srcdir)/../include -I$(libpq_srcdir) $(CPPFLAGS)
override CFLAGS += $(PTHREAD_CFLAGS)

ECPG = ../preproc/ecpg -I$(srcdir)/../include

TESTS = test1 test2 test3 test4 test5 perftest dyntest dyntest2 test_notice \
	test_code100 test_init testdynalloc num_test dt_test test_informix \
	test_informix2 test_desc test_func
ifeq ($(enable_thread_safety), yes)
TESTS += test_thread test_thread_implicit
endif

all: $(TESTS)

%: %.o
	$(CC) $(CFLAGS) $(LDFLAGS) -L../ecpglib -L ../pgtypeslib -L../../libpq $^ $(LIBS) -lpgtypes -lecpg -lpq $(PTHREAD_LIBS) -o $@

test_informix: test_informix.o
	$(CC) $(CFLAGS) $(LDFLAGS) -L../compatlib -L../ecpglib -L ../pgtypeslib -L../../libpq $^ $(LIBS) -lpgtypes -lecpg -lecpg_compat -lpq $(PTHREAD_LIBS) -o $@

test_informix2: test_informix2.o
	$(CC) $(CFLAGS) $(LDFLAGS) -L../compatlib -L../ecpglib -L ../pgtypeslib -L../../libpq $^ $(LIBS) -lpgtypes -lecpg -lecpg_compat -lpq $(PTHREAD_LIBS) -o $@
	
test4: test4.o
	$(CC) $(CFLAGS) $(LDFLAGS) -L../ecpglib -L ../pgtypeslib -L../../libpq $^ $(LIBS) -lpgtypes -lecpg -lpq $(PTHREAD_LIBS) -o $@

%.c: %.pgc
	$(ECPG) -o $@ -I$(srcdir) $<

test_informix.c: test_informix.pgc
	$(ECPG) -o $@ -C INFORMIX -r no_indicator $<

test_informix2.c: test_informix2.pgc
	$(ECPG) -o $@ -C INFORMIX  $<

test4.c: test4.pgc
	$(ECPG) -o $@ -c  $<

clean:
	rm -f $(TESTS) $(TESTS:%=%.o) $(TESTS:%=%.c) log