Add source amalgamation

The amalgamated source concatenates all sources
to a file janet.c which can be used for
embedding janet, much in the same way as sqlite
or mongoose.
This commit is contained in:
Calvin Rose
2019-01-24 00:15:58 -05:00
parent 4d81fbc238
commit 611543c48b
44 changed files with 373 additions and 216 deletions
+4 -2
View File
@@ -20,10 +20,12 @@
* IN THE SOFTWARE.
*/
#ifndef JANET_AMALG
#include <janet/janet.h>
#include "compile.h"
#include "state.h"
#include "util.h"
#endif
/* Generated bytes */
extern const unsigned char *janet_gen_core;
@@ -236,7 +238,7 @@ static Janet janet_core_hash(int32_t argc, Janet *argv) {
return janet_wrap_number(janet_hash(argv[0]));
}
static const JanetReg cfuns[] = {
static const JanetReg corelib_cfuns[] = {
{"native", janet_core_native,
JDOC("(native path [,env])\n\n"
"Load a native module from the given path. The path "
@@ -596,7 +598,7 @@ JanetTable *janet_core_env(void) {
Janet ret = janet_wrap_table(env);
/* Load main functions */
janet_cfuns(env, NULL, cfuns);
janet_cfuns(env, NULL, corelib_cfuns);
#ifndef JANET_NO_BOOTSTRAP
janet_quick_asm(env, JANET_FUN_YIELD, "debug", 0, 1, debug_asm, sizeof(debug_asm),