nv50,nvc0: buffer resources can be bound as other things down the line
[mesa.git] / src / gallium / targets / egl-static / Makefile.am
1 # Copyright © 2012 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,
15 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 # DEALINGS IN THE SOFTWARE.
22
23 # This is Makefile for egl_gallium.so. It is static in that all state trackers
24 # and pipe drivers are linked statically when possible.
25 #
26 # The following variables are examined
27 #
28 # EGL_CLIENT_APIS - state trackers to support
29 # GALLIUM_WINSYS_DIRS - pipe drivers to support
30 #
31 include $(top_srcdir)/src/gallium/Automake.inc
32
33 AM_CFLAGS = \
34 $(GALLIUM_TARGET_CFLAGS)
35
36 AM_CPPFLAGS = \
37 -I$(top_srcdir)/src/gallium/state_trackers/egl \
38 -I$(top_srcdir)/src/egl/main \
39 -DGALLIUM_TRACE \
40 -DGALLIUM_RBUG \
41 -D_EGL_MAIN=_eglMain
42
43 AM_LDFLAGS = \
44 -module \
45 -no-undefined \
46 -avoid-version \
47 $(GC_SECTIONS) \
48 $(LD_NO_UNDEFINED)
49
50 if HAVE_LD_VERSION_SCRIPT
51 AM_LDFLAGS += \
52 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.sym
53 endif
54
55 egldir = $(libdir)/egl
56 egl_LTLIBRARIES = egl_gallium.la
57
58 nodist_EXTRA_egl_gallium_la_SOURCES = dummy.cpp
59 egl_gallium_la_SOURCES = \
60 egl.c \
61 egl_pipe.c \
62 egl_pipe.h \
63 egl_st.c \
64 egl_st.h
65
66 egl_gallium_la_LIBADD = \
67 $(top_builddir)/src/loader/libloader.la \
68 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
69 $(top_builddir)/src/gallium/drivers/identity/libidentity.la \
70 $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
71 $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
72 $(top_builddir)/src/gallium/state_trackers/egl/libegl.la \
73 $(top_builddir)/src/egl/main/libEGL.la \
74 $(GALLIUM_COMMON_LIB_DEPS)
75
76 if HAVE_EGL_PLATFORM_X11
77 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
78 egl_gallium_la_LIBADD += \
79 $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
80 -lX11 -lXext -lXfixes $(LIBDRM_LIBS)
81 endif
82
83 if HAVE_EGL_PLATFORM_WAYLAND
84 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
85 egl_gallium_la_LIBADD += \
86 $(top_builddir)/src/gallium/winsys/sw/wayland/libws_wayland.la \
87 $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
88 $(LIBDRM_LIBS) \
89 $(WAYLAND_LIBS)
90 endif
91
92 if HAVE_EGL_PLATFORM_DRM
93 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
94 egl_gallium_la_LIBADD += \
95 $(top_builddir)/src/gbm/libgbm.la \
96 $(LIBDRM_LIBS)
97 endif
98
99 if HAVE_EGL_PLATFORM_FBDEV
100 egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/fbdev/libfbdev.la
101 endif
102
103 if HAVE_EGL_PLATFORM_NULL
104 egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la
105 endif
106
107 if HAVE_OPENGL
108 AM_CPPFLAGS += \
109 -I$(top_srcdir)/src/mesa \
110 -DFEATURE_GL=1
111
112 egl_gallium_la_LIBADD += \
113 $(top_builddir)/src/mesa/libmesagallium.la
114 # make st/mesa built-in when there is a single glapi provider
115 if HAVE_SHARED_GLAPI
116 egl_gallium_la_LIBADD += \
117 $(top_builddir)/src/mapi/shared-glapi/libglapi.la
118 else
119 egl_gallium_la_LIBADD += \
120 $(top_builddir)/src/mapi/glapi/libglapi.la
121
122 AM_CPPFLAGS += -D_EGL_EXTERNAL_GL=1
123 egl_LTLIBRARIES += st_GL.la
124
125 nodist_EXTRA_st_GL_la_SOURCES = dummy.cpp
126 st_GL_la_SOURCES = st_GL.c
127
128 # st_GL, built only when shared glapi is not enabled
129 st_GL_la_LIBADD = \
130 $(top_builddir)/src/mesa/libmesagallium.la \
131 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
132 $(top_builddir)/src/mapi/glapi/libglapi.la \
133 $(GALLIUM_COMMON_LIB_DEPS)
134 endif
135 endif
136
137 if HAVE_OPENGL_ES1
138 AM_CPPFLAGS += \
139 -DFEATURE_ES1=1
140 endif
141
142 if HAVE_OPENGL_ES2
143 AM_CPPFLAGS += \
144 -DFEATURE_ES2=1
145 endif
146
147 if HAVE_OPENVG
148 AM_CPPFLAGS += \
149 -I$(top_srcdir)/src/gallium/state_trackers/vega \
150 -DFEATURE_VG=1
151 egl_gallium_la_LIBADD += \
152 $(top_builddir)/src/gallium/state_trackers/vega/libvega.la \
153 $(top_builddir)/src/mapi/vgapi/libOpenVG.la
154 endif
155
156 EXTRA_egl_gallium_la_DEPENDENCIES = egl.sym
157 EXTRA_DIST = Android.mk SConscript
158
159 #if HAVE_GALLIUM_STATIC_TARGETS
160
161 TARGET_DRIVERS =
162 TARGET_CPPFLAGS =
163 TARGET_LIB_DEPS =
164
165 include $(top_srcdir)/src/gallium/drivers/i915/Automake.inc
166
167 include $(top_srcdir)/src/gallium/drivers/ilo/Automake.inc
168
169 include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
170
171 include $(top_srcdir)/src/gallium/drivers/r300/Automake.inc
172 include $(top_srcdir)/src/gallium/drivers/r600/Automake.inc
173 include $(top_srcdir)/src/gallium/drivers/radeonsi/Automake.inc
174
175 include $(top_srcdir)/src/gallium/drivers/svga/Automake.inc
176
177 include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
178
179 include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc
180 include $(top_srcdir)/src/gallium/drivers/llvmpipe/Automake.inc
181
182 egl_gallium_la_CPPFLAGS = $(AM_CPPFLAGS) $(TARGET_CPPFLAGS)
183 egl_gallium_la_LIBADD += $(TARGET_LIB_DEPS) \
184 $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
185
186
187 #else # HAVE_GALLIUM_STATIC_TARGETS
188
189 #egl_gallium_la_LIBADD += \
190 # $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \
191 # $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
192 # $(GALLIUM_PIPE_LOADER_LIBS)
193 #endif
194
195 if HAVE_MESA_LLVM
196
197 AM_LDFLAGS += $(LLVM_LDFLAGS)
198
199 egl_gallium_la_LIBADD += $(LLVM_LIBS)
200
201 if HAVE_OPENGL
202 if !HAVE_SHARED_GLAPI
203 st_GL_la_LIBADD += $(LLVM_LIBS)
204 endif
205 endif
206
207 endif
208
209 include $(top_srcdir)/install-gallium-links.mk