File: Makefile

package info (click to toggle)
icingadb 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 40,272 kB
  • sloc: ansic: 155,865; asm: 5,498; sql: 3,497; sh: 1,406; cpp: 1,132; makefile: 357; xml: 160
file content (27 lines) | stat: -rw-r--r-- 394 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
ifeq ($(OS),Windows_NT)
EXE=extension.exe
LIB_EXT=dll
RM=cmd /c del
LDFLAG=
else
EXE=extension
ifeq ($(shell uname -s),Darwin)
LIB_EXT=dylib
else
LIB_EXT=so
endif
RM=rm -f
LDFLAG=-fPIC
endif
LIB=sqlite3_mod_regexp.$(LIB_EXT)

all : $(EXE) $(LIB)

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

$(LIB) : sqlite3_mod_regexp.c
	gcc $(LDFLAG) -shared -o $@ $< -lsqlite3 -lpcre

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