forked from awslabs/pgbouncer-fast-switchover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.diff
55 lines (50 loc) · 1.66 KB
/
Makefile.diff
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
diff --git a/Makefile b/Makefile
index 00773da..981e06a 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,9 @@ pgbouncer_SOURCES = \
src/server.c \
src/stats.c \
src/system.c \
+ src/pycall.c \
+ src/route_connection.c \
+ src/rewrite_query.c \
src/takeover.c \
src/util.c \
src/varcache.c \
@@ -47,6 +50,9 @@ pgbouncer_SOURCES = \
include/server.h \
include/stats.h \
include/system.h \
+ include/pycall.h \
+ include/route_connection.h \
+ include/rewrite_query.h \
include/takeover.h \
include/util.h \
include/varcache.h \
@@ -59,7 +65,8 @@ pgbouncer_SOURCES = \
include/common/unicode_norm.h \
include/common/unicode_norm_table.h
-pgbouncer_CPPFLAGS = -Iinclude $(CARES_CFLAGS) $(LIBEVENT_CFLAGS) $(TLS_CPPFLAGS)
+python_CPPFLAGS = -I/usr/include/python3.9 -I/usr/include/python3.9
+pgbouncer_CPPFLAGS = -Iinclude $(CARES_CFLAGS) $(LIBEVENT_CFLAGS) $(TLS_CPPFLAGS) $(python_CPPFLAGS)
# include libusual sources directly
AM_FEATURES = libusual
@@ -71,6 +78,8 @@ dist_doc_DATA = README.md NEWS.md \
etc/pgbouncer.ini \
etc/pgbouncer.service \
etc/pgbouncer.socket \
+ etc/userlist.txt \
+ etc/pgbouncer.ini \
etc/userlist.txt
DISTCLEANFILES = config.mak config.status lib/usual/config.h config.log
@@ -98,8 +107,10 @@ LIBUSUAL_DIST = $(filter-out %/config.h, $(sort $(wildcard \
lib/README lib/COPYRIGHT \
lib/find_modules.sh )))
+python_LDFLAGS = -lpthread -ldl -lutil -lm -lpython3.9 -Xlinker -export-dynamic
pgbouncer_LDFLAGS := $(TLS_LDFLAGS)
-pgbouncer_LDADD := $(CARES_LIBS) $(LIBEVENT_LIBS) $(TLS_LIBS) $(LIBS)
+pgbouncer_LDADD := $(CARES_LIBS) $(LIBEVENT_LIBS) $(TLS_LIBS) $(LIBS) $(python_LDFLAGS)
+
LIBS :=
#