mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-06 14:01:31 +08:00
38 lines
1.3 KiB
Makefile
38 lines
1.3 KiB
Makefile
EXTENSION = vector
|
|
EXTVERSION = 0.1.2
|
|
|
|
DATA = sql/vector--0.1.1.sql sql/vector--0.1.0--0.1.1.sql
|
|
MODULE_big = vector
|
|
OBJS = src/ivfbuild.o src/ivfflat.o src/ivfinsert.o src/ivfkmeans.o src/ivfscan.o src/ivfutils.o src/ivfvacuum.o src/vector.o
|
|
|
|
TESTS = $(wildcard test/sql/*.sql)
|
|
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
|
|
REGRESS_OPTS = --inputdir=test
|
|
|
|
OPTFLAGS = -march=native
|
|
|
|
# For auto-vectorization:
|
|
# - GCC (needs -ftree-vectorize OR -O3) - https://gcc.gnu.org/projects/tree-ssa/vectorization.html
|
|
# - Clang (could use pragma instead) - https://llvm.org/docs/Vectorizers.html
|
|
PG_CFLAGS = $(OPTFLAGS) -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math
|
|
|
|
# Debug GCC auto-vectorization
|
|
# PG_CFLAGS += -fopt-info-vec
|
|
|
|
# Debug Clang auto-vectorization
|
|
# PG_CFLAGS += -Rpass=loop-vectorize -Rpass-analysis=loop-vectorize
|
|
|
|
PG_CONFIG ?= pg_config
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
|
include $(PGXS)
|
|
|
|
prove_installcheck:
|
|
rm -rf $(CURDIR)/tmp_check
|
|
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),test/t/*.pl)
|
|
|
|
.PHONY: dist
|
|
|
|
dist:
|
|
mkdir -p dist
|
|
git archive --format zip --prefix=$(EXTENSION)-$(EXTVERSION)/ --output dist/$(EXTENSION)-$(EXTVERSION).zip master
|