1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00
stedolan-jq/c/Makefile
Stephen Dolan 463b175cdb Reference-counted copy-on-write JSON library.
Comes with tests and, presumably, bugs.
2012-08-28 18:09:43 +01:00

31 lines
752 B
Makefile

CC=gcc -Wall -std=gnu99 -ggdb -Wno-unused-function
.PHONY: all clean
all: parsertest
clean:
make -Bnd | grep 'Must remake target' | \
sed 's/.*`\(.*\)'\''.*/\1/' | grep -v '^all$$' | \
xargs rm
lexer.yy.c: lexer.l
flex -o lexer.yy.c --header-file=lexer.yy.h lexer.l
lexer.yy.h: lexer.yy.c
parser.tab.c: parser.y lexer.yy.h
bison -W -d parser.y -v --report-file=parser.info
parser.tab.h: parser.tab.c
parsertest: parser.tab.c lexer.yy.c main.c opcode.c bytecode.c compile.c execute.c builtin.c
$(CC) -o $@ $^ -ljansson
jvtest: jvtest.c jv.c jv_print.c
$(CC) -o $@ $^ -ljansson
test: jvtest
valgrind --error-exitcode=1 -q --leak-check=full ./jvtest
jsparse: jsparse.l jv.c
flex -o jsparse.c jsparse.l
gcc -o jsparse jsparse.c -ljansson