57 lines
1.3 KiB
Markdown
57 lines
1.3 KiB
Markdown
---
|
|
layout: page
|
|
title: How To
|
|
permalink: /how-to/
|
|
---
|
|
|
|
This is very simple way of compiling JerryScript. (Please add more so to guide how to build.)
|
|
|
|
## Get the source
|
|
|
|
You may know this.
|
|
```
|
|
git clone https://github.com/Samsung/jerryscript.git
|
|
cd jerryscript
|
|
```
|
|
|
|
## Building
|
|
|
|
It's based on Ubuntu Linux 14.04 LTS. You may need to read https://github.com/Samsung/jerryscript/wiki/Prerequisites before starting.
|
|
|
|
```
|
|
make
|
|
```
|
|
For the first time of the make, it'll prepare prerequisites with next message. It may take some time so go grab some coffee.
|
|
```
|
|
Setting up prerequisites... (log file: ./build/prerequisites/prerequisites.log)
|
|
```
|
|
|
|
After prerequisites are prepared, make will build all supporting platforms and mods. It may also take a while.
|
|
|
|
If only debug version for linux for development, just do as;
|
|
```
|
|
make debug.linux
|
|
```
|
|
|
|
without LTO(Link Time Optimization) and debug for linux
|
|
```
|
|
LTO=ff make debug.linux
|
|
```
|
|
|
|
if something goes wrong, it'll show
|
|
```
|
|
Build failed. See ./build/bin/unittests/make.log for details.
|
|
```
|
|
|
|
## Testing
|
|
```
|
|
make unittests
|
|
```
|
|
It should have no errors if it is ok.
|
|
|
|
## Check before committing
|
|
```
|
|
make precommit -j
|
|
```
|
|
This will check any problems in your modifications. may take some time depending on your machine. This is necessary before pull requests but can omit for local commits.
|