2014-05-09 13:09:36 +10:00
|
|
|
###############################################################################
|
|
|
|
## Global build rules
|
|
|
|
|
2011-05-23 17:18:52 +10:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
2014-12-05 13:12:18 +11:00
|
|
|
AM_CXXFLAGS = $(BOOST_CPPFLAGS) $(ZLIB_CFLAGS)
|
2011-05-23 17:18:52 +10:00
|
|
|
|
2014-05-09 13:09:36 +10:00
|
|
|
###############################################################################
|
|
|
|
## Source definitions
|
|
|
|
|
2011-10-26 21:44:59 +11:00
|
|
|
UTIL_FILES = \
|
2015-03-07 03:16:57 +11:00
|
|
|
aabb.cpp \
|
|
|
|
aabb.hpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
backtrace.hpp \
|
2015-01-21 23:42:45 +11:00
|
|
|
bezier.cpp \
|
|
|
|
bezier.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
bitwise.cpp \
|
2011-08-29 14:38:47 +10:00
|
|
|
bitwise.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
colour.cpp \
|
2011-09-13 15:14:12 +10:00
|
|
|
colour.hpp \
|
2015-04-09 20:45:55 +10:00
|
|
|
colour.ipp \
|
2015-03-06 01:46:01 +11:00
|
|
|
coord.hpp \
|
|
|
|
coord/base.hpp \
|
|
|
|
coord/init.hpp \
|
|
|
|
coord/names.hpp \
|
|
|
|
coord/ops.hpp \
|
|
|
|
coord/store.hpp \
|
2015-05-06 23:49:45 +10:00
|
|
|
crypto/tea.cpp \
|
|
|
|
crypto/tea.hpp \
|
2015-05-06 21:20:17 +10:00
|
|
|
crypto/arc4.cpp \
|
|
|
|
crypto/arc4.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
debug.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
debug.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
endian.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
endian.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
except.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
except.hpp \
|
2012-04-30 11:50:38 +10:00
|
|
|
exe.cpp \
|
|
|
|
exe.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
extent.cpp \
|
2011-10-26 21:43:38 +11:00
|
|
|
extent.hpp \
|
2015-01-13 18:30:10 +11:00
|
|
|
extent.ipp \
|
2011-10-26 21:44:59 +11:00
|
|
|
fixed.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
fixed.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
float.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
float.hpp \
|
2012-11-09 15:11:02 +11:00
|
|
|
fourcc.cpp \
|
|
|
|
fourcc.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
guid.cpp \
|
2011-08-29 14:37:20 +10:00
|
|
|
guid.hpp \
|
2011-10-26 23:45:01 +11:00
|
|
|
hash.cpp \
|
|
|
|
hash.hpp \
|
2013-07-13 14:40:13 +10:00
|
|
|
hash/adler.cpp \
|
|
|
|
hash/adler.hpp \
|
|
|
|
hash/bsdsum.hpp \
|
|
|
|
hash/bsdsum.cpp \
|
|
|
|
hash/crc.cpp \
|
|
|
|
hash/crc.hpp \
|
2014-05-09 13:12:44 +10:00
|
|
|
hash/fletcher.hpp \
|
2015-03-02 00:06:47 +11:00
|
|
|
hash/hmac.cpp \
|
|
|
|
hash/hmac.hpp \
|
2015-03-02 02:54:54 +11:00
|
|
|
hash/hotp.cpp \
|
|
|
|
hash/hotp.hpp \
|
2013-03-11 20:42:49 +11:00
|
|
|
hash/md2.cpp \
|
|
|
|
hash/md2.hpp \
|
2013-03-11 20:44:32 +11:00
|
|
|
hash/md4.cpp \
|
|
|
|
hash/md4.hpp \
|
2013-03-11 20:45:53 +11:00
|
|
|
hash/md5.cpp \
|
|
|
|
hash/md5.hpp \
|
2013-07-13 14:40:13 +10:00
|
|
|
hash/pbkdf1.cpp \
|
|
|
|
hash/pbkdf1.hpp \
|
|
|
|
hash/pbkdf2.cpp \
|
|
|
|
hash/pbkdf2.hpp \
|
2014-04-10 21:04:07 +10:00
|
|
|
hash/ripemd.cpp \
|
|
|
|
hash/ripemd.hpp \
|
2014-04-16 19:17:56 +10:00
|
|
|
hash/sha2.cpp \
|
|
|
|
hash/sha2.hpp \
|
2013-03-11 20:47:48 +11:00
|
|
|
hash/sha1.cpp \
|
|
|
|
hash/sha1.hpp \
|
2012-05-16 15:03:49 +10:00
|
|
|
image.cpp \
|
|
|
|
image.hpp \
|
2015-04-20 17:51:00 +10:00
|
|
|
introspection.cpp \
|
|
|
|
introspection.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
io.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
io.hpp \
|
2014-08-01 21:37:04 +10:00
|
|
|
io.ipp \
|
2011-10-26 21:44:59 +11:00
|
|
|
ip.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
ip.hpp \
|
2012-04-26 14:54:59 +10:00
|
|
|
iterator.hpp \
|
2015-03-18 15:46:16 +11:00
|
|
|
json/fwd.hpp \
|
2015-02-03 00:07:09 +11:00
|
|
|
json/except.cpp \
|
|
|
|
json/except.hpp \
|
|
|
|
json/flat.cpp \
|
|
|
|
json/flat.hpp \
|
2015-03-18 16:08:18 +11:00
|
|
|
json/schema.cpp \
|
|
|
|
json/schema.hpp \
|
2015-02-03 00:07:09 +11:00
|
|
|
json/tree.cpp \
|
|
|
|
json/tree.hpp \
|
2012-01-04 17:08:03 +11:00
|
|
|
lerp.cpp \
|
|
|
|
lerp.hpp \
|
2012-04-24 17:38:35 +10:00
|
|
|
log.cpp \
|
|
|
|
log.hpp \
|
|
|
|
log.ipp \
|
2011-10-26 21:44:59 +11:00
|
|
|
maths.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
maths.hpp \
|
2014-08-01 20:44:58 +10:00
|
|
|
maths.ipp \
|
2011-10-26 21:44:59 +11:00
|
|
|
maths/matrix.cpp \
|
2011-10-18 21:45:55 +11:00
|
|
|
maths/matrix.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
maths/vector.cpp \
|
2011-10-18 21:45:55 +11:00
|
|
|
maths/vector.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
matrix.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
matrix.hpp \
|
2015-02-20 17:19:40 +11:00
|
|
|
matrix.ipp \
|
2012-04-26 18:16:33 +10:00
|
|
|
memory.cpp \
|
|
|
|
memory.hpp \
|
2012-06-25 16:54:26 +10:00
|
|
|
net/address.cpp \
|
|
|
|
net/address.hpp \
|
|
|
|
net/except.cpp \
|
|
|
|
net/except.hpp \
|
|
|
|
net/types.cpp \
|
|
|
|
net/types.hpp \
|
|
|
|
net/socket.cpp \
|
|
|
|
net/socket.hpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
nocopy.hpp \
|
2012-05-23 17:01:30 +10:00
|
|
|
noise.cpp \
|
|
|
|
noise.hpp \
|
|
|
|
noise/basis.cpp \
|
|
|
|
noise/basis.hpp \
|
|
|
|
noise/fractal.cpp \
|
|
|
|
noise/fractal.hpp \
|
|
|
|
noise/lut.cpp \
|
|
|
|
noise/lut.hpp \
|
2013-02-26 18:31:14 +11:00
|
|
|
options.cpp \
|
|
|
|
options.hpp \
|
2014-07-07 15:20:21 +10:00
|
|
|
pascal.cpp \
|
|
|
|
pascal.hpp \
|
2015-02-19 13:28:36 +11:00
|
|
|
plane.cpp \
|
|
|
|
plane.hpp \
|
2012-04-30 11:50:07 +10:00
|
|
|
platform.hpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
point.cpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
point.hpp \
|
2014-02-18 15:28:28 +11:00
|
|
|
point.ipp \
|
2015-01-21 23:40:45 +11:00
|
|
|
polynomial.cpp \
|
|
|
|
polynomial.hpp \
|
2015-01-29 15:39:20 +11:00
|
|
|
polynomial.ipp \
|
2011-08-29 14:36:03 +10:00
|
|
|
pool.cpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
pool.hpp \
|
2012-08-22 16:12:26 +10:00
|
|
|
pool.ipp \
|
2012-05-03 18:09:06 +10:00
|
|
|
preprocessor.hpp \
|
2012-07-31 14:40:21 +10:00
|
|
|
quaternion.cpp \
|
|
|
|
quaternion.hpp \
|
2012-05-03 18:09:51 +10:00
|
|
|
raii.hpp \
|
2011-09-13 15:13:55 +10:00
|
|
|
random.cpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
random.hpp \
|
2012-05-22 14:13:07 +10:00
|
|
|
random.ipp \
|
2011-08-29 14:36:03 +10:00
|
|
|
range.cpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
range.hpp \
|
2015-02-20 17:19:40 +11:00
|
|
|
range.ipp \
|
2014-07-02 15:49:27 +10:00
|
|
|
rational.cpp \
|
|
|
|
rational.hpp \
|
2015-03-11 22:31:35 +11:00
|
|
|
ray.cpp \
|
|
|
|
ray.hpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
region.cpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
region.hpp \
|
2011-10-18 21:45:55 +11:00
|
|
|
si.cpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
signal.cpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
signal.hpp \
|
2013-08-06 17:43:52 +10:00
|
|
|
signal.ipp \
|
2011-10-26 21:44:59 +11:00
|
|
|
si.hpp \
|
2015-04-13 21:46:40 +10:00
|
|
|
sphere.cpp \
|
|
|
|
sphere.hpp \
|
2012-05-14 16:11:09 +10:00
|
|
|
stats.cpp \
|
|
|
|
stats.hpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
stream.cpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
stream.hpp \
|
2011-08-29 14:36:03 +10:00
|
|
|
string.cpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
string.hpp \
|
2014-05-26 17:11:07 +10:00
|
|
|
stringid.cpp \
|
|
|
|
stringid.hpp \
|
2015-04-13 16:43:49 +10:00
|
|
|
tap.cpp \
|
2015-01-30 16:47:28 +11:00
|
|
|
tap.hpp \
|
2015-04-13 16:43:49 +10:00
|
|
|
tap.ipp \
|
2011-08-29 15:28:11 +10:00
|
|
|
time.cpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
time.hpp \
|
2015-04-20 17:16:18 +10:00
|
|
|
tuple.cpp \
|
|
|
|
tuple.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
types.hpp \
|
2012-05-25 15:19:07 +10:00
|
|
|
types/bits.hpp \
|
|
|
|
types/casts.hpp \
|
2012-08-22 16:12:54 +10:00
|
|
|
types/comparator.hpp\
|
|
|
|
types/comparator.ipp\
|
2012-05-25 15:19:07 +10:00
|
|
|
types/string.cpp \
|
|
|
|
types/string.hpp \
|
|
|
|
types/traits.hpp \
|
2015-02-09 17:43:24 +11:00
|
|
|
uri.hpp \
|
|
|
|
uri.cpp \
|
2015-04-20 17:13:14 +10:00
|
|
|
variadic.cpp \
|
|
|
|
variadic.hpp \
|
|
|
|
variadic.ipp \
|
2011-10-18 21:45:55 +11:00
|
|
|
vector.cpp \
|
2012-04-26 14:54:59 +10:00
|
|
|
vector.hpp \
|
2011-10-26 21:44:59 +11:00
|
|
|
version.cpp \
|
2013-07-13 15:28:29 +10:00
|
|
|
version.hpp \
|
2015-02-11 16:18:43 +11:00
|
|
|
view.cpp \
|
|
|
|
view.hpp \
|
2013-07-13 15:28:29 +10:00
|
|
|
zlib.cpp \
|
|
|
|
zlib.hpp
|
2011-05-23 17:18:52 +10:00
|
|
|
|
2011-06-25 12:40:57 +10:00
|
|
|
|
2012-05-10 16:53:29 +10:00
|
|
|
if PLATFORM_LINUX
|
2014-12-19 18:28:50 +11:00
|
|
|
UTIL_FILES += \
|
|
|
|
backtrace_execinfo.cpp \
|
2015-01-30 16:47:28 +11:00
|
|
|
io_posix.cpp \
|
|
|
|
io_posix.hpp
|
2012-05-10 16:53:29 +10:00
|
|
|
endif
|
|
|
|
|
|
|
|
if PLATFORM_WIN32
|
2014-12-19 18:28:50 +11:00
|
|
|
UTIL_FILES += \
|
|
|
|
backtrace_null.cpp \
|
|
|
|
io_win32.cpp
|
2011-06-25 12:40:57 +10:00
|
|
|
endif
|
|
|
|
|
2014-05-09 13:09:36 +10:00
|
|
|
###############################################################################
|
|
|
|
## Local build rules
|
2011-06-21 21:42:20 +10:00
|
|
|
CLEANFILES = json.cpp version.cpp ip.cpp
|
2015-02-09 17:43:24 +11:00
|
|
|
EXTRA_DIST = json/flat.cpp.rl version.cpp.rl ip.cpp.rl uri.cpp.rl
|
2011-05-23 17:18:52 +10:00
|
|
|
|
|
|
|
RAGELFLAGS = -F1
|
|
|
|
SUFFIXES = .cpp .cpp.rl
|
|
|
|
.cpp.rl.cpp:
|
|
|
|
$(RAGEL) $(RAGELFLAGS) -C $< -o $(builddir)/$@
|
|
|
|
|
2014-05-09 13:09:36 +10:00
|
|
|
###############################################################################
|
|
|
|
## Library definition
|
2014-12-10 13:51:54 +11:00
|
|
|
lib_LIBRARIES = libutil.a
|
|
|
|
libutil_a_SOURCES = $(UTIL_FILES)
|
|
|
|
libutil_a_CXXFLAGS = $(AM_CXXFLAGS)
|
2012-04-12 14:12:25 +10:00
|
|
|
|
2014-05-09 13:08:50 +10:00
|
|
|
###############################################################################
|
|
|
|
## Utility programs
|
|
|
|
|
2014-05-09 14:44:40 +10:00
|
|
|
AM_DEFAULT_SOURCE_EXT = .cpp
|
2014-12-10 13:51:54 +11:00
|
|
|
|
|
|
|
AM_LDFLAGS = $(BOOST_LDFLAGS)
|
|
|
|
|
2014-05-09 12:58:33 +10:00
|
|
|
bin_PROGRAMS = \
|
2014-05-09 14:44:40 +10:00
|
|
|
tools/hash \
|
2014-05-09 12:58:33 +10:00
|
|
|
tools/json-clean \
|
|
|
|
tools/json-validate \
|
|
|
|
tools/json-schema
|
2014-12-10 13:51:54 +11:00
|
|
|
|
2015-02-13 18:02:09 +11:00
|
|
|
LDADD = $(top_builddir)/libutil.a $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(ZLIB_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
##-----------------------------------------------------------------------------
|
|
|
|
## Tests
|
|
|
|
|
|
|
|
AM_LDFLAGS += $(BOOST_LDFLAGS) $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB)
|
|
|
|
AM_CXXFLAGS += -I$(top_srcdir)
|
|
|
|
|
|
|
|
TEST_BIN = \
|
2015-04-09 14:05:01 +10:00
|
|
|
test/aabb \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/backtrace \
|
|
|
|
test/bezier \
|
|
|
|
test/bitwise \
|
|
|
|
test/checksum \
|
|
|
|
test/colour \
|
2015-05-06 21:20:17 +10:00
|
|
|
test/crypto/arc4 \
|
2015-05-06 23:49:45 +10:00
|
|
|
test/crypto/tea \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/extent \
|
|
|
|
test/fixed \
|
|
|
|
test/float \
|
2015-03-02 00:06:47 +11:00
|
|
|
test/hmac \
|
2015-03-02 02:54:54 +11:00
|
|
|
test/hotp \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/hton \
|
2015-04-20 17:51:00 +10:00
|
|
|
test/introspection \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/ip \
|
|
|
|
test/json_types \
|
2015-03-11 22:31:35 +11:00
|
|
|
test/ray \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/maths \
|
|
|
|
test/maths_matrix \
|
|
|
|
test/matrix \
|
|
|
|
test/md2 \
|
|
|
|
test/md4 \
|
|
|
|
test/md5 \
|
|
|
|
test/options \
|
|
|
|
test/point \
|
|
|
|
test/polynomial \
|
|
|
|
test/pool \
|
|
|
|
test/rand \
|
|
|
|
test/range \
|
|
|
|
test/region \
|
|
|
|
test/ripemd \
|
|
|
|
test/sha1 \
|
|
|
|
test/sha2 \
|
|
|
|
test/signal \
|
|
|
|
test/stringid \
|
2015-04-20 17:16:18 +10:00
|
|
|
test/tuple \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/uri \
|
2015-04-02 14:57:30 +11:00
|
|
|
test/vector \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/version
|
|
|
|
|
|
|
|
|
|
|
|
if PLATFORM_WIN32
|
|
|
|
test_hton_LDFLAGS = -lws2_32
|
|
|
|
endif
|
|
|
|
|
2015-04-13 16:45:56 +10:00
|
|
|
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh
|
|
|
|
TESTS = $(top_builddir)/test/json-parse $(top_builddir)/test/json-schema $(TEST_BIN)
|
2015-02-13 18:02:09 +11:00
|
|
|
check_PROGRAMS = $(TEST_BIN)
|
2015-04-13 16:45:56 +10:00
|
|
|
EXTRA_DIST += test/json test/json-parse test/json-schema
|