Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  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_PLATFORMS       - platforms to support
  29. #   EGL_CLIENT_APIS     - state trackers to support
  30. #   GALLIUM_WINSYS_DIRS - pipe drivers to support
  31. #
  32. include $(top_srcdir)/src/gallium/Automake.inc
  33.  
  34. AM_CFLAGS = $(PTHREAD_CFLAGS)
  35. AM_CPPFLAGS = \
  36.         $(GALLIUM_CFLAGS) \
  37.         -I$(top_srcdir)/include \
  38.         -I$(top_srcdir)/src/gallium/drivers \
  39.         -I$(top_srcdir)/src/gallium/winsys \
  40.         -I$(top_srcdir)/src/gallium/include \
  41.         -I$(top_srcdir)/src/gallium/auxiliary \
  42.         -I$(top_srcdir)/src/gallium/state_trackers/egl \
  43.         -I$(top_srcdir)/src/egl/main \
  44.         -D_EGL_MAIN=_eglMain
  45.  
  46. egldir = $(EGL_DRIVER_INSTALL_DIR)
  47. egl_LTLIBRARIES = egl_gallium.la
  48.  
  49. nodist_EXTRA_egl_gallium_la_SOURCES = dummy.cpp
  50. egl_gallium_la_SOURCES = \
  51.         egl.c \
  52.         egl_pipe.c \
  53.         egl_st.c
  54.  
  55. egl_gallium_la_LIBADD = \
  56.         $(top_builddir)/src/gallium/auxiliary/libgallium.la \
  57.         $(top_builddir)/src/gallium/drivers/identity/libidentity.la \
  58.         $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
  59.         $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
  60.         $(top_builddir)/src/gallium/state_trackers/egl/libegl.la \
  61.         $(top_builddir)/src/egl/main/libEGL.la \
  62.         $(CLOCK_LIB) \
  63.         $(LIBUDEV_LIBS) \
  64.         $(DLOPEN_LIBS) \
  65.         $(PTHREAD_LIBS) \
  66.         -lm
  67.  
  68. egl_gallium_la_LDFLAGS = -Wl,--no-undefined -Wl,--allow-multiple-definition -avoid-version -module
  69.  
  70. if HAVE_EGL_PLATFORM_X11
  71. AM_CPPFLAGS += $(LIBDRM_CFLAGS)
  72. egl_gallium_la_LIBADD += \
  73.         $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
  74.         -lX11 -lXext -lXfixes $(LIBDRM_LIBS)
  75. endif
  76.  
  77. if HAVE_EGL_PLATFORM_WAYLAND
  78. AM_CPPFLAGS += $(LIBDRM_CFLAGS)
  79. egl_gallium_la_LIBADD += \
  80.         $(top_builddir)/src/gallium/winsys/sw/wayland/libws_wayland.la \
  81.         $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
  82.         $(LIBDRM_LIBS) \
  83.         $(WAYLAND_LIBS)
  84. endif
  85.  
  86. if HAVE_EGL_PLATFORM_DRM
  87. AM_CPPFLAGS += $(LIBDRM_CFLAGS)
  88. egl_gallium_la_LIBADD += \
  89.         $(top_builddir)/src/gbm/libgbm.la \
  90.         $(LIBDRM_LIBS)
  91. endif
  92.  
  93. if HAVE_EGL_PLATFORM_FBDEV
  94. egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/fbdev/libfbdev.la
  95. endif
  96.  
  97. if HAVE_EGL_PLATFORM_NULL
  98. egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la
  99. endif
  100.  
  101. if HAVE_OPENGL
  102. AM_CPPFLAGS += \
  103.         -I$(top_srcdir)/src/mesa \
  104.         -DFEATURE_GL=1
  105.  
  106. egl_gallium_la_LIBADD += \
  107.         $(top_builddir)/src/mesa/libmesagallium.la
  108. # make st/mesa built-in when there is a single glapi provider
  109. if HAVE_SHARED_GLAPI
  110. egl_gallium_la_LIBADD += \
  111.         $(top_builddir)/src/mapi/shared-glapi/libglapi.la
  112. else
  113. egl_gallium_la_LIBADD += \
  114.         $(top_builddir)/src/mapi/glapi/libglapi.la
  115.  
  116. AM_CPPFLAGS += -D_EGL_EXTERNAL_GL=1
  117. egl_LTLIBRARIES += st_GL.la
  118.  
  119. nodist_EXTRA_st_GL_la_SOURCES = dummy.cpp
  120. st_GL_la_SOURCES = st_GL.c
  121. st_GL_la_LDFLAGS = -Wl,--no-undefined -avoid-version -module
  122.  
  123. # st_GL, built only when shared glapi is not enabled
  124. st_GL_la_LIBADD = \
  125.         $(top_builddir)/src/mesa/libmesagallium.la \
  126.         $(top_builddir)/src/gallium/auxiliary/libgallium.la \
  127.         $(top_builddir)/src/mapi/glapi/libglapi.la \
  128.         $(CLOCK_LIB) \
  129.         $(DLOPEN_LIBS) \
  130.         $(PTHREAD_LIBS) \
  131.         -lm
  132. endif
  133. endif
  134.  
  135. if HAVE_OPENGL_ES1
  136. AM_CPPFLAGS += \
  137.         -DFEATURE_ES1=1
  138. endif
  139.  
  140. if HAVE_OPENGL_ES2
  141. AM_CPPFLAGS += \
  142.         -DFEATURE_ES2=1
  143. endif
  144.  
  145. if HAVE_OPENVG
  146. AM_CPPFLAGS += \
  147.         -I$(top_srcdir)/src/gallium/state_trackers/vega \
  148.         -DFEATURE_VG=1
  149. egl_gallium_la_LIBADD += \
  150.         $(top_builddir)/src/gallium/state_trackers/vega/libvega.la \
  151.         $(top_builddir)/src/mapi/vgapi/libOpenVG.la
  152. endif
  153.  
  154. if HAVE_GALLIUM_I915
  155. AM_CPPFLAGS += -D_EGL_PIPE_I915=1
  156. egl_gallium_la_LIBADD += \
  157.         $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
  158.         $(top_builddir)/src/gallium/drivers/i915/libi915.la \
  159.         $(INTEL_LIBS)
  160. endif
  161.  
  162. if HAVE_GALLIUM_ILO
  163. AM_CPPFLAGS += -D_EGL_PIPE_ILO=1
  164. egl_gallium_la_LIBADD += \
  165.         $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
  166.         $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
  167.         $(INTEL_LIBS)
  168. endif
  169.  
  170. if HAVE_GALLIUM_NOUVEAU
  171. AM_CPPFLAGS += -D_EGL_PIPE_NOUVEAU=1
  172. egl_gallium_la_LIBADD += \
  173.         $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
  174.         $(top_builddir)/src/gallium/drivers/nv30/libnv30.la \
  175.         $(top_builddir)/src/gallium/drivers/nv50/libnv50.la \
  176.         $(top_builddir)/src/gallium/drivers/nvc0/libnvc0.la \
  177.         $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
  178.         $(NOUVEAU_LIBS)
  179. endif
  180.  
  181. if HAVE_GALLIUM_R300
  182. AM_CPPFLAGS += -D_EGL_PIPE_R300=1
  183. egl_gallium_la_LIBADD += \
  184.         $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
  185.         $(top_builddir)/src/gallium/drivers/r300/libr300.la \
  186.         $(RADEON_LIBS)
  187. endif
  188.  
  189. if HAVE_GALLIUM_R600
  190. AM_CPPFLAGS += -D_EGL_PIPE_R600=1
  191. egl_gallium_la_LIBADD += \
  192.         $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
  193.         $(top_builddir)/src/gallium/drivers/r600/libr600.la \
  194.         $(RADEON_LIBS)
  195. endif
  196.  
  197. if HAVE_GALLIUM_RADEONSI
  198. AM_CPPFLAGS += -D_EGL_PIPE_RADEONSI=1
  199. egl_gallium_la_LIBADD += \
  200.         $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
  201.         $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
  202.         $(RADEON_LIBS)
  203. endif
  204.  
  205. if HAVE_GALLIUM_SVGA
  206. AM_CPPFLAGS += -D_EGL_PIPE_VMWGFX=1
  207. egl_gallium_la_LIBADD += \
  208.         $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
  209.         $(top_builddir)/src/gallium/drivers/svga/libsvga.la
  210. endif
  211.  
  212. if HAVE_GALLIUM_FREEDRENO
  213. AM_CPPFLAGS += -D_EGL_PIPE_FREEDRENO=1
  214. egl_gallium_la_LIBADD += \
  215.         $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
  216.         $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
  217.         $(FREEDRENO_LIBS)
  218.  
  219. endif
  220.  
  221. if HAVE_GALLIUM_SOFTPIPE
  222. AM_CPPFLAGS += -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE
  223. egl_gallium_la_LIBADD += \
  224.         $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
  225. endif
  226.  
  227. if HAVE_GALLIUM_LLVMPIPE
  228. AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
  229. egl_gallium_la_LIBADD += \
  230.         $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
  231. endif
  232.  
  233. if HAVE_MESA_LLVM
  234. egl_gallium_la_LIBADD += $(LLVM_LIBS)
  235. egl_gallium_la_LDFLAGS += $(LLVM_LDFLAGS)
  236.  
  237. if HAVE_OPENGL
  238. if !HAVE_SHARED_GLAPI
  239. st_GL_la_LIBADD += $(LLVM_LIBS)
  240. st_GL_la_LDFLAGS += $(LLVM_LDFLAGS)
  241. endif
  242. endif
  243. endif
  244.  
  245. # Provide compatibility with scripts for the old Mesa build system for
  246. # a while by putting a link to the driver into /lib of the build tree.
  247. if HAVE_OPENGL
  248. if !HAVE_SHARED_GLAPI
  249. all-local: egl_gallium.la st_GL.la
  250.         $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
  251.         ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
  252.         ln -f .libs/st_GL.so $(top_builddir)/$(LIB_DIR)/egl/st_GL.so
  253. else
  254. all-local: egl_gallium.la
  255.         $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
  256.         ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
  257.  
  258. endif
  259. else
  260. all-local: egl_gallium.la
  261.         $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/egl
  262.         ln -f .libs/egl_gallium.so $(top_builddir)/$(LIB_DIR)/egl/egl_gallium.so
  263. endif
  264.