-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
58 lines (48 loc) · 1.33 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
#
# dblink_plus: Makefile
#
# Copyright (c) 2011-2024, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
#
MODULE_big = dblink_plus
DATA_built = dblink_plus.sql dblink_plus--1.0.9.sql
DATA = uninstall_dblink_plus.sql
OBJS = dblink.o dblink_postgres.o
EXTENSION = dblink_plus
REGRESS = init postgres
PG_CPPFLAGS = -I$(libpq_srcdir)
SHLIB_LINK = $(libpq)
EXTRA_CLEAN = gmon.out
ifneq ($(MYSQL),0)
OBJS += dblink_mysql.o
REGRESS += mysql
PG_CPPFLAGS += -DENABLE_MYSQL
SHLIB_LINK += -lmysqlclient
endif
ifneq ($(ORACLE),0)
OBJS += dblink_oracle.o
REGRESS += oracle
PG_CPPFLAGS += -DENABLE_ORACLE
PG_CPPFLAGS += -I$(ORACLE_HOME)/oci/include/ # win32
PG_CPPFLAGS += -I$(ORACLE_HOME)/rdbms/public # linux
PG_CPPFLAGS += -I$(ORACLE_INCLUDE)/ # linux with oracle client only
endif
ifneq ($(SQLITE3),0)
OBJS += dblink_sqlite3.o
REGRESS += sqlite3
PG_CPPFLAGS += -DENABLE_SQLITE3
SHLIB_LINK += -lsqlite3
endif
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
ifneq ($(ORACLE),0)
ifeq ($(PORTNAME),win32)
SHLIB_LINK += -L$(ORACLE_HOME)/lib -loci
else
SHLIB_LINK += -L$(ORACLE_HOME)/lib -lclntsh
endif
endif
dblink_plus--1.0.9.sql:
head -n -2 dblink_plus.sql.in | tail -n +4 > dblink_plus--1.0.9.sql
standbycheck: all
$(pg_regress_installcheck) --schedule=standby_schedule --use-existing --dbname=contrib_regression --port=$(PGPORT)