diff --git a/src/Makevars b/src/Makevars index 6519547..b085935 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,7 +1,7 @@ PKG_CXXFLAGS= -I"../inst/include" -I"./n2/include" $(SHLIB_OPENMP_CXXFLAGS) -PKG_LIBS=-L/usr/lib/ -L"." -lpthread -lstdc++ -ln2 -lm `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS) +PKG_LIBS = -L/usr/lib/ -L"." -lpthread -lstdc++ -ln2 -lm `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS) CXX_STD = CXX11 MkInclude = $(R_HOME)/etc${R_ARCH}/Makeconf diff --git a/src/n2/Makefile b/src/n2/Makefile index eaf3cd9..8c0e4ed 100644 --- a/src/n2/Makefile +++ b/src/n2/Makefile @@ -1,5 +1,5 @@ CXX ?= g++ -PKG_CXXFLAGS = -O3 -std=c++11 -pthread -fPIC $(SHLIB_OPENMP_CXXFLAGS) +PKG_CXXFLAGS = -O3 -std=c++11 -pthread -fPIC -I"./include" $(SHLIB_OPENMP_CXXFLAGS) PKG_CXXFLAGS += -I"./include" LDFLAGS += -lpthread @@ -7,7 +7,7 @@ LIB = ../libn2.a lib: $(LIB) $(LIB): base.o hnsw.o hnsw_node.o distance.o heuristic.o mmap.o - + ar rvs $@ $? clean: @-rm -f *.o $(LIB) diff --git a/src/n2/Makefile.win b/src/n2/Makefile.win new file mode 100644 index 0000000..a408810 --- /dev/null +++ b/src/n2/Makefile.win @@ -0,0 +1,14 @@ +CXX ?= g++ +PKG_CXXFLAGS = -O3 -std=c++11 -pthread -fPIC -I"./include" $(SHLIB_OPENMP_CXXFLAGS) +PKG_CXXFLAGS += -I"./include" +LDFLAGS += -lpthread + +LIB = ../libn2.a +lib: $(LIB) + +$(LIB): base.o hnsw.o hnsw_node.o distance.o heuristic.o mmap.o + +clean: + @-rm -f *.o $(LIB) + +