A public domain JSON parser focused on correctness, ANSI C99 compliance, full Unicode (UTF-8) support, minimal memory footprint, and a simple API. As a streaming API, arbitrary large JSON could be processed with a small amount of memory (the size of the largest string in the JSON).
22 lines
625 B
Plaintext
22 lines
625 B
Plaintext
--- Makefile.orig 2024-02-22 11:12:52 UTC
|
|
+++ Makefile
|
|
@@ -1,8 +1,8 @@
|
|
.POSIX:
|
|
-CC = cc
|
|
-CFLAGS = -std=c99 -pedantic -Wall -Wextra -Wno-missing-field-initializers
|
|
+CC ?= cc
|
|
+CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wno-missing-field-initializers -fPIC
|
|
|
|
-all: tests/pretty tests/stream tests/tests
|
|
+all: libpdjson.so tests/pretty tests/stream tests/tests
|
|
|
|
tests/pretty: tests/pretty.o pdjson.o
|
|
$(CC) $(LDFLAGS) -o $@ tests/pretty.o pdjson.o $(LDLIBS)
|
|
@@ -28,3 +28,6 @@ clean:
|
|
|
|
.c.o:
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
+
|
|
+libpdjson.so: pdjson.o
|
|
+ $(CC) -shared -Wl,-soname=libpdjson.so.0 -o libpdjson.so pdjson.o
|