Create Makefile
This commit is contained in:
parent
40e248789e
commit
45a4845507
22
src/github.com/mattn/go-sqlite3/_example/mod_regexp/Makefile
Normal file
22
src/github.com/mattn/go-sqlite3/_example/mod_regexp/Makefile
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user