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
|
|
|
|
|
2015-06-01 16:19:24 +10:00
|
|
|
UTIL_FILES = \
|
|
|
|
backtrace.hpp \
|
|
|
|
bezier.cpp \
|
|
|
|
bezier.hpp \
|
|
|
|
bitwise.cpp \
|
|
|
|
bitwise.hpp \
|
2015-06-10 21:28:52 +10:00
|
|
|
cmdopt.cpp \
|
|
|
|
cmdopt.hpp \
|
|
|
|
cmdopt.ipp \
|
2015-06-01 16:19:24 +10:00
|
|
|
colour.cpp \
|
|
|
|
colour.hpp \
|
|
|
|
colour.ipp \
|
|
|
|
coord/base.hpp \
|
|
|
|
coord.hpp \
|
|
|
|
coord/init.hpp \
|
|
|
|
coord/names.hpp \
|
|
|
|
coord/ops.hpp \
|
|
|
|
coord/store.hpp \
|
|
|
|
crypto/arc4.cpp \
|
|
|
|
crypto/arc4.hpp \
|
|
|
|
crypto/tea.cpp \
|
|
|
|
crypto/tea.hpp \
|
|
|
|
crypto/xtea.cpp \
|
|
|
|
crypto/xtea.hpp \
|
|
|
|
crypto/xxtea.cpp \
|
|
|
|
crypto/xxtea.hpp \
|
|
|
|
debug.cpp \
|
|
|
|
debug.hpp \
|
|
|
|
endian.cpp \
|
|
|
|
endian.hpp \
|
|
|
|
except.cpp \
|
|
|
|
except.hpp \
|
|
|
|
exe.cpp \
|
|
|
|
exe.hpp \
|
|
|
|
extent.cpp \
|
|
|
|
extent.hpp \
|
|
|
|
extent.ipp \
|
|
|
|
fixed.cpp \
|
|
|
|
fixed.hpp \
|
|
|
|
float.cpp \
|
|
|
|
float.hpp \
|
2015-07-21 01:37:45 +10:00
|
|
|
format.cpp \
|
|
|
|
format.hpp \
|
|
|
|
format.ipp \
|
2015-06-01 16:19:24 +10:00
|
|
|
fourcc.cpp \
|
|
|
|
fourcc.hpp \
|
2015-10-13 18:19:47 +11:00
|
|
|
geom/fwd.hpp \
|
|
|
|
geom/aabb.cpp \
|
|
|
|
geom/aabb.hpp \
|
|
|
|
geom/iostream.cpp \
|
|
|
|
geom/iostream.hpp \
|
|
|
|
geom/plane.cpp \
|
|
|
|
geom/plane.hpp \
|
|
|
|
geom/ray.cpp \
|
|
|
|
geom/ray.hpp \
|
|
|
|
geom/sphere.cpp \
|
|
|
|
geom/sphere.hpp \
|
2015-06-01 16:19:24 +10:00
|
|
|
guid.cpp \
|
|
|
|
guid.hpp \
|
|
|
|
hash.hpp \
|
|
|
|
hash/adler.cpp \
|
|
|
|
hash/adler.hpp \
|
|
|
|
hash/bsdsum.cpp \
|
|
|
|
hash/bsdsum.hpp \
|
|
|
|
hash/crc.cpp \
|
|
|
|
hash/crc.hpp \
|
|
|
|
hash/fasthash.cpp \
|
2015-09-29 17:40:02 +10:00
|
|
|
hash/fasthash.hpp \
|
2015-06-01 16:19:24 +10:00
|
|
|
hash/fletcher.hpp \
|
2015-06-02 21:24:29 +10:00
|
|
|
hash/fnv1a.cpp \
|
|
|
|
hash/fnv1a.hpp \
|
2015-06-01 16:19:24 +10:00
|
|
|
hash/hmac.cpp \
|
|
|
|
hash/hmac.hpp \
|
|
|
|
hash/hotp.cpp \
|
|
|
|
hash/hotp.hpp \
|
|
|
|
hash/md2.cpp \
|
|
|
|
hash/md2.hpp \
|
|
|
|
hash/md4.cpp \
|
|
|
|
hash/md4.hpp \
|
|
|
|
hash/md5.cpp \
|
|
|
|
hash/md5.hpp \
|
2015-05-20 14:47:36 +10:00
|
|
|
hash/murmur/common.cpp \
|
|
|
|
hash/murmur/common.hpp \
|
2015-06-01 16:19:24 +10:00
|
|
|
hash/murmur.hpp \
|
2015-05-20 14:47:36 +10:00
|
|
|
hash/murmur/murmur1.cpp \
|
|
|
|
hash/murmur/murmur1.hpp \
|
|
|
|
hash/murmur/murmur2.cpp \
|
|
|
|
hash/murmur/murmur2.hpp \
|
|
|
|
hash/murmur/murmur3.cpp \
|
|
|
|
hash/murmur/murmur3.hpp \
|
2015-06-01 16:19:24 +10:00
|
|
|
hash/pbkdf1.cpp \
|
|
|
|
hash/pbkdf1.hpp \
|
|
|
|
hash/pbkdf2.cpp \
|
|
|
|
hash/pbkdf2.hpp \
|
|
|
|
hash/ripemd.cpp \
|
|
|
|
hash/ripemd.hpp \
|
|
|
|
hash/sha1.cpp \
|
|
|
|
hash/sha1.hpp \
|
|
|
|
hash/sha2.cpp \
|
|
|
|
hash/sha2.hpp \
|
2015-06-02 21:11:57 +10:00
|
|
|
hash/wang.hpp \
|
|
|
|
hash/wang.ipp \
|
2015-06-01 16:19:24 +10:00
|
|
|
image.cpp \
|
|
|
|
image.hpp \
|
2015-06-04 14:34:13 +10:00
|
|
|
image.ipp \
|
2015-06-01 16:19:24 +10:00
|
|
|
introspection.cpp \
|
|
|
|
introspection.hpp \
|
|
|
|
io.cpp \
|
|
|
|
io.hpp \
|
|
|
|
io.ipp \
|
|
|
|
ip.cpp \
|
|
|
|
ip.hpp \
|
|
|
|
iterator.hpp \
|
|
|
|
json/fwd.hpp \
|
|
|
|
json/except.cpp \
|
|
|
|
json/except.hpp \
|
|
|
|
json/flat.cpp \
|
|
|
|
json/flat.hpp \
|
|
|
|
json/schema.cpp \
|
|
|
|
json/schema.hpp \
|
|
|
|
json/tree.cpp \
|
|
|
|
json/tree.hpp \
|
2015-08-10 15:45:56 +10:00
|
|
|
library.hpp \
|
2015-06-01 16:19:24 +10:00
|
|
|
log.cpp \
|
|
|
|
log.hpp \
|
|
|
|
log.ipp \
|
|
|
|
maths.cpp \
|
|
|
|
maths.hpp \
|
|
|
|
maths.ipp \
|
|
|
|
matrix.cpp \
|
|
|
|
matrix.hpp \
|
|
|
|
matrix.ipp \
|
|
|
|
memory.cpp \
|
|
|
|
memory.hpp \
|
|
|
|
net/address.cpp \
|
|
|
|
net/address.hpp \
|
|
|
|
net/except.cpp \
|
|
|
|
net/except.hpp \
|
|
|
|
net/socket.cpp \
|
|
|
|
net/socket.hpp \
|
|
|
|
net/types.cpp \
|
|
|
|
net/types.hpp \
|
2015-06-03 23:24:26 +10:00
|
|
|
netpbm.cpp \
|
|
|
|
netpbm.hpp \
|
2015-06-01 16:19:24 +10:00
|
|
|
nocopy.hpp \
|
|
|
|
noise.hpp \
|
2015-06-04 22:24:21 +10:00
|
|
|
noise.ipp \
|
2015-10-14 15:22:08 +11:00
|
|
|
noise/fwd.hpp \
|
2015-05-29 15:50:45 +10:00
|
|
|
noise/basis/constant.cpp \
|
|
|
|
noise/basis/constant.hpp \
|
|
|
|
noise/basis/constant.ipp \
|
2015-10-07 14:34:56 +11:00
|
|
|
noise/basis/gradient/uniform.hpp \
|
|
|
|
noise/basis/gradient/uniform.ipp \
|
|
|
|
noise/basis/gradient/exp.hpp \
|
|
|
|
noise/basis/gradient/exp.ipp \
|
2015-07-24 01:37:36 +10:00
|
|
|
noise/basis/patch.hpp \
|
|
|
|
noise/basis/patch.ipp \
|
2015-05-28 10:56:06 +10:00
|
|
|
noise/basis/perlin.hpp \
|
2015-06-01 18:42:10 +10:00
|
|
|
noise/basis/perlin.ipp \
|
2015-06-11 19:33:25 +10:00
|
|
|
noise/basis/runtime.cpp \
|
|
|
|
noise/basis/runtime.hpp \
|
2015-10-06 15:45:26 +11:00
|
|
|
noise/basis/type/distance.cpp \
|
|
|
|
noise/basis/type/distance.hpp \
|
|
|
|
noise/basis/type/gradient.hpp \
|
|
|
|
noise/basis/type/gradient.cpp \
|
2015-06-11 19:33:25 +10:00
|
|
|
noise/basis/value.hpp \
|
|
|
|
noise/basis/value.ipp \
|
2015-05-28 10:56:06 +10:00
|
|
|
noise/basis/worley.hpp \
|
2015-06-01 18:42:10 +10:00
|
|
|
noise/basis/worley.ipp \
|
2015-06-02 16:13:12 +10:00
|
|
|
noise/fractal/base.hpp \
|
|
|
|
noise/fractal/base.ipp \
|
2015-06-01 16:20:50 +10:00
|
|
|
noise/fractal/fbm.hpp \
|
2015-06-01 17:21:51 +10:00
|
|
|
noise/fractal/fbm.ipp \
|
2015-06-01 16:20:50 +10:00
|
|
|
noise/fractal/hetero.hpp \
|
2015-06-01 17:21:51 +10:00
|
|
|
noise/fractal/hetero.ipp \
|
2015-06-01 16:20:50 +10:00
|
|
|
noise/fractal/hmf.hpp \
|
2015-06-01 17:21:51 +10:00
|
|
|
noise/fractal/hmf.ipp \
|
2015-06-01 16:20:50 +10:00
|
|
|
noise/fractal/rmf.hpp \
|
2015-06-01 17:21:51 +10:00
|
|
|
noise/fractal/rmf.ipp \
|
2015-06-11 19:33:51 +10:00
|
|
|
noise/fractal/runtime.cpp \
|
|
|
|
noise/fractal/runtime.hpp \
|
2015-06-01 16:19:24 +10:00
|
|
|
noise/lerp.cpp \
|
|
|
|
noise/lerp.hpp \
|
|
|
|
noise/lut.cpp \
|
|
|
|
noise/lut.hpp \
|
2015-07-01 01:03:34 +10:00
|
|
|
noise/midpoint.cpp \
|
|
|
|
noise/midpoint.hpp \
|
2015-07-01 23:32:27 +10:00
|
|
|
noise/rand.hpp \
|
2015-10-06 21:19:17 +11:00
|
|
|
noise/rand/hash.hpp \
|
|
|
|
noise/rand/hash.ipp \
|
|
|
|
noise/rand/permute.cpp \
|
|
|
|
noise/rand/permute.hpp \
|
2015-10-14 15:22:08 +11:00
|
|
|
noise/rand/permute.ipp \
|
2015-06-02 20:31:25 +10:00
|
|
|
noise/turbulence.hpp \
|
|
|
|
noise/turbulence.ipp \
|
2015-06-01 16:19:24 +10:00
|
|
|
pascal.cpp \
|
|
|
|
pascal.hpp \
|
|
|
|
platform.hpp \
|
|
|
|
point.cpp \
|
|
|
|
point.hpp \
|
|
|
|
point.ipp \
|
|
|
|
polynomial.cpp \
|
|
|
|
polynomial.hpp \
|
|
|
|
polynomial.ipp \
|
|
|
|
pool.cpp \
|
|
|
|
pool.hpp \
|
|
|
|
pool.ipp \
|
|
|
|
preprocessor.hpp \
|
|
|
|
quaternion.cpp \
|
|
|
|
quaternion.hpp \
|
|
|
|
raii.hpp \
|
|
|
|
random.cpp \
|
|
|
|
random.hpp \
|
|
|
|
random.ipp \
|
|
|
|
range.cpp \
|
|
|
|
range.hpp \
|
|
|
|
range.ipp \
|
|
|
|
rational.cpp \
|
|
|
|
rational.hpp \
|
2015-09-21 16:35:48 +10:00
|
|
|
rational.ipp \
|
2015-06-01 16:19:24 +10:00
|
|
|
region.cpp \
|
|
|
|
region.hpp \
|
2015-09-21 15:33:58 +10:00
|
|
|
region.ipp \
|
2015-06-01 16:19:24 +10:00
|
|
|
si.cpp \
|
|
|
|
signal.cpp \
|
|
|
|
signal.hpp \
|
|
|
|
signal.ipp \
|
|
|
|
si.hpp \
|
|
|
|
stats.cpp \
|
|
|
|
stats.hpp \
|
|
|
|
stream.cpp \
|
|
|
|
stream.hpp \
|
|
|
|
string.cpp \
|
|
|
|
string.hpp \
|
|
|
|
stringid.cpp \
|
|
|
|
stringid.hpp \
|
|
|
|
tap.cpp \
|
|
|
|
tap.hpp \
|
|
|
|
tap.ipp \
|
2015-08-10 15:48:30 +10:00
|
|
|
threads/barrier.hpp \
|
|
|
|
threads/mutex.hpp \
|
2015-08-28 21:09:38 +10:00
|
|
|
threads/condition.hpp \
|
2015-08-10 15:48:30 +10:00
|
|
|
threads/semaphore.hpp \
|
2015-08-28 21:09:38 +10:00
|
|
|
threads/spinlock.cpp \
|
2015-08-10 15:48:30 +10:00
|
|
|
threads/spinlock.hpp \
|
|
|
|
threads/thread.hpp \
|
2015-06-01 16:19:24 +10:00
|
|
|
time.cpp \
|
|
|
|
time.hpp \
|
|
|
|
tuple.cpp \
|
|
|
|
tuple.hpp \
|
|
|
|
types/bits.hpp \
|
|
|
|
types/casts.hpp \
|
|
|
|
types/comparator.hpp \
|
|
|
|
types/comparator.ipp \
|
|
|
|
types.hpp \
|
|
|
|
types/string.cpp \
|
|
|
|
types/string.hpp \
|
|
|
|
types/traits.hpp \
|
|
|
|
uri.cpp \
|
|
|
|
uri.hpp \
|
|
|
|
variadic.cpp \
|
|
|
|
variadic.hpp \
|
|
|
|
variadic.ipp \
|
|
|
|
vector.cpp \
|
|
|
|
vector.hpp \
|
2015-07-21 01:40:53 +10:00
|
|
|
vector.ipp \
|
2015-06-01 16:19:24 +10:00
|
|
|
version.cpp \
|
|
|
|
version.hpp \
|
2015-09-22 18:31:47 +10:00
|
|
|
view.ipp \
|
2015-06-30 22:10:15 +10:00
|
|
|
view.hpp
|
2011-05-23 17:18:52 +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 \
|
2015-07-23 14:13:09 +10:00
|
|
|
io_posix.hpp \
|
2015-08-10 15:45:56 +10:00
|
|
|
library_posix.hpp \
|
|
|
|
library_posix.cpp \
|
2015-08-10 15:46:13 +10:00
|
|
|
posix/dir.hpp \
|
|
|
|
posix/dir.cpp \
|
2015-08-10 15:48:30 +10:00
|
|
|
threads/barrier_posix.cpp \
|
|
|
|
threads/condition_posix.cpp \
|
|
|
|
threads/mutex_posix.cpp \
|
|
|
|
threads/semaphore_posix.cpp \
|
|
|
|
threads/spinlock_posix.cpp \
|
|
|
|
threads/thread_posix.cpp \
|
2015-08-28 21:09:38 +10:00
|
|
|
threads/thread_posix.hpp \
|
|
|
|
threads/thread_posix.ipp \
|
2015-07-23 14:13:09 +10:00
|
|
|
time_posix.cpp
|
2015-08-28 21:09:38 +10:00
|
|
|
|
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 \
|
2015-07-23 14:13:09 +10:00
|
|
|
io_win32.cpp \
|
2015-08-10 15:45:56 +10:00
|
|
|
library_win32.hpp \
|
|
|
|
library_win32.cpp \
|
2015-08-10 15:48:30 +10:00
|
|
|
threads/mutex_win32.cpp \
|
|
|
|
threads/mutex_win32.hpp \
|
|
|
|
threads/thread_win32.cpp \
|
2015-08-28 21:09:38 +10:00
|
|
|
threads/thread_win32.hpp \
|
2015-08-10 15:47:30 +10:00
|
|
|
time_win32.cpp \
|
|
|
|
win32/registry.hpp \
|
|
|
|
win32/registry.cpp
|
2011-06-25 12:40:57 +10:00
|
|
|
endif
|
|
|
|
|
2014-05-09 13:09:36 +10:00
|
|
|
###############################################################################
|
|
|
|
## Local build rules
|
2015-06-30 22:10:25 +10:00
|
|
|
CLEANFILES = json.cpp version.cpp ip.cpp uri.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 = \
|
|
|
|
tools/json-clean \
|
|
|
|
tools/json-validate \
|
2015-05-18 14:11:08 +10:00
|
|
|
tools/json-schema \
|
|
|
|
tools/hash \
|
|
|
|
tools/noise
|
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 = \
|
|
|
|
test/backtrace \
|
|
|
|
test/bezier \
|
|
|
|
test/bitwise \
|
|
|
|
test/checksum \
|
2015-06-30 22:09:35 +10:00
|
|
|
test/cmdopt \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/colour \
|
2015-09-21 15:27:36 +10:00
|
|
|
test/coord \
|
2015-05-06 21:20:17 +10:00
|
|
|
test/crypto/arc4 \
|
2015-05-06 23:49:45 +10:00
|
|
|
test/crypto/tea \
|
2015-05-07 00:18:01 +10:00
|
|
|
test/crypto/xtea \
|
2015-05-15 18:27:24 +10:00
|
|
|
test/crypto/xxtea \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/extent \
|
|
|
|
test/fixed \
|
|
|
|
test/float \
|
2015-07-21 01:37:45 +10:00
|
|
|
test/format \
|
2015-10-13 18:19:47 +11:00
|
|
|
test/geom/aabb \
|
|
|
|
test/geom/ray \
|
2015-05-20 14:47:36 +10:00
|
|
|
test/hash/murmur \
|
2015-05-28 12:17:25 +10:00
|
|
|
test/hash/fasthash \
|
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-07-23 21:19:15 +10:00
|
|
|
test/image \
|
2015-04-20 17:51:00 +10:00
|
|
|
test/introspection \
|
2015-02-13 18:02:09 +11:00
|
|
|
test/ip \
|
|
|
|
test/json_types \
|
|
|
|
test/maths \
|
|
|
|
test/matrix \
|
|
|
|
test/md2 \
|
|
|
|
test/md4 \
|
|
|
|
test/md5 \
|
|
|
|
test/point \
|
|
|
|
test/polynomial \
|
|
|
|
test/pool \
|
|
|
|
test/rand \
|
|
|
|
test/range \
|
2015-07-13 16:27:07 +10:00
|
|
|
test/rational \
|
2015-02-13 18:02:09 +11:00
|
|
|
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
|