diff --git a/src/github.com/mattn/go-sqlite3/_example/mod_vtable/Makefile b/src/github.com/mattn/go-sqlite3/_example/mod_vtable/Makefile new file mode 100644 index 0000000..cdd4853 --- /dev/null +++ b/src/github.com/mattn/go-sqlite3/_example/mod_vtable/Makefile @@ -0,0 +1,24 @@ +ifeq ($(OS),Windows_NT) +EXE=extension.exe +EXT=sqlite3_mod_vtable.dll +RM=cmd /c del +LIBCURL=-lcurldll +LDFLAG= +else +EXE=extension +EXT=sqlite3_mod_vtable.so +RM=rm +LDFLAG=-fPIC +LIBCURL=-lcurl +endif + +all : $(EXE) $(EXT) + +$(EXE) : extension.go + go build $< + +$(EXT) : sqlite3_mod_vtable.cc + g++ $(LDFLAG) -shared -o $@ $< -lsqlite3 $(LIBCURL) + +clean : + @-$(RM) $(EXE) $(EXT)