-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
85 lines (64 loc) · 2.35 KB
/
Makefile
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
##############################################################################
#
# Firebird Foreign Data Wrapper for PostgreSQL
#
# Copyright (c) 2013-2023 Ian Barwick
#
# This software is released under the PostgreSQL Licence
#
# Author: Ian Barwick <[email protected]>
#
# IDENTIFICATION
# firebird_fdw/Makefile
#
##############################################################################
EXTENSION = firebird_fdw
EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
MODULE_big = $(EXTENSION)
OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
FIREBIRD_FDW_DEBUG_BUILD ?= 0
ifneq ($(FIREBIRD_FDW_DEBUG_BUILD),0)
PG_CPPFLAGS += -DFIREBIRD_FDW_DEBUG_BUILD
endif
+PG_CPPFLAGS += -Werror-missing-prototypes
SHLIB_LINK += -lfq -lfbclient
DATA = sql/firebird_fdw--0.3.0.sql \
sql/firebird_fdw--0.3.0--0.4.0.sql \
sql/firebird_fdw--0.4.0.sql \
sql/firebird_fdw--0.4.0--0.5.0.sql \
sql/firebird_fdw--0.5.0.sql \
sql/firebird_fdw--0.5.0--1.0.0.sql \
sql/firebird_fdw--1.0.0.sql \
sql/firebird_fdw--1.0.0--1.1.0.sql \
sql/firebird_fdw--1.1.0.sql \
sql/firebird_fdw--1.1.0--1.2.0.sql \
sql/firebird_fdw--1.2.0.sql \
sql/firebird_fdw--1.2.0--1.3.0.sql \
sql/firebird_fdw--1.3.0.sql \
sql/firebird_fdw--1.3.0--1.4.0.sql \
sql/firebird_fdw--1.4.0.sql \
sql/firebird_fdw--1.4.0--1.5.0.sql \
sql/firebird_fdw--1.5.0.sql
ifndef PG_CONFIG
PG_CONFIG = pg_config
endif
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
# Sanity-check supported version
ifeq (,$(findstring $(MAJORVERSION),10 11 12 13 14 15 16 17))
$(error firebird_fdw supports PostgreSQL 10 and later)
endif
$(info Building against PostgreSQL $(MAJORVERSION))
# Fix for OS X and libfq
ifeq (-dead_strip_dylibs, $(findstring -dead_strip_dylibs, $(shell $(PG_CONFIG) --ldflags)))
LDFLAGS := $(subst -dead_strip_dylibs,-flat_namespace,$(LDFLAGS))
endif
PG_PROVE_FLAGS += -I $(srcdir)/t
$(OBJS): src/firebird_fdw.h
prove_installcheck: all
rm -rf $(srcdir)/tmp_check/log
cd $(srcdir) && PG_VERSION_NUM='$(VERSION_NUM)' TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
installcheck: prove_installcheck
clean: local_clean
local_clean:
rm -rf tmp_check/