-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
executable file
·70 lines (50 loc) · 1.53 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
66
67
68
69
.NOTPARALLEL:
MAKEFLAGS += --no-builtin-rules --no-print-directory
define HELP
RedisEdge build operations
make edge # build RedisEdge (AI, Gears, TimeSereis)
JETSON=1 # build for
make vision # build RedisEdge with ML Python libraries
make pylibs # Build CPython with ML Python libraries
make build # build RedisEdge and RedisEdgeVision
make publish # Push Docker images for RedisEdge and RedisEdgeVision
endef
#----------------------------------------------------------------------------------------------
include versions
ifeq ($(VERSION),)
VERSION:=$(patsubst v%,%,$(shell git describe --tags `git rev-list --tags --max-count=1`))
endif
ifeq ($(VERSION),)
$(error Cannot determine version. Aborting.)
endif
all: build
edge:
@echo Building RedisEdge v$(VERSION) ...
@$(MAKE) -C edge
vision:
@echo Building RedisEdgeVision v$(VERSION) ...
@$(MAKE) -C vision
pylibs:
@echo Building RedisEdge Python Libraries v$(VERSION) ...
@$(MAKE) -C pylibs
build:
@$(MAKE) -C edge build
@$(MAKE) -C pylibs build
@$(MAKE) -C vision build
publish:
@$(MAKE) -C edge publish PUSH_GENERAL=1
@$(MAKE) -C pylibs publish PUSH_GENERAL=1
@$(MAKE) -C vision publish PUSH_GENERAL=1
.PHONY: all edge vision pylibs build publish help
#----------------------------------------------------------------------------------------------
ifneq ($(HELP),)
ifneq ($(filter help,$(MAKECMDGOALS)),)
HELPFILE:=$(shell mktemp /tmp/make.help.XXXX)
endif
endif
help:
$(file >$(HELPFILE),$(HELP))
@echo
@cat $(HELPFILE)
@echo
@-rm -f $(HELPFILE)