File: Makefile

package info (click to toggle)
golang-github-mattn-go-sqlite3 1.14.19~ds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 780 kB
  • sloc: cpp: 1,132; ansic: 722; makefile: 60
file content (29 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
ifeq ($(OS),Windows_NT)
EXE=extension.exe
LIB_EXT=dll
RM=cmd /c del
LIBCURL=-lcurldll
LDFLAG=
else
EXE=extension
ifeq ($(shell uname -s),Darwin)
LIB_EXT=dylib
else
LIB_EXT=so
endif
RM=rm -f
LDFLAG=-fPIC
LIBCURL=-lcurl
endif
LIB=sqlite3_mod_vtable.$(LIB_EXT)

all : $(EXE) $(LIB)

$(EXE) : extension.go
	go build $<

$(LIB) : sqlite3_mod_vtable.cc
	g++ $(LDFLAG) -shared -o $@ $< -lsqlite3 $(LIBCURL)

clean :
	@-$(RM) $(EXE) $(LIB)