OSDN Git Service

mesa: Report core FBO incompleteness cases through GL_ARB_debug_output.
[android-x86/external-mesa.git] / src / mesa / Makefile.am
1 # Copyright © 2012 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 if NEED_LIBDRICORE
23 DRICORE_SUBDIR = libdricore
24 endif
25
26 SUBDIRS = program x86 x86-64 . $(DRICORE_SUBDIR)
27
28 if HAVE_X11_DRIVER
29 SUBDIRS += drivers/x11
30 endif
31
32 if HAVE_DRI
33 SUBDIRS += drivers/dri
34 endif
35
36 if HAVE_OSMESA
37 SUBDIRS += drivers/osmesa
38 endif
39
40 gldir = $(includedir)/GL
41 gl_HEADERS = $(top_srcdir)/include/GL/*.h
42
43 .PHONY: main/git_sha1.h.tmp
44 main/git_sha1.h.tmp:
45         @touch main/git_sha1.h.tmp
46         @if test -d ../../.git; then \
47                 if which git > /dev/null; then \
48                     git log -n 1 --oneline | \
49                         sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
50                         > main/git_sha1.h.tmp ; \
51                 fi \
52         fi
53
54 main/git_sha1.h: main/git_sha1.h.tmp
55         @echo "updating main/git_sha1.h"
56         @if ! cmp -s main/git_sha1.h.tmp main/git_sha1.h; then \
57                 mv main/git_sha1.h.tmp main/git_sha1.h ;\
58         else \
59                 rm main/git_sha1.h.tmp ;\
60         fi
61
62 # include glapi_gen.mk for generating glapi headers for GLES
63 GLAPI = $(top_srcdir)/src/mapi/glapi/gen
64 include $(GLAPI)/glapi_gen.mk
65
66 BUILT_SOURCES = \
67         main/git_sha1.h \
68         main/get_hash.h
69 CLEANFILES = \
70         $(BUILT_SOURCES) \
71         git_sha1.h.tmp
72
73 GET_HASH_GEN = main/get_hash_generator.py
74
75 main/get_hash.h: $(GLAPI)/gl_and_es_API.xml main/get_hash_params.py     \
76                  $(GET_HASH_GEN) Makefile
77         $(AM_V_GEN)set -e;                                              \
78         $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/$(GET_HASH_GEN)            \
79                 -f $< > $@.tmp;                                         \
80         mv $@.tmp $@;
81
82 noinst_LTLIBRARIES =
83 if NEED_LIBMESA
84 noinst_LTLIBRARIES += libmesa.la
85 else
86 check_LTLIBRARIES = libmesa.la
87 endif
88 if HAVE_GALLIUM
89 noinst_LTLIBRARIES += libmesagallium.la
90 endif
91
92 SRCDIR = $(top_srcdir)/src/mesa/
93 BUILDDIR = $(top_builddir)/src/mesa/
94 include Makefile.sources
95
96 AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
97 AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS)
98 AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS)
99
100 MESA_ASM_FILES_FOR_ARCH =
101
102 if HAVE_X86_ASM
103 MESA_ASM_FILES_FOR_ARCH += $(X86_FILES)
104 AM_CPPFLAGS += \
105         -I$(top_builddir)/src/mesa/x86 \
106         -I$(top_srcdir)/src/mesa/x86
107 endif
108 if HAVE_X86_64_ASM
109 MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES)
110 AM_CPPFLAGS += \
111         -I$(top_builddir)/src/mesa/x86-64 \
112         -I$(top_srcdir)/src/mesa/x86-64
113 endif
114 if HAVE_SPARC_ASM
115 MESA_ASM_FILES_FOR_ARCH += $(SPARC_FILES)
116 AM_CPPFLAGS += \
117         -I$(top_builddir)/src/mesa/sparc \
118         -I$(top_srcdir)/src/mesa/sparc
119 endif
120
121 libmesa_la_SOURCES = \
122         $(MESA_FILES) \
123         $(MESA_ASM_FILES_FOR_ARCH)
124
125 libmesa_la_LIBADD = \
126         $(top_builddir)/src/glsl/libglsl.la \
127         $(top_builddir)/src/mesa/program/libprogram.la \
128         $()
129 libmesa_la_LDFLAGS =
130
131 libmesagallium_la_SOURCES = \
132         $(MESA_GALLIUM_FILES) \
133         $(MESA_ASM_FILES_FOR_ARCH)
134
135 libmesagallium_la_LIBADD = \
136         $(top_builddir)/src/glsl/libglsl.la \
137         $(top_builddir)/src/mesa/program/libprogram.la \
138         $()
139
140 pkgconfigdir = $(libdir)/pkgconfig
141 pkgconfig_DATA = gl.pc
142
143 # Emacs tags
144 tags:
145         etags `find . -name \*.[ch]` $(top_srcdir)/include/GL/*.h