| 1 |
# This file is included into the Makefiles of subdirectories of ecpg/test/, |
| 2 |
# so the file references have one more level of .. than you might expect. |
| 3 |
|
| 4 |
override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include \ |
| 5 |
-I$(libpq_srcdir) $(CPPFLAGS) |
| 6 |
override CFLAGS += $(PTHREAD_CFLAGS) $(PERMIT_MISSING_VARIABLE_DECLARATIONS) |
| 7 |
|
| 8 |
LDFLAGS_INTERNAL += -L../../ecpglib -lecpg -L../../pgtypeslib -lpgtypes $(libpq) |
| 9 |
|
| 10 |
override LIBS += $(PTHREAD_LIBS) |
| 11 |
|
| 12 |
# Standard way to invoke the ecpg preprocessor |
| 13 |
ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include -I$(srcdir) |
| 14 |
|
| 15 |
# Files that most or all ecpg preprocessor test outputs depend on |
| 16 |
ECPG_TEST_DEPENDENCIES = ../../preproc/ecpg$(X) \ |
| 17 |
$(srcdir)/../regression.h \ |
| 18 |
$(srcdir)/../printf_hack.h \ |
| 19 |
$(srcdir)/../../include/sqlca.h \ |
| 20 |
$(srcdir)/../../include/sqlda.h \ |
| 21 |
$(srcdir)/../../include/sqltypes.h \ |
| 22 |
$(srcdir)/../../include/sql3types.h |
| 23 |
|
| 24 |
# Caution: this build rule is overridden in some child Makefiles |
| 25 |
# where it's necessary to use nondefault switches to ecpg; |
| 26 |
# make sure those rules match except for the extra switches. |
| 27 |
%.c: %.pgc $(ECPG_TEST_DEPENDENCIES) |
| 28 |
$(ECPG) -o $@ $< |
| 29 |
|
| 30 |
clean: |
| 31 |
rm -f $(TESTS) $(TESTS:%=%.o) $(TESTS:%=%.c) |