Add makefile to examples
This commit is contained in:
parent
23dc0814a5
commit
e82e469356
3
doc/examples/.gitignore
vendored
Normal file
3
doc/examples/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
output
|
||||
parse
|
||||
*.o
|
||||
11
doc/examples/makefile
Normal file
11
doc/examples/makefile
Normal file
@ -0,0 +1,11 @@
|
||||
.PHONY: all
|
||||
all: parse output
|
||||
|
||||
parse:
|
||||
gcc -ggdb -I../../include -L../../build parse.c -Wall -Wextra -pedantic -o parse -lrjp
|
||||
output:
|
||||
gcc -ggdb -I../../include -L../../build output.c -Wall -Wextra -pedantic -o output -lrjp
|
||||
|
||||
clean:
|
||||
rm parse
|
||||
rm output
|
||||
@ -6,7 +6,7 @@ int main(){
|
||||
RJP_value* root = rjp_new_object();
|
||||
|
||||
//add a member and set its type
|
||||
RJP_value* member = rjp_new_member_key_copy(root, "key", 0);
|
||||
RJP_value* member = rjp_new_member(root, "key", 0);
|
||||
rjp_set_int(member, 5);
|
||||
|
||||
//output into rjp_alloc'd buffer
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user