-
Notifications
You must be signed in to change notification settings - Fork 102
/
Makefile
54 lines (40 loc) · 1.67 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
#*------------------------------------------------------------------
#
# Foreign data wrapper for TDS (Sybase and Microsoft SQL Server)
#
# Author: Geoff Montee
# Name: tds_fdw
# File: tds_fdw/Makefile
#
# Description:
# This is a PostgreSQL foreign data wrapper for use to connect to databases that use TDS,
# such as Sybase databases and Microsoft SQL server.
#
# This foreign data wrapper requires a library that uses the DB-Library interface,
# such as FreeTDS (http://www.freetds.org/). This has been tested with FreeTDS, but not
# the proprietary implementations of DB-Library.
#----------------------------------------------------------------------------
EXTENSION = tds_fdw
MODULE_big = $(EXTENSION)
OBJS = src/tds_fdw.o src/options.o src/deparse.o
EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\\([^']*\\)'/\\1/")
# no tests yet
# TESTS = $(wildcard test/sql/*.sql)
# REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
# REGRESS_OPTS = --inputdir=test
DOCS = README.${EXTENSION}.md
DATA = tds_fdw--2.0.1--2.0.2.sql tds_fdw--2.0.2--2.0.3.sql tds_fdw--2.0.3--2.0.4.sql sql/$(EXTENSION)--$(EXTVERSION).sql
PG_CONFIG = pg_config
# modify these variables to point to FreeTDS, if needed
SHLIB_LINK := -lsybdb
TDS_INCLUDE :=
PG_CPPFLAGS := -I./include/ -fvisibility=hidden ${TDS_INCLUDE}
# PG_LIBS :=
all: sql/$(EXTENSION)--$(EXTVERSION).sql README.${EXTENSION}.md
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
cp $< $@
README.${EXTENSION}.md: README.md
cp $< $@
EXTRA_CLEAN = sql/$(EXTENSION)--$(EXTVERSION).sql README.${EXTENSION}.md
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)