-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile
65 lines (61 loc) · 1.11 KB
/
makefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
ifndef GO_LIB_PATH
GO_LIB_PATH=./pferret/lib/
endif
ifndef BIN
BIN=./bin/
endif
ifndef TAR
TAR=tar
endif
ifndef GO
GO=go
endif
ifndef GIT
GIT=git
endif
ifndef PYTHON
PYTHON=python
endif
ifndef GO_VERSION
GO_VERSION=1.16.3
endif
ifndef GO_ARCHITECTURE
GO_ARCHITECTURE=amd64
endif
ifndef GO_OS
GO_OS=linux
endif
ifndef GO_URL
GO_URL=https://golang.org/dl/go${GO_VERSION}.${GO_OS}-${GO_ARCHITECTURE}.tar.gz
endif
ifndef WGET
WGET=wget
endif
ifndef RM
RM=rm
endif
ifndef GO_INSTALLER
GO_INSTALLER=go-installer
endif
ifndef GO_COMPILER_PATH
GO_COMPILER_PATH=${BIN}go/bin/
endif
ifndef VERSION
VERSION=$(shell cat version)
endif
build:
$(go version)
go build -buildmode c-shared -o ${GO_LIB_PATH}libferret.so ${GO_LIB_PATH}
clean:
${RM} -rf
${RM} -rf ${BIN} dist pferret.egg-info dist build
deps: clean
$(info go-version: ${GO_VERSION})
$(info go-architecture: ${GO_ARCHITECTURE})
$(info go-os: ${GO_OS})
mkdir ${BIN}
${WGET} -P ${BIN} ${GO_URL} -O ${BIN}${GO_INSTALLER}
${TAR} -C ${BIN} -xzf ${BIN}${GO_INSTALLER}
${RM} ${BIN}${GO_INSTALLER}
publish-package:
$(PYTHON) setup.py bdist_wheel upload -r ferret