@@ -13,8 +13,9 @@ DEBUGFLAG=-DNDEBUG # no debugging
1313LIBNAME =libfaiss
1414CLIBNAME =libfaiss_c
1515LIBCOBJ =error_impl.o Index_c.o IndexFlat_c.o Clustering_c.o AutoTune_c.o \
16- AuxIndexStructures_c.o IndexIVF_c.o IndexIVFFlat_c.o IndexLSH_c.o \
17- index_io_c.o MetaIndexes_c.o IndexShards_c.o
16+ impl/AuxIndexStructures_c.o IndexIVF_c.o IndexIVFFlat_c.o IndexLSH_c.o \
17+ index_io_c.o MetaIndexes_c.o IndexShards_c.o index_factory_c.o \
18+ clone_index_c.o
1819CFLAGS =-fPIC -m64 -Wno-sign-compare -g -O3 -Wall -Wextra
1920
2021# Build static and shared object files by default
@@ -42,38 +43,44 @@ clean:
4243
4344# Dependencies
4445
45- error_impl.o : CXXFLAGS += -I.. $(DEBUGFLAG )
46+ error_impl.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
4647error_impl.o : error_impl.cpp error_c.h error_impl.h macros_impl.h
4748
48- index_io_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
49+ index_io_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
4950index_io_c.o : index_io_c.cpp error_impl.cpp ../index_io.h macros_impl.h
5051
51- Index_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
52+ index_factory_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
53+ index_factory_c.o : index_factory_c.cpp error_impl.cpp ../index_io.h macros_impl.h
54+
55+ clone_index_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
56+ clone_index_c.o : index_factory_c.cpp error_impl.cpp ../index_io.h macros_impl.h
57+
58+ Index_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
5259Index_c.o : Index_c.cpp Index_c.h ../Index.h macros_impl.h
5360
54- IndexFlat_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
61+ IndexFlat_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
5562IndexFlat_c.o : IndexFlat_c.cpp IndexFlat_c.h ../IndexFlat.h macros_impl.h
5663
57- IndexIVF_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
64+ IndexIVF_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
5865IndexIVF_c.o : IndexIVF_c.cpp IndexIVF_c.h ../IndexIVF.h macros_impl.h
5966
60- IndexIVFFlat_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
67+ IndexIVFFlat_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
6168IndexIVFFlat_c.o : IndexIVFFlat_c.cpp IndexIVFFlat_c.h ../IndexIVFFlat.h macros_impl.h
6269
63- IndexLSH_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
70+ IndexLSH_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
6471IndexLSH_c.o : IndexLSH_c.cpp IndexLSH_c.h ../IndexLSH.h macros_impl.h
6572
66- IndexShards_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
73+ IndexShards_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
6774IndexShards_c.o : IndexShards_c.cpp IndexShards_c.h ../Index.h ../IndexShards.h macros_impl.h
6875
69- Clustering_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
76+ Clustering_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
7077Clustering_c.o : Clustering_c.cpp Clustering_c.h ../Clustering.h macros_impl.h
7178
72- AutoTune_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
79+ AutoTune_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
7380AutoTune_c.o : AutoTune_c.cpp AutoTune_c.h ../AutoTune.h macros_impl.h
7481
75- AuxIndexStructures_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
76- AuxIndexStructures_c.o : AuxIndexStructures_c.cpp AuxIndexStructures_c.h ../AuxIndexStructures.h macros_impl.h
82+ impl/ AuxIndexStructures_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
83+ impl/ AuxIndexStructures_c.o : impl/ AuxIndexStructures_c.cpp impl/ AuxIndexStructures_c.h ../impl /AuxIndexStructures.h macros_impl.h
7784
78- MetaIndexes_c.o : CXXFLAGS += -I.. $(DEBUGFLAG )
85+ MetaIndexes_c.o : CXXFLAGS += -I.. -I ../impl $(DEBUGFLAG )
7986MetaIndexes_c.o : MetaIndexes_c.cpp MetaIndexes_c.h ../MetaIndexes.h macros_impl.h
0 commit comments