-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
32 lines (22 loc) · 874 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
32
PG_CFLAGS = -std=c11 -Werror -Wno-declaration-after-statement
EXTENSION = pg_net
EXTVERSION = 0.14.0
DATA = $(wildcard sql/*--*.sql)
TESTS = $(wildcard test/sql/*.sql)
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --use-existing --inputdir=test
MODULE_big = $(EXTENSION)
SRC = $(wildcard src/*.c)
OBJS = $(patsubst src/%.c, src/%.o, $(SRC))
all: sql/$(EXTENSION)--$(EXTVERSION).sql $(EXTENSION).control
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
cp $< $@
$(EXTENSION).control:
sed "s/@PG_NET_VERSION@/$(EXTVERSION)/g" $(EXTENSION).control.in > $(EXTENSION).control
EXTRA_CLEAN = sql/$(EXTENSION)--$(EXTVERSION).sql $(EXTENSION).control
PG_CONFIG = pg_config
SHLIB_LINK = -lcurl
# Find <curl/curl.h> from system headers
PG_CPPFLAGS := $(CPPFLAGS) -DEXTVERSION=\"$(EXTVERSION)\"
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)