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.

27 lines
394 B

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