mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 08:24:05 +00:00
add DisallowSqliteAttach feature
This commit is contained in:
parent
613ab5bbc8
commit
9bb06afc57
10 changed files with 275 additions and 1 deletions
34
extensions/Makefile
Normal file
34
extensions/Makefile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
.PHONY: all headers
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
OUTPUT = lib/noattach.dll
|
||||
CCFLAGS = -shared
|
||||
else
|
||||
UNAME := $(shell uname)
|
||||
CCFLAGS = -fPIC -Os -shared
|
||||
ifeq ($(UNAME),Darwin)
|
||||
ifeq ($(shell uname -m),arm64)
|
||||
OUTPUT = lib/arm/noattach.dylib
|
||||
else
|
||||
OUTPUT = lib/noattach.dylib
|
||||
endif
|
||||
else
|
||||
ifeq ($(shell uname -m),aarch64)
|
||||
OUTPUT = lib/arm/noattach.so
|
||||
else
|
||||
OUTPUT = lib/noattach.so
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
all: $(OUTPUT)
|
||||
|
||||
headers:
|
||||
# To simplify compilation across platforms, we include sqlite3ext.h in this directory.
|
||||
curl -L https://www.sqlite.org/2024/sqlite-amalgamation-3470200.zip -o sqlite-src.zip
|
||||
unzip sqlite-src.zip
|
||||
cp sqlite-amalgamation-3470200/*.h .
|
||||
|
||||
$(OUTPUT): noattach.c
|
||||
# We don't link against libsqlite3 since PHP statically links its own libsqlite3.
|
||||
$(CC) $(CCFLAGS) -o $@ $<
|
||||
Loading…
Add table
Add a link
Reference in a new issue