Matt Turner | 691c304 | 2013-01-18 23:43:05 -0800 | [diff] [blame] | 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. |
Eric Anholt | 7edbf4b | 2012-05-15 10:21:31 -0700 | [diff] [blame] | 21 | |
Emil Velikov | af2637a | 2016-05-31 14:46:19 +0100 | [diff] [blame] | 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. |
Emil Velikov | 22e9357 | 2016-06-21 18:05:23 +0100 | [diff] [blame] | 28 | @touch git_sha1.h.tmp |
Emil Velikov | 4cd9cd6 | 2016-05-30 12:09:04 +0100 | [diff] [blame] | 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"/' \ |
Emil Velikov | af2637a | 2016-05-31 14:46:19 +0100 | [diff] [blame] | 33 | > git_sha1.h.tmp ; \ |
Emil Velikov | 4cd9cd6 | 2016-05-30 12:09:04 +0100 | [diff] [blame] | 34 | fi \ |
Emil Velikov | af2637a | 2016-05-31 14:46:19 +0100 | [diff] [blame] | 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 ;\ |
Emil Velikov | 4cd9cd6 | 2016-05-30 12:09:04 +0100 | [diff] [blame] | 43 | fi |
| 44 | |
Emil Velikov | 4cd9cd6 | 2016-05-30 12:09:04 +0100 | [diff] [blame] | 45 | BUILT_SOURCES = git_sha1.h |
Emil Velikov | 22e9357 | 2016-06-21 18:05:23 +0100 | [diff] [blame] | 46 | CLEANFILES = $(BUILT_SOURCES) |
Lionel Landwerlin | dbd677e | 2017-01-12 17:01:44 +0000 | [diff] [blame] | 47 | EXTRA_DIST = |
Emil Velikov | b7f7ec7 | 2016-06-06 19:39:40 +0100 | [diff] [blame] | 48 | |
Matt Turner | 145919b | 2014-12-18 13:33:29 -0800 | [diff] [blame] | 49 | SUBDIRS = . gtest util mapi/glapi/gen mapi |
Matt Turner | 691c304 | 2013-01-18 23:43:05 -0800 | [diff] [blame] | 50 | |
Chuck Atkins | a89faa2 | 2016-10-04 11:05:30 -0400 | [diff] [blame] | 51 | if HAVE_OPENGL |
| 52 | gldir = $(includedir)/GL |
| 53 | gl_HEADERS = \ |
| 54 | $(top_srcdir)/include/GL/gl.h \ |
| 55 | $(top_srcdir)/include/GL/glext.h \ |
| 56 | $(top_srcdir)/include/GL/glcorearb.h \ |
| 57 | $(top_srcdir)/include/GL/gl_mangle.h |
| 58 | endif |
| 59 | |
| 60 | if HAVE_GLX |
| 61 | glxdir = $(includedir)/GL |
| 62 | glx_HEADERS = \ |
| 63 | $(top_srcdir)/include/GL/glx.h \ |
| 64 | $(top_srcdir)/include/GL/glxext.h \ |
| 65 | $(top_srcdir)/include/GL/glx_mangle.h |
| 66 | pkgconfigdir = $(libdir)/pkgconfig |
| 67 | pkgconfig_DATA = mesa/gl.pc |
| 68 | endif |
| 69 | |
| 70 | if HAVE_COMMON_OSMESA |
| 71 | osmesadir = $(includedir)/GL |
| 72 | osmesa_HEADERS = $(top_srcdir)/include/GL/osmesa.h |
| 73 | endif |
| 74 | |
Emil Velikov | 2f86383 | 2015-11-23 17:03:04 +0000 | [diff] [blame] | 75 | # include only conditionally ? |
| 76 | SUBDIRS += compiler |
| 77 | |
Dave Airlie | f4e499e | 2016-10-07 09:16:09 +1000 | [diff] [blame] | 78 | if HAVE_AMD_DRIVERS |
Dave Airlie | f1f1ba3 | 2016-09-02 17:09:45 +1000 | [diff] [blame] | 79 | SUBDIRS += amd |
| 80 | endif |
| 81 | |
Jason Ekstrand | ef5dca2 | 2016-04-15 15:32:18 -0700 | [diff] [blame] | 82 | if HAVE_INTEL_DRIVERS |
| 83 | SUBDIRS += intel |
| 84 | endif |
| 85 | |
Matt Turner | 691c304 | 2013-01-18 23:43:05 -0800 | [diff] [blame] | 86 | if NEED_OPENGL_COMMON |
Emil Velikov | eb63640 | 2016-01-18 12:16:48 +0200 | [diff] [blame] | 87 | SUBDIRS += mesa |
Matt Turner | 691c304 | 2013-01-18 23:43:05 -0800 | [diff] [blame] | 88 | endif |
| 89 | |
Axel Davy | 3ecd9e1 | 2014-06-08 19:47:48 -0400 | [diff] [blame] | 90 | SUBDIRS += loader |
| 91 | |
Matt Turner | a9676ae | 2013-01-18 23:59:49 -0800 | [diff] [blame] | 92 | if HAVE_DRI_GLX |
| 93 | SUBDIRS += glx |
| 94 | endif |
| 95 | |
Emil Velikov | 6cb8147 | 2016-04-20 19:44:51 +0100 | [diff] [blame] | 96 | ## Optionally required by GBM and EGL |
Emil Velikov | 9f3588e | 2016-04-20 20:18:02 +0100 | [diff] [blame] | 97 | if HAVE_PLATFORM_WAYLAND |
Emil Velikov | 6cb8147 | 2016-04-20 19:44:51 +0100 | [diff] [blame] | 98 | SUBDIRS += egl/wayland/wayland-drm |
Armin K | f423eba | 2013-08-11 17:27:23 +0200 | [diff] [blame] | 99 | endif |
| 100 | |
Emil Velikov | 6cb8147 | 2016-04-20 19:44:51 +0100 | [diff] [blame] | 101 | ## Optionally required by EGL (aka PLATFORM_GBM) |
Matt Turner | a9676ae | 2013-01-18 23:59:49 -0800 | [diff] [blame] | 102 | if HAVE_GBM |
| 103 | SUBDIRS += gbm |
| 104 | endif |
| 105 | |
Emil Velikov | 6cb8147 | 2016-04-20 19:44:51 +0100 | [diff] [blame] | 106 | ## Optionally required by EGL |
| 107 | if HAVE_PLATFORM_WAYLAND |
| 108 | SUBDIRS += egl/wayland/wayland-egl |
| 109 | endif |
| 110 | |
Matt Turner | a9676ae | 2013-01-18 23:59:49 -0800 | [diff] [blame] | 111 | if HAVE_EGL |
Emil Velikov | e342039 | 2015-07-14 01:58:33 +0100 | [diff] [blame] | 112 | SUBDIRS += egl |
Matt Turner | a9676ae | 2013-01-18 23:59:49 -0800 | [diff] [blame] | 113 | endif |
| 114 | |
Kristian Høgsberg Kristensen | 3e218ad | 2016-08-19 12:13:24 -0700 | [diff] [blame] | 115 | if HAVE_INTEL_DRIVERS |
| 116 | SUBDIRS += intel/tools |
| 117 | endif |
| 118 | |
Dave Airlie | 3f7ef24 | 2016-10-14 07:12:33 +0100 | [diff] [blame] | 119 | if HAVE_VULKAN_COMMON |
| 120 | SUBDIRS += vulkan/wsi |
| 121 | endif |
Emil Velikov | 8d1712a | 2017-01-17 19:48:37 +0000 | [diff] [blame] | 122 | EXTRA_DIST += vulkan/registry/vk.xml |
Dave Airlie | 3f7ef24 | 2016-10-14 07:12:33 +0100 | [diff] [blame] | 123 | |
Emil Velikov | 3a2d09d | 2016-04-29 18:41:08 +0100 | [diff] [blame] | 124 | ## Requires the i965 compiler (part of mesa) and wayland-drm |
| 125 | if HAVE_INTEL_VULKAN |
| 126 | SUBDIRS += intel/vulkan |
| 127 | endif |
| 128 | |
Dave Airlie | f4e499e | 2016-10-07 09:16:09 +1000 | [diff] [blame] | 129 | # Requires wayland-drm |
| 130 | if HAVE_RADEON_VULKAN |
Dave Airlie | f4e499e | 2016-10-07 09:16:09 +1000 | [diff] [blame] | 131 | SUBDIRS += amd/vulkan |
| 132 | endif |
| 133 | |
Matt Turner | a9676ae | 2013-01-18 23:59:49 -0800 | [diff] [blame] | 134 | if HAVE_GALLIUM |
Emil Velikov | b75e0d7 | 2014-07-20 23:20:57 +0100 | [diff] [blame] | 135 | SUBDIRS += gallium |
Matt Turner | a9676ae | 2013-01-18 23:59:49 -0800 | [diff] [blame] | 136 | endif |
Matt Turner | cdc3a6b | 2013-11-10 18:06:41 -0800 | [diff] [blame] | 137 | |
Lionel Landwerlin | dbd677e | 2017-01-12 17:01:44 +0000 | [diff] [blame] | 138 | EXTRA_DIST += \ |
Jonathan Gray | 23392ab | 2016-10-16 23:16:19 +1100 | [diff] [blame] | 139 | getopt hgl SConscript \ |
| 140 | $(top_srcdir)/include/GL/mesa_glinterop.h |
Matt Turner | 145919b | 2014-12-18 13:33:29 -0800 | [diff] [blame] | 141 | |
Kristian Høgsberg | 169b389 | 2015-03-24 09:41:08 -0700 | [diff] [blame] | 142 | AM_CFLAGS = $(VISIBILITY_CFLAGS) |
| 143 | AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS) |
| 144 | |
Matt Turner | 145919b | 2014-12-18 13:33:29 -0800 | [diff] [blame] | 145 | AM_CPPFLAGS = \ |
| 146 | -I$(top_srcdir)/include/ \ |
| 147 | -I$(top_srcdir)/src/mapi/ \ |
| 148 | -I$(top_srcdir)/src/mesa/ \ |
Carl Worth | f61669f | 2015-03-11 17:31:11 -0700 | [diff] [blame] | 149 | -I$(top_srcdir)/src/gallium/include \ |
| 150 | -I$(top_srcdir)/src/gallium/auxiliary \ |
Matt Turner | 145919b | 2014-12-18 13:33:29 -0800 | [diff] [blame] | 151 | $(DEFINES) |
| 152 | |
| 153 | noinst_LTLIBRARIES = libglsl_util.la |
| 154 | |
| 155 | libglsl_util_la_SOURCES = \ |
Ilia Mirkin | e483cb9 | 2016-06-12 18:56:43 -0400 | [diff] [blame] | 156 | mesa/main/extensions_table.c \ |
Matt Turner | 145919b | 2014-12-18 13:33:29 -0800 | [diff] [blame] | 157 | mesa/main/imports.c \ |
Carl Worth | f61669f | 2015-03-11 17:31:11 -0700 | [diff] [blame] | 158 | mesa/program/prog_parameter.c \ |
Emil Velikov | 1df5a6c | 2015-04-15 13:40:55 +0100 | [diff] [blame] | 159 | mesa/program/symbol_table.c \ |
| 160 | mesa/program/dummy_errors.c |