forked from pipelinedb/pipelinedb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (51 loc) · 1.7 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
59
60
61
62
63
64
65
66
67
68
69
MODULE_big = pipelinedb
SOURCES = $(shell find src -type f -name '*.c' -not -path 'src/test/*')
OBJS = $(patsubst %.c,%.o,$(SOURCES))
PG_CONFIG := pg_config
EXTENSION = pipelinedb
REGRESS = $(EXTENSION)
DATA = $(shell find . -type f -name 'pipelinedb--*.sql')
EXTRA_CLEAN = src/test/regress/expected/$(REGRESS).out src/test/regress/sql/$(REGRESS).sql
SHLIB_LINK += /usr/lib/libzmq.a -lstdc++
ifdef USE_PGXS
PG_CPPFLAGS += -I./include -I$(shell $(PG_CONFIG) --includedir)
ifdef PIPELINE_VERSION_STR
PG_CPPFLAGS += -DPIPELINE_VERSION_STR=\"$(PIPELINE_VERSION_STR)\"
endif
ifdef PIPELINE_REVISION_STR
PG_CPPFLAGS += -DPIPELINE_REVISION_STR=\"$(PIPELINE_REVISION_STR)\"
endif
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
$(shell touch src/test/regress/sql/$(REGRESS).sql)
$(shell touch src/test/regress/expected/$(REGRESS).out)
bindir = $(shell $(PG_CONFIG) --bindir)
REGRESS_OPTS = --schedule=./src/test/regress/parallel_schedule \
--host=localhost \
--inputdir=./src/test/regress \
--outputdir=./src/test/regress \
--load-extension=pipelinedb \
--temp-config=./src/test/regress/pipelinedb.conf \
--bindir=$(bindir)
NO_GENERATED_HEADERS = 1
NO_PGXS = 1
NO_TEMP_INSTALL = 1
top_builddir = $(shell $(PG_CONFIG) --pkglibdir)/pgxs
include $(shell $(PG_CONFIG) --pkglibdir)/pgxs/src/Makefile.global
include $(shell $(PG_CONFIG) --pgxs)
endif
bin_dir = ./bin
headers_dir = $(shell $(PG_CONFIG) --includedir-server)/../pipelinedb
# Headers for other extensions to build against
install-headers:
$(MKDIR_P) $(headers_dir)
$(INSTALL_DATA) $(CURDIR)/include/*.h '$(headers_dir)'
install: install-headers
bootstrap:
$(bin_dir)/bootstrap
run:
$(bin_dir)/run-dev
test:
make check
make -C src/test/py test