5ef2d4f55eacc470a7a904987d9caa511248bfec
[mesa.git] / src / Makefile.am
1 # Copyright © 2013 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 .PHONY: git_sha1.h.tmp
23 git_sha1.h.tmp:
24 @$(PYTHON2) $(top_srcdir)/bin/git_sha1_gen.py > $@
25
26 git_sha1.h: git_sha1.h.tmp
27 @echo "updating git_sha1.h"
28 @if ! cmp -s git_sha1.h.tmp git_sha1.h; then \
29 mv git_sha1.h.tmp git_sha1.h ;\
30 else \
31 rm git_sha1.h.tmp ;\
32 fi
33
34 BUILT_SOURCES = git_sha1.h
35 CLEANFILES = $(BUILT_SOURCES)
36 EXTRA_DIST =
37
38 SUBDIRS = . gtest util mapi/glapi/gen mapi
39
40 if HAVE_OPENGL
41 gldir = $(includedir)/GL
42 gl_HEADERS = \
43 $(top_srcdir)/include/GL/gl.h \
44 $(top_srcdir)/include/GL/glext.h \
45 $(top_srcdir)/include/GL/glcorearb.h \
46 $(top_srcdir)/include/GL/gl_mangle.h
47 endif
48
49 if HAVE_GLX
50 glxdir = $(includedir)/GL
51 glx_HEADERS = \
52 $(top_srcdir)/include/GL/glx.h \
53 $(top_srcdir)/include/GL/glxext.h \
54 $(top_srcdir)/include/GL/glx_mangle.h
55 pkgconfigdir = $(libdir)/pkgconfig
56 pkgconfig_DATA = mesa/gl.pc
57 endif
58
59 if HAVE_COMMON_OSMESA
60 osmesadir = $(includedir)/GL
61 osmesa_HEADERS = $(top_srcdir)/include/GL/osmesa.h
62 endif
63
64 # include only conditionally ?
65 SUBDIRS += compiler
66
67 ## Optionally required by GBM, EGL
68 if HAVE_PLATFORM_WAYLAND
69 SUBDIRS += egl/wayland/wayland-drm
70 endif
71
72 if HAVE_VULKAN_COMMON
73 SUBDIRS += vulkan
74 endif
75
76 EXTRA_DIST += vulkan/registry/vk.xml
77 EXTRA_DIST += vulkan/registry/vk_android_native_buffer.xml
78
79 if HAVE_AMD_DRIVERS
80 SUBDIRS += amd
81 endif
82
83 if HAVE_INTEL_DRIVERS
84 SUBDIRS += intel
85 endif
86
87 if HAVE_BROADCOM_DRIVERS
88 SUBDIRS += broadcom
89 endif
90
91 if NEED_OPENGL_COMMON
92 SUBDIRS += mesa
93 endif
94
95 SUBDIRS += loader
96
97 if HAVE_DRI_GLX
98 SUBDIRS += glx
99 endif
100
101 ## Optionally required by EGL (aka PLATFORM_GBM)
102 if HAVE_GBM
103 SUBDIRS += gbm
104 endif
105
106 ## Optionally required by EGL
107 if HAVE_PLATFORM_WAYLAND
108 SUBDIRS += egl/wayland/wayland-egl
109 endif
110
111 if HAVE_EGL
112 SUBDIRS += egl
113 endif
114
115 # Requires wayland-drm
116 if HAVE_RADEON_VULKAN
117 SUBDIRS += amd/vulkan
118 endif
119
120 if HAVE_GALLIUM
121 SUBDIRS += gallium
122 endif
123
124 EXTRA_DIST += \
125 getopt hgl SConscript \
126 $(top_srcdir)/include/GL/mesa_glinterop.h
127
128 AM_CFLAGS = $(VISIBILITY_CFLAGS)
129 AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
130
131 AM_CPPFLAGS = \
132 -I$(top_srcdir)/include/ \
133 -I$(top_srcdir)/src/mapi/ \
134 -I$(top_srcdir)/src/mesa/ \
135 -I$(top_srcdir)/src/gallium/include \
136 -I$(top_srcdir)/src/gallium/auxiliary \
137 $(DEFINES)
138
139 noinst_LTLIBRARIES = libglsl_util.la
140
141 libglsl_util_la_SOURCES = \
142 mesa/main/extensions_table.c \
143 mesa/main/imports.c \
144 mesa/program/prog_parameter.c \
145 mesa/program/symbol_table.c \
146 mesa/program/dummy_errors.c