• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright JS Foundation and other contributors, http://js.foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15
16# Default target for running the build test outside the Travis CI environment.
17all:
18	$(MAKE) install
19	$(MAKE) script
20
21
22## Targets for installing build dependencies of the Mbed OS 5 JerryScript target.
23
24# Deploy Mbed and install Mbed Python dependencies.
25install:
26	pip install mbed-cli
27	cd targets/mbedos5 && mbed deploy
28	pip install idna==2.5 # FIXME: workaround
29	pip install -r targets/mbedos5/mbed-os/requirements.txt
30	pip install -r targets/mbedos5/tools/requirements.txt
31
32
33## Targets for building Mbed OS 5 with JerryScript.
34
35# Build the firmware (Mbed OS 5 with JerryScript).
36script:
37	# HACK: `EXTRA_SRC[_MOD]` are abused to pass `--library` to `mbed compile` in the `all` make target that builds an app
38	# HACK: this is needed because the Mbed OS 5 target code does not contain any `main` function, so the `all` make target does not link
39	# HACK: but the `library` make target does not build either because the launcher sources require `jerry-targetjs.h` that are explicitly not generated for libraries
40	$(MAKE) -C targets/mbedos5 BOARD=K64F EXTRA_SRC=dummy EXTRA_SRC_MOD=--library
41