Commit Graph
66 Commits
Author SHA1 Message Date
Tor Andersson f91537691f TypedArray extension. 2024-01-20 12:46:40 +01:00
Tor Andersson db212180bf Allow disabling readline support in Makefile.
make HAVE_READLINE=no
2023-04-04 15:22:39 +02:00
Tor Andersson 57e3f01d5f Add install-static and install-shared targets. 2023-01-10 12:11:11 +01:00
Tor Andersson f190f88ee2 Simplify Makefile. 2023-01-09 16:09:28 +01:00
Tor Andersson dd149b98bd Split debug printing of bytecode etc into "pp" tool. 2023-01-05 15:32:41 +01:00
Ismael Luceno d592c785c0 Enable choice of library version for shell
Default behavior is unchanged, but enables to chose the dynamic version by
passing "libmujs=libmujs.so" to make.
2022-10-17 14:53:27 +02:00
Ismael Luceno 1138515255 Use $(@D) instead of $(dir $@) 2022-10-17 14:53:27 +02:00
Ismael Luceno 4d3165baf5 Bug 705905: Compute VERSION using Make. 2022-10-17 14:52:13 +02:00
Wessel Dankers 1cbf19e7a9 Makefile: fix parallel builds
The parent directory wasn't created when generating the .pc file,
causing it to fail in highly parallel builds.
2022-08-05 13:13:21 +02:00
李通洲 70a299c76b Build shared libs as dylib on macOS 2021-12-06 11:58:41 +01:00
Sebastian Rasmussen 72e95a48e3 Add user.make for persistent custom settings. 2021-03-26 16:41:43 +01:00
Tor Andersson 1616c18484 Some Makefile tweaks.
Change default optimization flag to -O2.

Use XCFLAGS and XCPPFLAGS to add to the definitions:

  make XCPPFLAGS=-I/foo/bar XCFLAGS=-mfoo-bar

Set CFLAGS on the make command line if you want to override completely:

  make CFLAGS="-O3 -m32"

If you want to override them with the system environment variables:

  make CFLAGS="$CFLAGS"
2021-03-25 14:43:07 +01:00
Tor Andersson 80e222d91d Support externally set CFLAGS, CPPFLAGS, and LDFLAGS. 2021-02-04 10:02:18 +01:00
Tor Andersson 16049bbbdc Issue 107: Depend only on the exact files needed for install targets. 2019-07-03 20:25:19 +02:00
Tor Andersson bd79071a6f Add make uninstall target. 2019-05-27 11:19:26 +02:00
Albert I 269904fca0 Fix Makefile install derps
* Introduced by commit cd97fb4

