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 ESP8266 JerryScript target. 23 24# Install tools via apt. 25install-apt-get-deps: 26 sudo apt-get install -q -y wget 27 28# Fetch and build crosstool-NG with support for Xtensa. 29install-xtensa-kx106-gcc: 30 wget https://dl.espressif.com/dl/xtensa-lx106-elf-linux64-1.22.0-88-gde0bdc1-4.8.5.tar.gz -O ../xtensa-lx106-elf-linux64-1.22.0-88-gde0bdc1-4.8.5.tar.gz --no-check-certificate 31 cd .. && tar xvfz xtensa-lx106-elf-linux64-1.22.0-88-gde0bdc1-4.8.5.tar.gz 32 33# Fetch Espressif SDK and Xtensa libraries. 34install-espressif-sdk: 35 git clone https://github.com/espressif/ESP8266_RTOS_SDK.git ../ESP8266_RTOS_SDK -b v2.1.0 36 37# Perform all the necessary (JerryScript-independent) installation steps. 38install-noapt: install-xtensa-kx106-gcc install-espressif-sdk 39install: install-apt-get-deps install-noapt 40 41 42## Targets for building ESP8266 with JerryScript. 43 44# Build the firmware (ESP8266 with JerryScript). 45script: 46 PATH=$(CURDIR)/../xtensa-lx106-elf/bin:$$PATH $(MAKE) -f ./targets/esp8266/Makefile.esp8266 BIN_PATH=build/obj-esp8266 SDK_PATH=$(CURDIR)/../ESP8266_RTOS_SDK 47