Commit graph

34 commits

Author SHA1 Message Date
Vincent Manis
e73c888279 Modify makefiles to make LDCONFIG optional, support systems with no symlinks.
- Makefile.libs: changed definition of LN to LN -sf, so can be overridden
    with LN=cp on systems with no symlinks; introduced LDCONFIG, so can be
    overridden if desired.

  - Makefile: changed uses of $(LN) -sf to $(LN); replaced two occurrences
    of ldconfig by $(LDCONFIG); suppress install of $(IMAGE_FILES) if variable
    is empty.

Note: the IMAGE_FILES change was to enable Chibi to be compiled on GNURoot+Android,
and can be reasonably reverted if an alternate way of dealing with image files
is chosen.
2016-05-18 14:11:39 -07:00
Marc Nieper-Wisskirchen
11f5a5473e Exclude unsupported functions in Emscripten version 2016-04-08 15:48:45 +02:00
Alex Shinn
ec430071eb default snow-chibi command uses snow.img 2016-03-13 15:42:47 +09:00
Alex Shinn
524179388d making image save/load functions public 2016-03-08 23:13:16 +09:00
Alex Shinn
38385c52eb removing bashisms from makefile 2016-03-02 22:57:09 +09:00
Alex Shinn
64f3e0fc56 installing chibi and snow images by default 2016-02-27 22:29:19 +09:00
Chris Walsh
9db22a4f7a Made static definitions for srfi/95 and srfi/27 so work with images. Put makefile back to -O3 so optimized binaries made by default 2016-02-20 09:16:58 -05:00
Chris Walsh
9f10e3656c Bit better error reporting 2016-02-16 12:10:28 -05:00
Chris Walsh
2005c19ea0 Added full support for packed images, both for static and dynamic libraries. 2016-02-15 21:12:58 -05:00
Tobias Kortkamp
bd584435cd Provide overridable PKGCONFDIR and INSTALL_EXE variables in Makefile
Adding these options will simplify the FreeBSD port of chibi-scheme
(https://freshports.org/lang/chibi-scheme) because I can get rid of
most of the custom patches currently needed.  In FreeBSD pkg-config
files need to be installed into libdata/pkgconfig.  INSTALL_EXE
provides a hook for replacing the normal 'install' program with
'install -s' for stripping the binaries/libraries.  Adding these
options should have no impact on the default build process.
2016-01-06 22:36:07 +01:00
Marc Nieper-Wißkirchen
899a15b725 Integrate emscripten build process in Makefile
Move Emscripten dependencies into separate directory
2015-06-23 19:57:07 +02:00
Alex Shinn
854f2f09ed Adding command-line option tests. 2015-06-21 23:14:38 +09:00
Frère Jérôme
7492964312 Remove warning for inexistant static library
Simple tweak using the *test* system command. Might not be portable enough?
2015-06-07 09:38:40 +02:00
Juan Francisco Cantero Hurtado
c4eb57c6c8 Add the variable VERSION and remove the uses of 'cat VERSION'
The Makefile doesn't write correctly the version of chibi-scheme within
the pkgconfig file (spotted by James Turner, OpenBSD developer) because
the VERSION variable doesn't exist.

The uses of 'cat VERSION' are not needed anymore.
2015-05-02 20:07:25 +02:00
Alex Shinn
0df0dc3e2b Fixing typo in snowballs target. 2015-05-02 22:14:29 +09:00
Alex Shinn
5cab36c8bd Fleshing out (chibi parse) docs and adding to the manual. 2015-05-02 21:47:24 +09:00
Alex Shinn
452e6f27d7 Packaging (chibi iset) recursively. 2015-05-01 07:55:02 +09:00
Alex Shinn
7f63676e1b Adding description for (chibi char-set boundary). 2015-04-30 17:33:20 +09:00
Alex Shinn
93730efceb Adding (chibi app) docs. 2015-04-30 17:21:36 +09:00
Alex Shinn
12c9dc1038 Adding a snowballs target. 2015-04-26 13:29:40 +09:00
Alex Shinn
82bc3b931f Adding "debian" make target from issue #221. 2015-04-25 10:40:21 +09:00
Alex Shinn
ff8f9d5fa7 Updating dist target to use git ls-files instead of hg manifest. 2015-04-25 10:36:06 +09:00
ilammy
baff1af72d chibi.crypto: native SHA-2 implementation
The original Scheme implementation is astonishingly slow. Rewriting
SHA-2 in C yields around x10000 speed boost for premade strings and
bytevectors. For input ports this is alleviated to x100 boost.

The implementation is divided into two parts: native computational
backend and thin Scheme interface. It is tedious to properly do IO
from C, so the Scheme code handles reading data from an input port
and the C code performs actual computations on byte buffers (which
is also used to handle strings and bytevectors directly).

Scheme wrapper reads data in chunked manner with 'read-bytevector'.
Currently, the chunk size has insignificant impact on performance
as soon as it is bigger than 64. Also, using simply read-bytevector
turned out to be 33% faster than preallocating a buffer and filling
it with read-bytevector!

One tricky part is how to get exact 32-bit integers in C89. We have
no <inttypes.h> there, so instead we use <limits.h> to see whether
we have a standard type with suitable boundaries.

The other one is how to return a properly tagged sha_context from C.
Chibi FFI currently cannot handle the case when a procedure returns
either a C pointer (which needs to be boxed) or an exception (which
should be left as is). To workaround this sexp_start_sha() receives
a dummy argument of type sha_context; this makes Chibi FFI to put a
proper type tag into 'self', which is then extracted in the C code.

This commits adds a new shared library 'crypto$(SO)' with intent to
keep there all native code of (chibi crypto) libraries. This allows
to simply put any future native implementation of SHA-512 or MD5 in
some md5.c and just include those files into crypto.stub.
2015-04-18 17:31:45 +03:00
ilammy
78a57dfe83 chibi.crypto: documentation for (chibi crypto sha-2)
Clearly state what kind of arguments sha-224 and sha-256 can handle
and what they return as a result.
2015-04-18 17:31:44 +03:00
Alex Shinn
3979e98aa6 Adding initial snow command-line tests. 2015-04-09 01:16:52 +09:00
Alex Shinn
4e5cdedc03 Converting tests to modules instead of separate programs.
By convention, a library meant for testing exports "run-tests".
Also by convention, assume the test for (foo bar) is (foo bar-test),
keeping the test in the same directory and avoiding confusion since
(chibi test) is not a test for (chibi).
- Avoids the hack of "load"ing test, with resulting namespace complications.
- Allows keeping tests together with the libraries.
- Allows setting up test hooks before running.
- Allows implicit inference of test locations when using above conventions.
2015-04-05 23:38:51 +09:00
Alex Shinn
f4f954fe35 Fixing snow-chibi install source path after removing submodule. 2015-04-05 08:15:07 +09:00
Alex Shinn
b22e81afd6 fixing install target for snow-chibi 2015-03-17 22:09:32 +09:00
Alex Shinn
fc457c6146 Adding optional EXTRA_COMPILED_LIBS to Makefile. 2015-02-25 23:18:33 +09:00
Alex Shinn
956b968ab4 clibs.c should depend on the generated c files 2015-02-22 16:16:24 +09:00
Alex Shinn
dc5e7e397d Emscripten support by default. Patch from Marc Nieper-Wi?kirchen. 2015-02-22 16:10:30 +09:00
Alex Shinn
3f85d7c2c0 Using CHIBI_DEPENDENCIES in clibs.c rule deps instead of hard-coded chibi-scheme. 2015-02-17 19:52:39 +09:00
Alex Shinn
41ea3bb835 chibi-genstatic only needs -q 2015-02-16 22:50:11 +09:00
Alex Shinn
2922ed591d Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00