mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 08:46:49 +02:00
added make install / uninstall directives (#85)
Co-authored-by: Tom Pollak <tompollak100@gmail.com>
This commit is contained in:
parent
b427669098
commit
e78b7f155c
1 changed files with 27 additions and 1 deletions
28
Makefile
28
Makefile
|
|
@ -3,6 +3,10 @@ COMMIT=$(shell git rev-parse HEAD)
|
||||||
VERSION=$(shell cat VERSION)
|
VERSION=$(shell cat VERSION)
|
||||||
DATE=$(shell date +'%FT%TZ%z')
|
DATE=$(shell date +'%FT%TZ%z')
|
||||||
|
|
||||||
|
INSTALL_LIB_DIR = /usr/local/lib
|
||||||
|
INSTALL_INCLUDE_DIR = /usr/local/include
|
||||||
|
INSTALL_BIN_DIR = /usr/local/bin
|
||||||
|
|
||||||
ifndef CC
|
ifndef CC
|
||||||
CC=gcc
|
CC=gcc
|
||||||
endif
|
endif
|
||||||
|
|
@ -174,7 +178,7 @@ evidence-of:
|
||||||
test:
|
test:
|
||||||
sqlite3 :memory: '.read test.sql'
|
sqlite3 :memory: '.read test.sql'
|
||||||
|
|
||||||
.PHONY: version loadable static test clean gh-release evidence-of
|
.PHONY: version loadable static test clean gh-release evidence-of install uninstall
|
||||||
|
|
||||||
publish-release:
|
publish-release:
|
||||||
./scripts/publish-release.sh
|
./scripts/publish-release.sh
|
||||||
|
|
@ -195,6 +199,28 @@ site-dev:
|
||||||
site-build:
|
site-build:
|
||||||
npm --prefix site run build
|
npm --prefix site run build
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -d $(INSTALL_LIB_DIR)
|
||||||
|
install -d $(INSTALL_INCLUDE_DIR)
|
||||||
|
install -m 644 sqlite-vec.h $(INSTALL_INCLUDE_DIR)
|
||||||
|
@if [ -f $(TARGET_LOADABLE) ]; then \
|
||||||
|
install -m 644 $(TARGET_LOADABLE) $(INSTALL_LIB_DIR); \
|
||||||
|
fi
|
||||||
|
@if [ -f $(TARGET_STATIC) ]; then \
|
||||||
|
install -m 644 $(TARGET_STATIC) $(INSTALL_LIB_DIR); \
|
||||||
|
fi
|
||||||
|
@if [ -f $(TARGET_CLI) ]; then \
|
||||||
|
sudo install -m 755 $(TARGET_CLI) $(INSTALL_BIN_DIR); \
|
||||||
|
fi
|
||||||
|
ldconfig
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f $(INSTALL_LIB_DIR)/$(notdir $(TARGET_LOADABLE))
|
||||||
|
rm -f $(INSTALL_LIB_DIR)/$(notdir $(TARGET_STATIC))
|
||||||
|
rm -f $(INSTALL_LIB_DIR)/$(notdir $(TARGET_CLI))
|
||||||
|
rm -f $(INSTALL_INCLUDE_DIR)/sqlite-vec.h
|
||||||
|
ldconfig
|
||||||
|
|
||||||
# ███████████████████████████████ WASM SECTION ███████████████████████████████
|
# ███████████████████████████████ WASM SECTION ███████████████████████████████
|
||||||
|
|
||||||
WASM_DIR=$(prefix)/.wasm
|
WASM_DIR=$(prefix)/.wasm
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue