Fork github.com/mattn/go-sqlite3 with adjustment for go1.16.2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
432 B

  1. ifeq ($(OS),Windows_NT)
  2. EXE=extension.exe
  3. LIB_EXT=dll
  4. RM=cmd /c del
  5. LIBCURL=-lcurldll
  6. LDFLAG=
  7. else
  8. EXE=extension
  9. ifeq ($(shell uname -s),Darwin)
  10. LIB_EXT=dylib
  11. else
  12. LIB_EXT=so
  13. endif
  14. RM=rm -f
  15. LDFLAG=-fPIC
  16. LIBCURL=-lcurl
  17. endif
  18. LIB=sqlite3_mod_vtable.$(LIB_EXT)
  19. all : $(EXE) $(LIB)
  20. $(EXE) : extension.go
  21. go build $<
  22. $(LIB) : sqlite3_mod_vtable.cc
  23. g++ $(LDFLAG) -shared -o $@ $< -lsqlite3 $(LIBCURL)
  24. clean :
  25. @-$(RM) $(EXE) $(LIB)