-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
31 lines (26 loc) · 936 Bytes
/
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
EXTENSION = ocgeo_fdw
EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
MODULE_big = ocgeo_fdw
OBJS = ocgeo_fdw.o ocgeo_api.o sds.o cJSON.o utils.o
# RELEASE = 1.0.0
DATA = $(wildcard sql/*--*.sql)
DOCS = $(wildcard doc/*.md)
TESTS = $(wildcard test/sql/*.sql)
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test
CURL_CONFIG = curl-config
PG_CONFIG = pg_config
CFLAGS += $(shell $(CURL_CONFIG) --cflags)
LIBS += $(shell $(CURL_CONFIG) --libs)
SHLIB_LINK := $(LIBS)
ifdef DEBUG
COPT += -O0 -DDEBUG -g
endif
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
ifndef MAJORVERSION
MAJORVERSION := $(basename $(VERSION))
endif
ifeq (,$(findstring $(MAJORVERSION), 9.6 10 11 12 13 14))
$(error PostgreSQL 9.6, 10, 11, 12, 13, or 14 is required to compile this extension)
endif