OSDN Git Service

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