-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
33 lines (26 loc) · 969 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
33
EXTENSION = $(shell jq -r '.name' META.json)
EXTVERSION = $(shell jq -r '.version' META.json)
MODULE_big = $(EXTENSION)
OBJS = \
$(WIN32RES) \
$(patsubst %.c,%.o,$(wildcard src/*.c)) \
$(patsubst %.c,%.o,$(wildcard src/*/*.c))
DATA = $(wildcard *--*.sql)
DOCS = $(wildcard docs/*.md)
TESTS = $(sort $(wildcard test/sql/*.sql))
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test
PG_CFLAGS := -std=c11 -Wno-declaration-after-statement -Werror-implicit-function-declaration
ifneq ($(TARGET),release)
PG_CFLAGS := $(PG_CFLAGS) -DDEBUG -DUSE_ASSERT_CHECKING -O0
endif
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
override with_llvm=no
include $(PGXS)
image:
docker build --target $(EXTENSION) -t $(EXTENSION) .
demo-image:
docker build --target $(EXTENSION)_demo -t $(EXTENSION)_demo .
package:
git archive --format zip --prefix=$(EXTENSION)-$(EXTVERSION)/ -o $(EXTENSION)-$(EXTVERSION).zip --worktree-attributes HEAD