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, 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 if HAVE_SHARED_GLAPI 23 SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la 24 endif 25 26 SUBDIRS = 27 28 EXTRA_DIST = SConscript meson.build 29 30 if HAVE_XF86VIDMODE 31 EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE 32 endif 33 34 AM_CFLAGS = \ 35 -I$(top_srcdir)/include \ 36 -I$(top_srcdir)/include/GL/internal \ 37 -I$(top_srcdir)/src \ 38 -I$(top_srcdir)/src/loader \ 39 -I$(top_builddir)/src/mapi \ 40 -I$(top_srcdir)/src/mapi \ 41 -I$(top_builddir)/src/mapi/glapi \ 42 -I$(top_srcdir)/src/mapi/glapi \ 43 $(VISIBILITY_CFLAGS) \ 44 $(EXTRA_DEFINES_XF86VIDMODE) \ 45 -D_REENTRANT \ 46 -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \ 47 $(DEFINES) \ 48 $(LIBDRM_CFLAGS) \ 49 $(DRI2PROTO_CFLAGS) \ 50 $(GLPROTO_CFLAGS) \ 51 $(X11_INCLUDES) 52 53 lib_LTLIBRARIES = lib@GL_LIB@.la 54 55 noinst_LTLIBRARIES = libglx.la 56 57 libglx_la_SOURCES = \ 58 clientattrib.c \ 59 clientinfo.c \ 60 compsize.c \ 61 create_context.c \ 62 eval.c \ 63 glxclient.h \ 64 glxcmds.c \ 65 glxconfig.c \ 66 glxconfig.h \ 67 glxcurrent.c \ 68 glx_error.c \ 69 glx_error.h \ 70 glxext.c \ 71 glxextensions.c \ 72 glxextensions.h \ 73 glxhash.c \ 74 glxhash.h \ 75 glx_pbuffer.c \ 76 glx_query.c \ 77 indirect.c \ 78 indirect_glx.c \ 79 indirect_init.c \ 80 indirect_init.h \ 81 indirect_size.c \ 82 indirect_texture_compression.c \ 83 indirect_transpose_matrix.c \ 84 indirect_vertex_array.c \ 85 indirect_vertex_array.h \ 86 indirect_vertex_array_priv.h \ 87 indirect_vertex_program.c \ 88 indirect_window_pos.c \ 89 packrender.h \ 90 packsingle.h \ 91 pixel.c \ 92 pixelstore.c \ 93 query_renderer.c \ 94 render2.c \ 95 renderpix.c \ 96 single2.c \ 97 singlepix.c \ 98 vertarr.c 99 100 libglx_la_LIBADD = \ 101 $(top_builddir)/src/loader/libloader.la \ 102 $(top_builddir)/src/util/libmesautil.la \ 103 $(top_builddir)/src/util/libxmlconfig.la 104 105 if HAVE_DRISW 106 libglx_la_SOURCES += \ 107 drisw_glx.c \ 108 drisw_priv.h 109 endif 110 111 if HAVE_DRICOMMON 112 libglx_la_SOURCES += \ 113 dri_common.c \ 114 dri_common.h \ 115 dri_common_query_renderer.c \ 116 dri_common_interop.c \ 117 xfont.c 118 endif 119 120 if HAVE_DRI2 121 libglx_la_SOURCES += \ 122 dri2.c \ 123 dri2_glx.c \ 124 dri2.h \ 125 dri2_priv.h \ 126 dri_glx.c \ 127 dri_sarea.h \ 128 XF86dri.c \ 129 xf86dri.h \ 130 xf86dristr.h 131 endif 132 133 if HAVE_DRI3 134 libglx_la_SOURCES += \ 135 dri3_glx.c \ 136 dri3_priv.h 137 138 libglx_la_LIBADD += $(top_builddir)/src/loader/libloader_dri3_helper.la 139 endif 140 141 if HAVE_APPLEDRI 142 libglx_la_SOURCES += \ 143 applegl_glx.c 144 145 SUBDIRS += apple 146 libglx_la_LIBADD += $(builddir)/apple/libappleglx.la 147 endif 148 149 if HAVE_WINDOWSDRI 150 libglx_la_SOURCES += \ 151 driwindows_glx.c 152 153 SUBDIRS += windows 154 libglx_la_LIBADD += \ 155 $(builddir)/windows/libwindowsdri.la \ 156 $(builddir)/windows/libwindowsglx.la 157 endif 158 159 if USE_LIBGLVND 160 AM_CFLAGS += \ 161 -DGL_LIB_NAME=\"lib@GL_LIB (a] .so.0\" \ 162 $(GLVND_CFLAGS) 163 164 libglx_la_SOURCES += \ 165 g_glxglvnddispatchfuncs.c \ 166 g_glxglvnddispatchindices.h \ 167 glxglvnd.c \ 168 glxglvnd.h \ 169 glxglvnddispatchfuncs.h 170 171 GL_LIB_VERSION=0 172 else 173 AM_CFLAGS += \ 174 -DGL_LIB_NAME=\"lib@GL_LIB (a] .so.1\" 175 GL_LIB_VERSION=1:2 176 endif 177 178 # Push the libdrm furhter up, as due to libtool bug we might end up relinking 179 # against the system one. 180 GL_LIBS = \ 181 $(LIBDRM_LIBS) \ 182 libglx.la \ 183 $(top_builddir)/src/mapi/glapi/libglapi.la \ 184 $(SHARED_GLAPI_LIB) \ 185 $(GL_LIB_DEPS) 186 187 GL_LDFLAGS = \ 188 -no-undefined \ 189 -version-number $(GL_LIB_VERSION) \ 190 $(BSYMBOLIC) \ 191 $(GC_SECTIONS) \ 192 $(LD_NO_UNDEFINED) 193 194 lib@GL_LIB@_la_SOURCES = 195 lib@GL_LIB@_la_LIBADD = $(GL_LIBS) 196 lib@GL_LIB@_la_LDFLAGS = $(GL_LDFLAGS) 197 198 if HAVE_WINDOWSDRI 199 lib@GL_LIB@_la_LDFLAGS += -lgdi32 -lopengl32 -Wl,--disable-stdcall-fixup 200 endif 201 202 SUBDIRS += . tests 203 204 include $(top_srcdir)/install-lib-links.mk 205