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