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