From 75ef7d6c6725e92c335f7821327d6ffab87ade31 Mon Sep 17 00:00:00 2001 From: mattn Date: Fri, 30 Aug 2013 22:28:02 +0900 Subject: [PATCH] Add Makefile --- _example/extension/Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 _example/extension/Makefile diff --git a/_example/extension/Makefile b/_example/extension/Makefile new file mode 100644 index 0000000..97b1e0f --- /dev/null +++ b/_example/extension/Makefile @@ -0,0 +1,22 @@ +ifeq ($(OS),Windows_NT) +EXE=extension.exe +EXT=sqlite3_mod_regexp.dll +RM=cmd /c del +LDFLAG= +else +EXE=extension +EXT=sqlite3_mod_regexp.so +RM=rm +LDFLAG=-fPIC +endif + +all : $(EXE) $(EXT) + +$(EXE) : extension.go + go build $< + +$(EXT) : sqlite3_mod_regexp.c + gcc $(LDFLAG) -shared -o $@ $< -lsqlite3 -lpcre + +clean : + @-$(RM) $(EXE) $(EXT)