Rename jerry-libm to jerry-math (#4410)
That "libm" in the name of the library resulted in awkward naming on *nix systems (`libjerry-libm.*`, "lib" occurring twice). And the name of the corresponding header is `math.h` anyway. Note that this is a breaking change in some sense. The commit contains no API change, but the build system does change for users of the math library. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
+11
-11
@@ -32,7 +32,7 @@ $ export PKG_CONFIG_PATH=$(pwd)/example_install/lib/pkgconfig/
|
||||
Test if the `pkg-config` works for JerryScript:
|
||||
|
||||
```sh
|
||||
$ pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-ext libjerry-libm
|
||||
$ pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-ext libjerry-math
|
||||
```
|
||||
|
||||
## Example 1. Execute JavaScript from your application
|
||||
@@ -58,7 +58,7 @@ main (void)
|
||||
To compile it one can use the following command:
|
||||
|
||||
```sh
|
||||
$ gcc api-example-1.c -o api-example-1 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-1.c -o api-example-1 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
If everything is correct the application returns with a zero exit code:
|
||||
@@ -118,7 +118,7 @@ main (void)
|
||||
To compile it one can use the following command:
|
||||
|
||||
```sh
|
||||
$ gcc api-example-2.c -o api-example-2 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-2.c -o api-example-2 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
If everything is correct the application returns with a zero exit code:
|
||||
@@ -181,7 +181,7 @@ main (void)
|
||||
To compile it one can use the following command:
|
||||
|
||||
```sh
|
||||
$ gcc api-example-3.c -o api-example-3 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-3.c -o api-example-3 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
If everything is correct the application returns with a zero exit code:
|
||||
@@ -285,7 +285,7 @@ main (void)
|
||||
To compile it one can use the following command:
|
||||
|
||||
```sh
|
||||
$ gcc api-example-4.c -o api-example-4 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-4.c -o api-example-4 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
If everything is correct the application should print out the message present in the `print_handler` method:
|
||||
@@ -405,7 +405,7 @@ main (void)
|
||||
To compile it one can use the following command:
|
||||
|
||||
```sh
|
||||
$ gcc api-example-5.c -o api-example-5 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-5.c -o api-example-5 $(pkg-config --cflags --libs libjerry-core libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
If everything is correct the application should print out the string passed for the `print` method in the JS code:
|
||||
@@ -473,7 +473,7 @@ To compile it one can use the following command:
|
||||
(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.
|
||||
|
||||
```sh
|
||||
$ gcc api-example-6.c -o api-example-6 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-6.c -o api-example-6 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
If everything is correct the application should print out the string passed for the `print` method in the JS code:
|
||||
@@ -549,7 +549,7 @@ To compile it one can use the following command:
|
||||
(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.
|
||||
|
||||
```sh
|
||||
$ gcc api-example-7.c -o api-example-7 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-7.c -o api-example-7 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
The sample will output 'Hello from C!'. However, now it is not just a part of the source script, but the value, dynamically supplied to the engine:
|
||||
@@ -822,7 +822,7 @@ To compile it one can use the following command:
|
||||
(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.
|
||||
|
||||
```sh
|
||||
$ gcc api-example-8-shell.c -o api-example-8-shell $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-8-shell.c -o api-example-8-shell $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
The application reads lines from standard input and evaluates them, one after another. To try out run:
|
||||
@@ -922,7 +922,7 @@ To compile it one can use the following command:
|
||||
(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.
|
||||
|
||||
```sh
|
||||
$ gcc api-example-9.c -o api-example-9 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-9.c -o api-example-9 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
Execute the example with:
|
||||
@@ -1053,7 +1053,7 @@ To compile it one can use the following command:
|
||||
(**Note** that the `libjerry-ext` was added **before** the `libjerry-port-default` entry for the `pkg-config` call.
|
||||
|
||||
```sh
|
||||
$ gcc api-example-10.c -o api-example-10 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-libm)
|
||||
$ gcc api-example-10.c -o api-example-10 $(pkg-config --cflags --libs libjerry-core libjerry-ext libjerry-port-default libjerry-math)
|
||||
```
|
||||
|
||||
Execute the example with:
|
||||
|
||||
Reference in New Issue
Block a user