go-sqlcipher/_example/mod_regexp/Makefile

28 lines
394 B
Makefile
Raw Permalink Normal View History

2013-08-30 17:28:02 +04:00
ifeq ($(OS),Windows_NT)
EXE=extension.exe
LIB_EXT=dll
2013-08-30 17:28:02 +04:00
RM=cmd /c del
LDFLAG=
else
EXE=extension
ifeq ($(shell uname -s),Darwin)
LIB_EXT=dylib
else
LIB_EXT=so
endif
RM=rm -f
2013-08-30 17:28:02 +04:00
LDFLAG=-fPIC
endif
LIB=sqlite3_mod_regexp.$(LIB_EXT)
2013-08-30 17:28:02 +04:00
all : $(EXE) $(LIB)
2013-08-30 17:28:02 +04:00
$(EXE) : extension.go
go build $<
$(LIB) : sqlite3_mod_regexp.c
2013-08-30 17:28:02 +04:00
gcc $(LDFLAG) -shared -o $@ $< -lsqlite3 -lpcre
clean :
@-$(RM) $(EXE) $(LIB)