util: tests: vma test depends on C++11 support
[mesa.git] / src / util / Makefile.am
1 # Copyright © 2014 Intel Corporation
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 # IN THE SOFTWARE.
21
22 SUBDIRS = . \
23 xmlpool \
24 tests/hash_table \
25 tests/string_buffer
26
27 if HAVE_STD_CXX11
28 SUBDIRS += tests/vma
29 endif
30
31 include Makefile.sources
32
33 noinst_LTLIBRARIES = \
34 libmesautil.la \
35 libxmlconfig.la
36
37 AM_CPPFLAGS = \
38 $(PTHREAD_CFLAGS) \
39 -I$(top_srcdir)/include
40
41 libmesautil_la_CPPFLAGS = \
42 $(DEFINES) \
43 -I$(top_srcdir)/include \
44 -I$(top_srcdir)/src \
45 -I$(top_srcdir)/src/mapi \
46 -I$(top_srcdir)/src/mesa \
47 -I$(top_srcdir)/src/gallium/include \
48 -I$(top_srcdir)/src/gallium/auxiliary \
49 $(VISIBILITY_CFLAGS) \
50 $(MSVC2013_COMPAT_CFLAGS) \
51 $(ZLIB_CFLAGS)
52
53 libmesautil_la_SOURCES = \
54 $(MESA_UTIL_FILES) \
55 $(MESA_UTIL_GENERATED_FILES)
56
57 libmesautil_la_LIBADD = \
58 $(PTHREAD_LIBS) \
59 $(CLOCK_LIB) \
60 $(ZLIB_LIBS) \
61 $(LIBATOMIC_LIBS)
62
63 libxmlconfig_la_SOURCES = $(XMLCONFIG_FILES)
64 libxmlconfig_la_CFLAGS = \
65 $(DEFINES) \
66 -I$(top_srcdir)/include \
67 -I$(top_srcdir)/src \
68 -DSYSCONFDIR=\"$(sysconfdir)\" \
69 $(VISIBILITY_CFLAGS) \
70 $(EXPAT_CFLAGS)
71 libxmlconfig_la_LIBADD = $(EXPAT_LIBS) -lm
72
73 sysconf_DATA = drirc
74
75 u_atomic_test_LDADD = libmesautil.la
76 roundeven_test_LDADD = -lm
77 mesa_sha1_test_LDADD = libmesautil.la
78
79 check_PROGRAMS = u_atomic_test roundeven_test mesa-sha1_test
80 TESTS = $(check_PROGRAMS)
81
82 BUILT_SOURCES = $(MESA_UTIL_GENERATED_FILES)
83 CLEANFILES = $(BUILT_SOURCES)
84 EXTRA_DIST = \
85 drirc \
86 format_srgb.py \
87 merge_driinfo.py \
88 SConscript \
89 xmlpool.h \
90 sha1/README \
91 meson.build
92
93 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
94
95 format_srgb.c: format_srgb.py
96 $(PYTHON_GEN) $(srcdir)/format_srgb.py > $@