radeonsi: add always-inline pass to si_llvm_finalize_module
[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 @# Don't assume that $(top_srcdir)/.git is a directory. It may be
25 @# a gitlink file if $(top_srcdir) is a submodule checkout or a linked
26 @# worktree.
27 @# If we are building from a release tarball copy the bundled header.
28 @touch git_sha1.h.tmp
29 @if test -e $(top_srcdir)/.git; then \
30 if which git > /dev/null; then \
31 git --git-dir=$(top_srcdir)/.git log -n 1 --oneline | \
32 sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
33 > git_sha1.h.tmp ; \
34 fi \
35 fi
36
37 git_sha1.h: git_sha1.h.tmp
38 @echo "updating git_sha1.h"
39 @if ! cmp -s git_sha1.h.tmp git_sha1.h; then \
40 mv git_sha1.h.tmp git_sha1.h ;\
41 else \
42 rm git_sha1.h.tmp ;\
43 fi
44
45 BUILT_SOURCES = git_sha1.h
46 CLEANFILES = $(BUILT_SOURCES)
47
48 SUBDIRS = . gtest util mapi/glapi/gen mapi
49
50 if HAVE_OPENGL
51 gldir = $(includedir)/GL
52 gl_HEADERS = \
53 $(top_srcdir)/include/GL/gl.h \
54 $(top_srcdir)/include/GL/glext.h \
55 $(top_srcdir)/include/GL/glcorearb.h \
56 $(top_srcdir)/include/GL/gl_mangle.h
57 endif
58
59 if HAVE_GLX
60 glxdir = $(includedir)/GL
61 glx_HEADERS = \
62 $(top_srcdir)/include/GL/glx.h \
63 $(top_srcdir)/include/GL/glxext.h \
64 $(top_srcdir)/include/GL/glx_mangle.h
65 pkgconfigdir = $(libdir)/pkgconfig
66 pkgconfig_DATA = mesa/gl.pc
67 endif
68
69 if HAVE_COMMON_OSMESA
70 osmesadir = $(includedir)/GL
71 osmesa_HEADERS = $(top_srcdir)/include/GL/osmesa.h
72 endif
73
74 # include only conditionally ?
75 SUBDIRS += compiler
76
77 if HAVE_AMD_DRIVERS
78 SUBDIRS += amd
79 endif
80
81 if NEED_RADEON_LLVM
82 SUBDIRS += amd/common
83 endif
84
85 if HAVE_INTEL_DRIVERS
86 SUBDIRS += intel
87 endif
88
89 if NEED_OPENGL_COMMON
90 SUBDIRS += mesa
91 endif
92
93 SUBDIRS += loader
94
95 if HAVE_DRI_GLX
96 SUBDIRS += glx
97 endif
98
99 ## Optionally required by GBM and EGL
100 if HAVE_PLATFORM_WAYLAND
101 SUBDIRS += egl/wayland/wayland-drm
102 endif
103
104 ## Optionally required by EGL (aka PLATFORM_GBM)
105 if HAVE_GBM
106 SUBDIRS += gbm
107 endif
108
109 ## Optionally required by EGL
110 if HAVE_PLATFORM_WAYLAND
111 SUBDIRS += egl/wayland/wayland-egl
112 endif
113
114 if HAVE_EGL
115 SUBDIRS += egl
116 endif
117
118 if HAVE_INTEL_DRIVERS
119 SUBDIRS += intel/tools
120 endif
121
122 if HAVE_VULKAN_COMMON
123 SUBDIRS += vulkan/wsi
124 endif
125
126 ## Requires the i965 compiler (part of mesa) and wayland-drm
127 if HAVE_INTEL_VULKAN
128 SUBDIRS += intel/vulkan
129 endif
130
131 # Requires wayland-drm
132 if HAVE_RADEON_VULKAN
133 SUBDIRS += amd/vulkan
134 endif
135
136 if HAVE_GALLIUM
137 SUBDIRS += gallium
138 endif
139
140 EXTRA_DIST = \
141 getopt hgl SConscript \
142 $(top_srcdir)/include/GL/mesa_glinterop.h
143
144 AM_CFLAGS = $(VISIBILITY_CFLAGS)
145 AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
146
147 AM_CPPFLAGS = \
148 -I$(top_srcdir)/include/ \
149 -I$(top_srcdir)/src/mapi/ \
150 -I$(top_srcdir)/src/mesa/ \
151 -I$(top_srcdir)/src/gallium/include \
152 -I$(top_srcdir)/src/gallium/auxiliary \
153 $(DEFINES)
154
155 noinst_LTLIBRARIES = libglsl_util.la
156
157 libglsl_util_la_SOURCES = \
158 mesa/main/extensions_table.c \
159 mesa/main/imports.c \
160 mesa/program/prog_parameter.c \
161 mesa/program/symbol_table.c \
162 mesa/program/dummy_errors.c