nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 44 lines 1.1 kB view raw
1diff --git a/Makefile b/Makefile 2index a705c11..08b952b 100644 3--- a/Makefile 4+++ b/Makefile 5@@ -13,11 +13,14 @@ OBJS = $(SRCS:.cc=.o) 6 MODULE_big = plv8-$(PLV8_VERSION) 7 EXTENSION = plv8 8 PLV8_DATA = plv8.control plv8--$(PLV8_VERSION).sql 9+USE_SYSTEM_V8 = 0 10 11 ifeq ($(OS),Windows_NT) 12 # noop for now 13 else 14+ ifeq ($(USE_SYSTEM_V8),0) 15 SHLIB_LINK += -Ldeps/v8-cmake/build 16+ endif 17 UNAME_S := $(shell uname -s) 18 ifeq ($(UNAME_S),Darwin) 19 CCFLAGS += -stdlib=libc++ 20@@ -34,6 +37,7 @@ ifeq ($(NUMPROC),0) 21 NUMPROC = 1 22 endif 23 24+ifeq ($(USE_SYSTEM_V8),0) 25 SHLIB_LINK += -Ldeps/v8-cmake/build 26 27 all: v8 $(OBJS) 28@@ -46,11 +50,16 @@ deps/v8-cmake/build/libv8_libbase.a: 29 @cd deps/v8-cmake && mkdir -p build && cd build && cmake -Denable-fPIC=ON -DCMAKE_BUILD_TYPE=Release ../ && make -j $(NUMPROC) 30 31 v8: deps/v8-cmake/build/libv8_libbase.a 32+else 33+all: $(OBJS) 34+endif 35 36 # enable direct jsonb conversion by default 37 CCFLAGS += -DJSONB_DIRECT_CONVERSION 38 39+ifeq ($(USE_SYSTEM_V8),0) 40 CCFLAGS += -Ideps/v8-cmake/v8/include -std=c++17 41+endif 42 43 ifdef EXECUTION_TIMEOUT 44 CCFLAGS += -DEXECUTION_TIMEOUT