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