Further cleanup for recent JSON-related commits.
[pgsql.git] / src / test / modules / test_json_parser / Makefile
blob628256b6bbd6c11b606003944764a7dd8ca2bd18
2 PGFILEDESC = "standalone json parser tester"
3 PGAPPICON = win32
5 TAP_TESTS = 1
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)
11 ifdef USE_PGXS
12 PG_CONFIG = pg_config
13 PGXS := $(shell $(PG_CONFIG) --pgxs)
14 include $(PGXS)
15 else
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
20 endif
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