Skip to content

Commit

Permalink
re-add ar, add windows Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
evanbiederstedt committed Sep 30, 2020
1 parent 415c9a3 commit 866a43e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/n2/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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

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)
Expand Down
14 changes: 14 additions & 0 deletions src/n2/Makefile.win
Original file line number Diff line number Diff line change
@@ -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)


0 comments on commit 866a43e

Please sign in to comment.