forked from mirror/go-sqlite3
31 lines
501 B
Makefile
31 lines
501 B
Makefile
# Get Current Directory
|
|
CURDIR = $(shell pwd)
|
|
|
|
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
|
|
|
|
# Include source from repository
|
|
CFLAGS=-I$(CURDIR)/../../
|
|
|
|
all : $(EXT) $(EXE)
|
|
|
|
$(EXE) : extension.go
|
|
go build -v -a -tags=sqlite_vtable $<
|
|
|
|
$(EXT) : sqlite3_mod_vtable.cc
|
|
g++ $(LDFLAG) $(CFLAGS) -shared -o $@ $< $(LIBCURL)
|
|
|
|
clean :
|
|
@-$(RM) $(EXE) $(EXT)
|