blob: 12e5dcdb12af01a66a8d15f797351d9339847545 [file] [log] [blame]
Matt Turner691c3042013-01-18 23:43:05 -08001# 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 Anholt7edbf4b2012-05-15 10:21:31 -070021
Emil Velikovaf2637a2016-05-31 14:46:19 +010022.PHONY: git_sha1.h.tmp
23git_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 Velikov22e93572016-06-21 18:05:23 +010028 @touch git_sha1.h.tmp
Emil Velikov4cd9cd62016-05-30 12:09:04 +010029 @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 Velikovaf2637a2016-05-31 14:46:19 +010033 > git_sha1.h.tmp ; \
Emil Velikov4cd9cd62016-05-30 12:09:04 +010034 fi \
Emil Velikovaf2637a2016-05-31 14:46:19 +010035 fi
36
37git_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 Velikov4cd9cd62016-05-30 12:09:04 +010043 fi
44
Emil Velikov4cd9cd62016-05-30 12:09:04 +010045BUILT_SOURCES = git_sha1.h
Emil Velikov22e93572016-06-21 18:05:23 +010046CLEANFILES = $(BUILT_SOURCES)
Lionel Landwerlindbd677e2017-01-12 17:01:44 +000047EXTRA_DIST =
Emil Velikovb7f7ec72016-06-06 19:39:40 +010048
Matt Turner145919b2014-12-18 13:33:29 -080049SUBDIRS = . gtest util mapi/glapi/gen mapi
Matt Turner691c3042013-01-18 23:43:05 -080050
Chuck Atkinsa89faa22016-10-04 11:05:30 -040051if HAVE_OPENGL
52gldir = $(includedir)/GL
53gl_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
58endif
59
60if HAVE_GLX
61glxdir = $(includedir)/GL
62glx_HEADERS = \
63 $(top_srcdir)/include/GL/glx.h \
64 $(top_srcdir)/include/GL/glxext.h \
65 $(top_srcdir)/include/GL/glx_mangle.h
66pkgconfigdir = $(libdir)/pkgconfig
67pkgconfig_DATA = mesa/gl.pc
68endif
69
70if HAVE_COMMON_OSMESA
71osmesadir = $(includedir)/GL
72osmesa_HEADERS = $(top_srcdir)/include/GL/osmesa.h
73endif
74
Emil Velikov2f863832015-11-23 17:03:04 +000075# include only conditionally ?
76SUBDIRS += compiler
77
Dave Airlief4e499e2016-10-07 09:16:09 +100078if HAVE_AMD_DRIVERS
Dave Airlief1f1ba32016-09-02 17:09:45 +100079SUBDIRS += amd
80endif
81
Jason Ekstrandef5dca22016-04-15 15:32:18 -070082if HAVE_INTEL_DRIVERS
83SUBDIRS += intel
84endif
85
Matt Turner691c3042013-01-18 23:43:05 -080086if NEED_OPENGL_COMMON
Emil Velikoveb636402016-01-18 12:16:48 +020087SUBDIRS += mesa
Matt Turner691c3042013-01-18 23:43:05 -080088endif
89
Axel Davy3ecd9e12014-06-08 19:47:48 -040090SUBDIRS += loader
91
Matt Turnera9676ae2013-01-18 23:59:49 -080092if HAVE_DRI_GLX
93SUBDIRS += glx
94endif
95
Emil Velikov6cb81472016-04-20 19:44:51 +010096## Optionally required by GBM and EGL
Emil Velikov9f3588e2016-04-20 20:18:02 +010097if HAVE_PLATFORM_WAYLAND
Emil Velikov6cb81472016-04-20 19:44:51 +010098SUBDIRS += egl/wayland/wayland-drm
Armin Kf423eba2013-08-11 17:27:23 +020099endif
100
Emil Velikov6cb81472016-04-20 19:44:51 +0100101## Optionally required by EGL (aka PLATFORM_GBM)
Matt Turnera9676ae2013-01-18 23:59:49 -0800102if HAVE_GBM
103SUBDIRS += gbm
104endif
105
Emil Velikov6cb81472016-04-20 19:44:51 +0100106## Optionally required by EGL
107if HAVE_PLATFORM_WAYLAND
108SUBDIRS += egl/wayland/wayland-egl
109endif
110
Matt Turnera9676ae2013-01-18 23:59:49 -0800111if HAVE_EGL
Emil Velikove3420392015-07-14 01:58:33 +0100112SUBDIRS += egl
Matt Turnera9676ae2013-01-18 23:59:49 -0800113endif
114
Kristian Høgsberg Kristensen3e218ad2016-08-19 12:13:24 -0700115if HAVE_INTEL_DRIVERS
116SUBDIRS += intel/tools
117endif
118
Dave Airlie3f7ef242016-10-14 07:12:33 +0100119if HAVE_VULKAN_COMMON
120SUBDIRS += vulkan/wsi
121endif
Emil Velikov8d1712a2017-01-17 19:48:37 +0000122EXTRA_DIST += vulkan/registry/vk.xml
Dave Airlie3f7ef242016-10-14 07:12:33 +0100123
Emil Velikov3a2d09d2016-04-29 18:41:08 +0100124## Requires the i965 compiler (part of mesa) and wayland-drm
125if HAVE_INTEL_VULKAN
126SUBDIRS += intel/vulkan
127endif
128
Dave Airlief4e499e2016-10-07 09:16:09 +1000129# Requires wayland-drm
130if HAVE_RADEON_VULKAN
Dave Airlief4e499e2016-10-07 09:16:09 +1000131SUBDIRS += amd/vulkan
132endif
133
Matt Turnera9676ae2013-01-18 23:59:49 -0800134if HAVE_GALLIUM
Emil Velikovb75e0d72014-07-20 23:20:57 +0100135SUBDIRS += gallium
Matt Turnera9676ae2013-01-18 23:59:49 -0800136endif
Matt Turnercdc3a6b2013-11-10 18:06:41 -0800137
Lionel Landwerlindbd677e2017-01-12 17:01:44 +0000138EXTRA_DIST += \
Jonathan Gray23392ab2016-10-16 23:16:19 +1100139 getopt hgl SConscript \
140 $(top_srcdir)/include/GL/mesa_glinterop.h
Matt Turner145919b2014-12-18 13:33:29 -0800141
Kristian Høgsberg169b3892015-03-24 09:41:08 -0700142AM_CFLAGS = $(VISIBILITY_CFLAGS)
143AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
144
Matt Turner145919b2014-12-18 13:33:29 -0800145AM_CPPFLAGS = \
146 -I$(top_srcdir)/include/ \
147 -I$(top_srcdir)/src/mapi/ \
148 -I$(top_srcdir)/src/mesa/ \
Carl Worthf61669f2015-03-11 17:31:11 -0700149 -I$(top_srcdir)/src/gallium/include \
150 -I$(top_srcdir)/src/gallium/auxiliary \
Matt Turner145919b2014-12-18 13:33:29 -0800151 $(DEFINES)
152
153noinst_LTLIBRARIES = libglsl_util.la
154
155libglsl_util_la_SOURCES = \
Ilia Mirkine483cb92016-06-12 18:56:43 -0400156 mesa/main/extensions_table.c \
Matt Turner145919b2014-12-18 13:33:29 -0800157 mesa/main/imports.c \
Carl Worthf61669f2015-03-11 17:31:11 -0700158 mesa/program/prog_parameter.c \
Emil Velikov1df5a6c2015-04-15 13:40:55 +0100159 mesa/program/symbol_table.c \
160 mesa/program/dummy_errors.c