-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
50 lines (35 loc) · 1022 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
EXTENSION = plexor
EXT_VERSION = 2.3
MODULE_big = $(EXTENSION)
# sql
PLEXOR_SQL = sql/plexor_lang.sql
EXT_SQL = sql/$(EXTENSION)--$(EXT_VERSION).sql
INCLUDES = src/plexor.h
SRCS = src/plexor.c \
src/fdw_validator.c \
src/cluster.c \
src/connection.c \
src/type.c \
src/function.c \
src/result.c \
src/transaction.c \
src/parser.c \
src/execute.c \
src/query.c
OBJS = $(SRCS:.c=.o)
EXTRA_CLEAN =
PQINCSERVER = $(shell $(PG_CONFIG) --includedir-server)
PQINC = $(shell $(PG_CONFIG) --includedir)
PQLIB = $(shell $(PG_CONFIG) --libdir)
DATA_built = $(EXT_SQL)
SHLIB_LINK = -L$(PQLIB) -lpq
#PG_CPPFLAGS = -std=c89
PG_CPPFLAGS += -I$(PQINC)
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
sql/plexor.sql: $(PLEXOR_SQL)
cat $^ > $@
sql/$(EXTENSION)--$(EXT_VERSION).sql: $(PLEXOR_SQL)
cat $^ > $@
$(OBJS): $(INCLUDES)