mirror of
https://github.com/facebookresearch/faiss.git
synced 2025-06-03 21:54:02 +08:00
32 lines
645 B
Makefile
32 lines
645 B
Makefile
|
MAKEFILE_INC=../makefile.inc
|
||
|
|
||
|
-include $(MAKEFILE_INC)
|
||
|
|
||
|
CC_TESTS = test_ivfpq_indexing test_ivfpq_codec
|
||
|
|
||
|
all: $(CC_TESTS) ../py
|
||
|
|
||
|
run: all
|
||
|
./run_tests.sh
|
||
|
|
||
|
%: %.cpp ../libfaiss.a gtest/make/gtest_main.a
|
||
|
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(BLASLDFLAGS) \
|
||
|
-Igtest/include -I../..
|
||
|
|
||
|
../libfaiss.a:
|
||
|
cd ../ && make libfaiss.a
|
||
|
|
||
|
../py:
|
||
|
cd ../ && make py
|
||
|
|
||
|
gtest/make/gtest_main.a: gtest
|
||
|
cd gtest/make && make CXX=$(CC) gtest_main.a
|
||
|
|
||
|
gtest:
|
||
|
curl -L https://github.com/google/googletest/archive/release-1.8.0.tar.gz | tar xz && \
|
||
|
mv googletest-release-1.8.0/googletest gtest && \
|
||
|
rm -rf googletest-release-1.8.0
|
||
|
|
||
|
clean:
|
||
|
rm -rf $(CC_TESTS) gtest
|