8d8c1566e1ecfd5fd7154293756247e6c31567e0
[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 tests/set
27
28 if HAVE_STD_CXX11
29 SUBDIRS += tests/vma
30 endif
31
32 include Makefile.sources
33
34 noinst_LTLIBRARIES = \
35 libmesautil.la \
36 libxmlconfig.la
37
38 AM_CPPFLAGS = \
39 $(PTHREAD_CFLAGS) \
40 -I$(top_srcdir)/include
41
42 libmesautil_la_CPPFLAGS = \
43 $(DEFINES) \
44 -I$(top_srcdir)/include \
45 -I$(top_srcdir)/src \
46 -I$(top_srcdir)/src/mapi \
47 -I$(top_srcdir)/src/mesa \
48 -I$(top_srcdir)/src/gallium/include \
49 -I$(top_srcdir)/src/gallium/auxiliary \
50 $(VISIBILITY_CFLAGS) \
51 $(MSVC2013_COMPAT_CFLAGS) \
52 $(ZLIB_CFLAGS)
53
54 libmesautil_la_SOURCES = \
55 $(MESA_UTIL_FILES) \
56 $(MESA_UTIL_GENERATED_FILES)
57
58 libmesautil_la_LIBADD = \
59 $(PTHREAD_LIBS) \
60 $(CLOCK_LIB) \
61 $(ZLIB_LIBS) \
62 $(LIBATOMIC_LIBS)
63
64 libxmlconfig_la_SOURCES = $(XMLCONFIG_FILES)
65 libxmlconfig_la_CFLAGS = \
66 $(DEFINES) \
67 -I$(top_srcdir)/include \
68 -I$(top_srcdir)/src \
69 -DSYSCONFDIR=\"$(sysconfdir)\" \
70 -DDATADIR=\"$(datadir)\" \
71 $(VISIBILITY_CFLAGS) \
72 $(EXPAT_CFLAGS)
73 libxmlconfig_la_LIBADD = $(EXPAT_LIBS) -lm
74
75 sysconf_DATA = drirc
76
77 u_atomic_test_LDADD = libmesautil.la
78 roundeven_test_LDADD = -lm
79 mesa_sha1_test_LDADD = libmesautil.la
80
81 check_PROGRAMS = u_atomic_test roundeven_test mesa-sha1_test
82 TESTS = $(check_PROGRAMS)
83
84 BUILT_SOURCES = $(MESA_UTIL_GENERATED_FILES)
85 CLEANFILES = $(BUILT_SOURCES)
86 EXTRA_DIST = \
87 drirc \
88 format_srgb.py \
89 merge_driinfo.py \
90 SConscript \
91 xmlpool.h \
92 sha1/README \
93 meson.build
94
95 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
96
97 format_srgb.c: format_srgb.py
98 $(PYTHON_GEN) $(srcdir)/format_srgb.py > $@