summarylogtreecommitdiffstats
path: root/unbundle-vendor-deps.patch
blob: f9999b96777679bcc221c8e3947bc27a43a307d0 (plain)
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
--- a/Makefile
+++ b/Makefile
@@ -19,16 +19,18 @@
 SONAME = lib$(TARGET).so.$(SOVERSION)
 SOLIB = $(SONAME).$(LIB_VERSION_MINOR).$(LIB_VERSION_PATCH)

-SRC_FILES := $(wildcard src/*.c src/postgres/*.c) vendor/protobuf-c/protobuf-c.c vendor/xxhash/xxhash.c protobuf/pg_query.pb-c.c
+SRC_FILES := $(wildcard src/*.c src/postgres/*.c) protobuf/pg_query.pb-c.c
 NOT_OBJ_FILES := src/pg_query_enum_defs.o src/pg_query_fingerprint_defs.o src/pg_query_fingerprint_conds.o src/pg_query_outfuncs_defs.o src/pg_query_outfuncs_conds.o src/pg_query_readfuncs_defs.o src/pg_query_readfuncs_conds.o src/postgres/guc-file.o src/postgres/scan.o src/pg_query_json_helper.o
 OBJ_FILES := $(filter-out $(NOT_OBJ_FILES), $(SRC_FILES:.c=.o))

-override CFLAGS += -g -I. -I./vendor -I./src/postgres/include -Wall -Wno-unused-function -Wno-unused-value -Wno-unused-variable -fno-strict-aliasing -fwrapv -fPIC
+LIBS = -lxxhash -lprotobuf-c
+
+override CFLAGS += -g -I. -I./src/postgres/include -Wall -Wno-unused-function -Wno-unused-value -Wno-unused-variable -fno-strict-aliasing -fwrapv -fPIC

 override PG_CONFIGURE_FLAGS += -q --without-readline --without-zlib

-override TEST_CFLAGS += -I. -I./vendor -g
-override TEST_LDFLAGS += -pthread
+override TEST_CFLAGS += -I. -g
+override TEST_LDFLAGS += -pthread $(LIBS)

 CFLAGS_OPT_LEVEL = -O3
 ifeq ($(DEBUG),1)
--- a/src/pg_query_fingerprint.c
+++ b/src/pg_query_fingerprint.c
@@ -7,7 +7,7 @@
 #include "pg_query_fingerprint.h"

 #include "postgres.h"
-#include "xxhash/xxhash.h"
+#include <xxhash.h>
 #include "lib/ilist.h"

 #include "parser/parser.h"