go-sqlite3/_examples/mod_vtable/Makefile

31 lines
504 B
Makefile
Raw Normal View History

2018-06-15 18:53:32 +03:00
# 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
2018-06-15 18:53:32 +03:00
# Include source from repository
CFLAGS=-I$(CURDIR)/../../driver
2018-06-15 18:53:32 +03:00
all : $(EXT) $(EXE)
$(EXE) : extension.go
go build -v -tags=sqlite_vtable $<
$(EXT) : sqlite3_mod_vtable.cc
2018-06-15 18:53:32 +03:00
g++ $(LDFLAG) $(CFLAGS) -shared -o $@ $< $(LIBCURL)
clean :
@-$(RM) $(EXE) $(EXT)