2015-10-01 10:37:19 +02:00
|
|
|
ACLOCAL_AMFLAGS = -I build-aux/m4
|
|
|
|
.PHONY: gen
|
|
|
|
.INTERMEDIATE: $(GENBIN)
|
|
|
|
|
|
|
|
include_HEADERS = include/univalue.h
|
2016-06-10 15:19:51 +02:00
|
|
|
noinst_HEADERS = lib/univalue_escapes.h lib/univalue_utffilter.h
|
2015-10-01 10:37:19 +02:00
|
|
|
|
2015-10-09 11:37:00 +02:00
|
|
|
lib_LTLIBRARIES = libunivalue.la
|
2015-10-01 10:37:19 +02:00
|
|
|
|
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
|
|
pkgconfig_DATA = pc/libunivalue.pc
|
|
|
|
|
2015-10-09 11:37:00 +02:00
|
|
|
libunivalue_la_SOURCES = \
|
2015-10-01 10:37:19 +02:00
|
|
|
lib/univalue.cpp \
|
2017-09-29 14:31:36 +02:00
|
|
|
lib/univalue_get.cpp \
|
2015-10-01 10:37:19 +02:00
|
|
|
lib/univalue_read.cpp \
|
|
|
|
lib/univalue_write.cpp
|
|
|
|
|
2015-10-09 11:37:00 +02:00
|
|
|
libunivalue_la_LDFLAGS = \
|
2015-10-01 10:37:19 +02:00
|
|
|
-version-info $(LIBUNIVALUE_CURRENT):$(LIBUNIVALUE_REVISION):$(LIBUNIVALUE_AGE) \
|
|
|
|
-no-undefined
|
2015-10-09 11:37:00 +02:00
|
|
|
libunivalue_la_CXXFLAGS = -I$(top_srcdir)/include
|
2015-10-01 10:37:19 +02:00
|
|
|
|
2017-09-29 14:31:36 +02:00
|
|
|
TESTS = test/object test/unitester test/no_nul
|
2015-10-01 10:37:19 +02:00
|
|
|
|
|
|
|
GENBIN = gen/gen$(BUILD_EXEEXT)
|
|
|
|
GEN_SRCS = gen/gen.cpp
|
|
|
|
|
|
|
|
$(GENBIN): $(GEN_SRCS)
|
|
|
|
@echo Building $@
|
|
|
|
$(AM_V_at)c++ -I$(top_srcdir)/include -o $@ $<
|
|
|
|
|
|
|
|
gen: lib/univalue_escapes.h $(GENBIN)
|
|
|
|
@echo Updating $<
|
|
|
|
$(AM_V_at)$(GENBIN) > lib/univalue_escapes.h
|
|
|
|
|
2017-09-29 14:31:36 +02:00
|
|
|
noinst_PROGRAMS = $(TESTS) test/test_json
|
2015-10-01 10:37:19 +02:00
|
|
|
|
|
|
|
TEST_DATA_DIR=test
|
|
|
|
|
|
|
|
test_unitester_SOURCES = test/unitester.cpp
|
2015-10-09 11:37:00 +02:00
|
|
|
test_unitester_LDADD = libunivalue.la
|
2015-10-01 10:37:19 +02:00
|
|
|
test_unitester_CXXFLAGS = -I$(top_srcdir)/include -DJSON_TEST_SRC=\"$(srcdir)/$(TEST_DATA_DIR)\"
|
|
|
|
test_unitester_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
|
|
|
|
|
2017-09-29 14:31:36 +02:00
|
|
|
test_test_json_SOURCES = test/test_json.cpp
|
|
|
|
test_test_json_LDADD = libunivalue.la
|
|
|
|
test_test_json_CXXFLAGS = -I$(top_srcdir)/include
|
|
|
|
test_test_json_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
|
|
|
|
|
|
|
|
test_no_nul_SOURCES = test/no_nul.cpp
|
|
|
|
test_no_nul_LDADD = libunivalue.la
|
|
|
|
test_no_nul_CXXFLAGS = -I$(top_srcdir)/include
|
|
|
|
test_no_nul_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
|
|
|
|
|
|
|
|
test_object_SOURCES = test/object.cpp
|
|
|
|
test_object_LDADD = libunivalue.la
|
|
|
|
test_object_CXXFLAGS = -I$(top_srcdir)/include
|
|
|
|
test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)
|
|
|
|
|
2015-10-01 10:37:19 +02:00
|
|
|
TEST_FILES = \
|
|
|
|
$(TEST_DATA_DIR)/fail10.json \
|
|
|
|
$(TEST_DATA_DIR)/fail11.json \
|
|
|
|
$(TEST_DATA_DIR)/fail12.json \
|
|
|
|
$(TEST_DATA_DIR)/fail13.json \
|
|
|
|
$(TEST_DATA_DIR)/fail14.json \
|
|
|
|
$(TEST_DATA_DIR)/fail15.json \
|
|
|
|
$(TEST_DATA_DIR)/fail16.json \
|
|
|
|
$(TEST_DATA_DIR)/fail17.json \
|
|
|
|
$(TEST_DATA_DIR)/fail18.json \
|
|
|
|
$(TEST_DATA_DIR)/fail19.json \
|
|
|
|
$(TEST_DATA_DIR)/fail1.json \
|
|
|
|
$(TEST_DATA_DIR)/fail20.json \
|
|
|
|
$(TEST_DATA_DIR)/fail21.json \
|
|
|
|
$(TEST_DATA_DIR)/fail22.json \
|
|
|
|
$(TEST_DATA_DIR)/fail23.json \
|
|
|
|
$(TEST_DATA_DIR)/fail24.json \
|
|
|
|
$(TEST_DATA_DIR)/fail25.json \
|
|
|
|
$(TEST_DATA_DIR)/fail26.json \
|
|
|
|
$(TEST_DATA_DIR)/fail27.json \
|
|
|
|
$(TEST_DATA_DIR)/fail28.json \
|
|
|
|
$(TEST_DATA_DIR)/fail29.json \
|
|
|
|
$(TEST_DATA_DIR)/fail2.json \
|
|
|
|
$(TEST_DATA_DIR)/fail30.json \
|
|
|
|
$(TEST_DATA_DIR)/fail31.json \
|
|
|
|
$(TEST_DATA_DIR)/fail32.json \
|
|
|
|
$(TEST_DATA_DIR)/fail33.json \
|
|
|
|
$(TEST_DATA_DIR)/fail34.json \
|
2015-12-02 12:28:14 +01:00
|
|
|
$(TEST_DATA_DIR)/fail35.json \
|
|
|
|
$(TEST_DATA_DIR)/fail36.json \
|
|
|
|
$(TEST_DATA_DIR)/fail37.json \
|
2016-06-10 15:19:51 +02:00
|
|
|
$(TEST_DATA_DIR)/fail38.json \
|
|
|
|
$(TEST_DATA_DIR)/fail39.json \
|
|
|
|
$(TEST_DATA_DIR)/fail40.json \
|
|
|
|
$(TEST_DATA_DIR)/fail41.json \
|
2017-09-29 14:31:36 +02:00
|
|
|
$(TEST_DATA_DIR)/fail42.json \
|
|
|
|
$(TEST_DATA_DIR)/fail44.json \
|
2015-10-01 10:37:19 +02:00
|
|
|
$(TEST_DATA_DIR)/fail3.json \
|
|
|
|
$(TEST_DATA_DIR)/fail4.json \
|
|
|
|
$(TEST_DATA_DIR)/fail5.json \
|
|
|
|
$(TEST_DATA_DIR)/fail6.json \
|
|
|
|
$(TEST_DATA_DIR)/fail7.json \
|
|
|
|
$(TEST_DATA_DIR)/fail8.json \
|
|
|
|
$(TEST_DATA_DIR)/fail9.json \
|
|
|
|
$(TEST_DATA_DIR)/pass1.json \
|
|
|
|
$(TEST_DATA_DIR)/pass2.json \
|
2015-12-02 12:28:14 +01:00
|
|
|
$(TEST_DATA_DIR)/pass3.json \
|
2016-06-10 15:19:51 +02:00
|
|
|
$(TEST_DATA_DIR)/round1.json \
|
2017-09-29 14:31:36 +02:00
|
|
|
$(TEST_DATA_DIR)/round2.json \
|
|
|
|
$(TEST_DATA_DIR)/round3.json \
|
|
|
|
$(TEST_DATA_DIR)/round4.json \
|
|
|
|
$(TEST_DATA_DIR)/round5.json \
|
|
|
|
$(TEST_DATA_DIR)/round6.json \
|
|
|
|
$(TEST_DATA_DIR)/round7.json
|
2015-10-01 10:37:19 +02:00
|
|
|
|
|
|
|
EXTRA_DIST=$(TEST_FILES) $(GEN_SRCS)
|