forked from cradlepoint/sdk-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (56 loc) · 2 KB
/
Makefile
File metadata and controls
72 lines (56 loc) · 2 KB
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
70
71
72
#
# Router SDK Makefile
#
# Run 'make help' for info on the supported make targets.
#
SDK_ROOT := $(shell pwd)
include $(SDK_ROOT)/config/settings.mk
BUILD_DATE = "$(shell date)"
BUILD := .build
.PHONY: help clean status install start stop uninstall purge
default: package
clean: build-clean package-clean
build: $(BUILD)
$(BUILD): $(APP_SRC) $(TOOLS_SRC)
touch $@
build-clean:
rm -f $(BUILD)
package: $(VENV_INSTALL) $(APP_ARCHIVE)
$(APP_ARCHIVE): $(APP_SRC)
$(TOOLS)/bin/package_application.py $(APP_DIR)
package-clean:
rm -f $(APP_ARCHIVE)
rm -rf $(APP_DIR)/METADATA
status: $(VENV_INSTALL)
curl -s --digest --insecure -u $(DEV_CLIENT_ADMIN):$(DEV_CLIENT_PASSWORD) \
-H "Accept: application/json" \
-X GET http://$(DEV_CLIENT_IP)/api/status/system/sdk | \
/usr/bin/env python3 -m json.tool
install: $(VENV_INSTALL) $(APP_ARCHIVE)
scp $(APP_ARCHIVE) $(DEV_CLIENT_ADMIN)@$(DEV_CLIENT_IP):/app_upload
start: $(VENV_INSTALL)
curl -s --digest --insecure -u $(DEV_CLIENT_ADMIN):$(DEV_CLIENT_PASSWORD) \
-H "Accept: application/json" \
-X PUT http://$(DEV_CLIENT_IP)/api/control/system/sdk/action \
-d data='"start $(APP_UUID)"' | \
/usr/bin/env python3 -m json.tool
stop: $(VENV_INSTALL)
curl -s --digest --insecure -u $(DEV_CLIENT_ADMIN):$(DEV_CLIENT_PASSWORD) \
-H "Accept: application/json" \
-X PUT http://$(DEV_CLIENT_IP)/api/control/system/sdk/action \
-d data='"stop $(APP_UUID)"' | \
/usr/bin/env python3 -m json.tool
uninstall: $(VENV_INSTALL)
curl -s --digest --insecure -u $(DEV_CLIENT_ADMIN):$(DEV_CLIENT_PASSWORD) \
-H "Accept: application/json" \
-X PUT http://$(DEV_CLIENT_IP)/api/control/system/sdk/action \
-d data='"uninstall $(APP_UUID)"' | \
/usr/bin/env python3 -m json.tool
purge: $(VENV_INSTALL)
curl -s --digest --insecure -u $(DEV_CLIENT_ADMIN):$(DEV_CLIENT_PASSWORD) \
-H "Accept: application/json" \
-X PUT http://$(DEV_CLIENT_IP)/api/control/system/sdk/action \
-d data='"purge"' | \
/usr/bin/env python3 -m json.tool
help:
cat $(ROOT)/README.md