2 PGFILEDESC
= "standalone json parser tester"
7 OBJS
= test_json_parser_incremental.o test_json_parser_perf.o
9 EXTRA_CLEAN
= test_json_parser_incremental
$(X
) test_json_parser_perf
$(X
)
13 PGXS
:= $(shell $(PG_CONFIG
) --pgxs
)
16 subdir
= src
/test/modules
/test_json_parser
17 top_builddir
= ..
/..
/..
/..
18 include $(top_builddir
)/src
/Makefile.global
19 include $(top_srcdir
)/contrib
/contrib-global.mk
22 all: test_json_parser_incremental
$(X
) test_json_parser_perf
$(X
)
24 %.o
: $(top_srcdir
)/$(subdir
)/%.c
26 PARSER_LIBS
= $(top_builddir
)/src
/common
/libpgcommon.a
$(top_builddir
)/src
/port
/libpgport.a
28 test_json_parser_incremental
$(X
): test_json_parser_incremental.o
$(PARSER_LIBS
)
29 $(CC
) $(CFLAGS
) $^
-o
$@
31 test_json_parser_perf
$(X
): test_json_parser_perf.o
$(PARSER_LIBS
)
32 $(CC
) $(CFLAGS
) $^
-o
$@
34 speed-check
: test_json_parser_perf
$(X
)
35 @echo Standard parser
:
36 time .
/test_json_parser_perf
10000 $(top_srcdir
)/$(subdir
)/tiny.json
37 @echo Incremental parser
:
38 time .
/test_json_parser_perf
-i
10000 $(top_srcdir
)/$(subdir
)/tiny.json