-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
99 lines (73 loc) · 1.8 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/make -f
# -*- makefile -*-
# SPDX-License-Identifier: MPL-2.0
#{
# Copyright 2018-present Samsung Electronics France SAS, and other contributors
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.*
#}
default: all
@echo "# log: $@: $^"
project ?= aframe-smart-home
tmp_dir ?= tmp
runtime ?= iotjs
run_args ?=
run_timeout ?= 10
main_src ?= example/index.js
NODE_PATH := .:${NODE_PATH}
export NODE_PATH
port ?= 8888
hostname ?= localhost
url ?= http://${localhost}:${port}
iotjs_modules_dir ?= ${CURDIR}/iotjs_modules
export iotjs_modules_dir
webthing-iotjs_url ?= https://github.com/rzr/webthing-iotjs
webthing-iotjs_revision ?= webthing-iotjs-0.12.1-1
webthing-iotjs_dir ?= ${iotjs_modules_dir}/webthing-iotjs
iotjs_modules_dirs += ${webthing-iotjs_dir}
help:
@echo "## Usage: "
@echo "# make start"
all: modules
@echo "# log: $@: $^"
check:
@echo "# log: $@: $^"
setup:
@echo "# log: $@: $^"
test:
@echo "# log: $@: $^"
node/modules: package.json
npm install
modules: ${runtime}/modules
@echo "# log: $@: $^"
build:
@echo "# log: $@: $^"
run/%: ${main_src} build modules
${@F} $< ${run_args}
run/npm: ${main_src}
npm start
run/node: run/npm
run: run/${runtime}
@echo "# log: $@: $^"
clean:
@rm -rf ${tmp_dir}
cleanall: clean
@rm -f *~
distclean: cleanall
@rm -rf node_modules
start: run
@echo "# log: $@: $^"
LICENSE: /usr/share/common-licenses/MPL-2.0
cp -av $< $@
iotjs/start: ${main_src} ${iotjs_modules_dirs}
${@D} $<
iotjs/modules: ${iotjs_modules_dirs}
ls $^
${webthing-iotjs_dir}: Makefile
git clone --recursive --depth=1 \
--branch "${webthing-iotjs_revision}" \
"${webthing-iotjs_url}" \
"$@"
${MAKE} -C $@ ${runtime}/modules