mirror of
https://github.com/janet-lang/janet
synced 2024-11-24 17:27:18 +00:00
Fix makefile and add json doc.
This commit is contained in:
parent
4d119e4e03
commit
aa8384488c
4
Makefile
4
Makefile
@ -35,6 +35,7 @@ CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -fvisibility=hidden \
|
|||||||
CLIBS=-lm -ldl
|
CLIBS=-lm -ldl
|
||||||
JANET_TARGET=janet
|
JANET_TARGET=janet
|
||||||
JANET_LIBRARY=libjanet.so
|
JANET_LIBRARY=libjanet.so
|
||||||
|
JANET_PATH?=/usr/local/lib/janet
|
||||||
DEBUGGER=gdb
|
DEBUGGER=gdb
|
||||||
|
|
||||||
UNAME:=$(shell uname -s)
|
UNAME:=$(shell uname -s)
|
||||||
@ -180,7 +181,8 @@ install: $(JANET_TARGET)
|
|||||||
$(LDCONFIG)
|
$(LDCONFIG)
|
||||||
|
|
||||||
install-libs: natives
|
install-libs: natives
|
||||||
cp lib/* $(JANET_PATH)
|
mkdir -p $(JANET_PATH)
|
||||||
|
cp -r lib $(JANET_PATH)
|
||||||
cp natives/*/*.so $(JANET_PATH)
|
cp natives/*/*.so $(JANET_PATH)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
@ -588,8 +588,14 @@ static int json_encode(JanetArgs args) {
|
|||||||
/****************/
|
/****************/
|
||||||
|
|
||||||
static const JanetReg cfuns[] = {
|
static const JanetReg cfuns[] = {
|
||||||
{"encode", json_encode},
|
{"encode", json_encode,
|
||||||
{"decode", json_decode},
|
"(json.encode x)\n\n"
|
||||||
|
"Encodes a janet value in JSON (utf-8)."
|
||||||
|
},
|
||||||
|
{"decode", json_decode,
|
||||||
|
"(json.decode json-source)\n\n"
|
||||||
|
"Returns a janet object after parsing JSON."
|
||||||
|
},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user