Signed-off-by: Albert I <krascgq@outlook.co.id>
2019-03-08 22:54:35 +01:00
Tor Andersson cd97fb4b5c Fix makefile install paths.
Install the current configuration, don't hardwire it to build/release.
2019-03-07 16:07:38 +01:00
Tor Andersson e471b4dd6c Issue #83: Don't include $DESTDIR in pkg-config paths. 2019-02-25 12:48:20 +01:00
Tor Andersson 43c844510b Issue #84: Separate Makefile targets.
Don't automatically build static library when building the shell
or the shared library.
2019-02-25 11:57:40 +01:00
Tor Andersson 9f40dfb032 Take DESTDIR into account when creating pkg-config file.
Also only create the file when installing.
2019-02-12 12:19:26 +01:00
Tor Andersson 222772f6bb Remove -ffunction-sections and -fdata-sections compile flags.
They're only of minor benefit. Simpler build systems are better.
2018-06-15 15:22:54 +02:00
Tor Andersson ceac1b57d9 Allow enabling or disabling readline support by setting HAVE_READLINE. 2018-06-15 15:05:38 +02:00
Tor Andersson 2be672cd30 Fix makefile to remove warning from 'ar' invocation. 2018-06-08 13:52:12 +02:00
Tor Andersson b0e3f5e80d Add readline support to mujs shell. 2018-05-08 13:15:39 +02:00
Tor Andersson d04cbf3cc7 Add pretty-printing command line tool. 2018-04-23 18:24:31 +02:00
Tor Andersson 8df3dcd8c1 Add XCFLAGS to the CFLAGS in the Makefile.
Supports adding custom compiler flags without editing the Makefile.
2018-01-24 14:44:14 +01:00
Tor Andersson 228719d087 Remove mention of broken web site. 2018-01-05 14:22:15 +01:00
Sebastian Rasmussen 5d1904912c Extract mujs version from directory name for releases. 2017-09-26 12:51:39 +02:00
Tor Andersson 991f5e738e Add 'make watch' target.
Requires the inotify-tools package on linux, and allows automatic
rebuilds when the source is modified.
2017-09-07 14:31:27 +02:00
Tor Andersson 4c53c271f1 Only strip linked binaries in release mode. 2017-06-21 13:46:29 +02:00
Tor Andersson f0ed0d0ba3 Use separate directories for debug and release builds. 2017-06-16 13:02:33 +02:00
Tor Andersson a6e8443128 Add separate install-static and install-shared targets. 2017-06-15 16:22:58 +02:00
Tor Andersson ca22ed4882 Add pkgconfig file and shared library target. 2017-06-15 15:29:01 +02:00
Sebastian Rasmussen c5296bf469 Add sanitize build variant. 2017-05-22 16:07:40 +02:00
Tor Andersson 58b4420094 Add function-level linking. 2017-04-17 23:27:00 +02:00
Tor Andersson eed7619158 Rename our internal regex.h to not collide with system regex.h. 2015-08-14 12:05:09 +02:00
Tor Andersson 9bc5fec080 Fix makefile issues.
Don't force use of clang.
Use POSIX compatible grep and sed syntax.
Use POSIX compatible install arguments.
2014-12-11 16:45:04 +01:00
Tor Andersson 8ab50244bc Fix 'make test' target. 2014-10-13 16:33:52 +02:00
Tor Andersson 9512755c2c Use LDFLAGS when linking. 2014-09-25 14:18:34 +02:00
Tor Andersson 8f7c649985 Move ToPrimitive hint flags into jsvalue.h 2014-06-11 12:58:40 +02:00
Tor Andersson 3094ffc94b Add "make tarball" rule to create release archives. 2014-04-30 13:21:23 +02:00
Tor Andersson b37173e52e Silence "no return value"/"unreachable statement" warnings.
clang incorrectly treats a default label as unreachable in a switch on
an enum that has all the cases covered. gcc and msvc complain about
missing return values if there is no default statement.

By making the default case fall through to the JS_TUNDEFINED case we
silence all the compilers and handle corrupt data (an enum that isn't
one of the enumerated values) safely.
2014-03-26 14:27:53 +01:00
Tor Andersson 40d4dff589 Add debug, release and install targets. 2014-03-20 12:37:13 +01:00
Tor Andersson 48aed4bbb6 Name the library: MuJS! 2014-03-19 23:07:33 +01:00
Tor Andersson a6ba5356e2 Makefile tweaks. 2014-03-12 16:58:57 +01:00
Tor Andersson 3e050a949e Rename libjs.c to one.c and commit it. 2014-03-12 16:48:40 +01:00
Tor Andersson fd0ff38ad0 Remove -Werror. 2014-02-26 14:03:16 +01:00
Tor Andersson 45e3a31950 Some -pedantic warning fixes.
Drop the use of 'inline' in most places... place some trust in the
compiler.
2014-02-25 01:23:52 +01:00
Tor Andersson a98748a0ce Use clang by default and enable more warnings. 2014-02-25 01:01:20 +01:00
Tor Andersson 55ad332621 Rename some regex opcodes. 2014-02-24 15:33:50 +01:00