aboutsummaryrefslogtreecommitdiff
path: root/_example/mod_regexp/Makefile
blob: 97b1e0f365ff1b5afaea7374297efcbd44e0e4fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)