loader: Add dri3 helper
[mesa.git] / src / glx / Makefile.am
index eb202403b677f521272aa14d2952e7becb83ec35..d08ff7a8dd2a60cd9ddef0d6bccc4574fee390e1 100644 (file)
@@ -24,7 +24,9 @@ SHARED_GLAPI_CFLAGS = -DGLX_SHARED_GLAPI
 SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
 endif
 
-SUBDIRS=. tests
+SUBDIRS =
+
+EXTRA_DIST = SConscript
 
 if HAVE_XF86VIDMODE
 EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
@@ -33,6 +35,7 @@ endif
 AM_CFLAGS = \
        -I$(top_srcdir)/include \
        -I$(top_srcdir)/include/GL/internal \
+       -I$(top_srcdir)/src \
        -I$(top_srcdir)/src/loader \
        -I$(top_srcdir)/src/mapi \
        -I$(top_srcdir)/src/mapi/glapi \
@@ -43,6 +46,7 @@ AM_CFLAGS = \
        $(EXTRA_DEFINES_XF86VIDMODE) \
        -D_REENTRANT \
        -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
+       -DGL_LIB_NAME=\"lib@GL_LIB@.so.1\" \
        $(DEFINES) \
        $(LIBDRM_CFLAGS) \
        $(DRI2PROTO_CFLAGS) \
@@ -54,53 +58,92 @@ lib_LTLIBRARIES = lib@GL_LIB@.la
 noinst_LTLIBRARIES = libglx.la
 
 libglx_la_SOURCES = \
-         clientattrib.c \
-         clientinfo.c \
-         compsize.c \
-         create_context.c \
-         eval.c \
-         glxconfig.c \
-         glxcmds.c \
-         glxcurrent.c \
-         glx_error.c \
-         glxext.c \
-         glxextensions.c \
-         indirect_glx.c \
-         indirect.c \
-         indirect_init.c \
-         indirect_size.c \
-         indirect_window_pos.c \
-         indirect_texture_compression.c \
-         indirect_transpose_matrix.c \
-         indirect_vertex_array.c \
-         indirect_vertex_program.c \
-         pixel.c \
-         pixelstore.c \
-         query_renderer.c \
-         render2.c \
-         renderpix.c \
-         single2.c \
-         singlepix.c \
-         vertarr.c \
-         xfont.c \
-         glx_pbuffer.c \
-         glx_query.c \
-         drisw_glx.c \
-         dri_common.c \
-         dri_glx.c \
-         XF86dri.c \
-         glxhash.c \
-         dri2_glx.c \
-         dri2.c \
-         dri2_query_renderer.c \
-         applegl_glx.c
+       clientattrib.c \
+       clientinfo.c \
+       compsize.c \
+       create_context.c \
+       eval.c \
+       glxclient.h \
+       glxcmds.c \
+       glxconfig.c \
+       glxconfig.h \
+       glxcurrent.c \
+       glx_error.c \
+       glx_error.h \
+       glxext.c \
+       glxextensions.c \
+       glxextensions.h \
+       glxhash.c \
+       glxhash.h \
+       glx_pbuffer.c \
+       glx_query.c \
+       indirect.c \
+       indirect_glx.c \
+       indirect_init.c \
+       indirect_init.h \
+       indirect_size.c \
+       indirect_texture_compression.c \
+       indirect_transpose_matrix.c \
+       indirect_vertex_array.c \
+       indirect_vertex_array.h \
+       indirect_vertex_array_priv.h \
+       indirect_vertex_program.c \
+       indirect_window_pos.c \
+       packrender.h \
+       packsingle.h \
+       pixel.c \
+       pixelstore.c \
+       query_renderer.c \
+       render2.c \
+       renderpix.c \
+       single2.c \
+       singlepix.c \
+       vertarr.c
+
+libglx_la_LIBADD = $(top_builddir)/src/loader/libloader.la
+
+if HAVE_DRISW
+libglx_la_SOURCES += \
+       drisw_glx.c \
+       drisw_priv.h
+endif
+
+if HAVE_DRICOMMON
+libglx_la_SOURCES += \
+       dri_common.c \
+       dri_common.h \
+       dri_common_query_renderer.c \
+       xfont.c
+endif
+
+if HAVE_DRI2
+libglx_la_SOURCES += \
+       dri2.c \
+       dri2_glx.c \
+       dri2.h \
+       dri2_priv.h \
+       dri_glx.c \
+       dri_sarea.h \
+       XF86dri.c \
+       xf86dri.h \
+       xf86dristr.h
+endif
 
 if HAVE_DRI3
 libglx_la_SOURCES += \
-          dri3_glx.c
+       dri3_glx.c \
+       dri3_priv.h
+
+libglx_la_LIBADD += $(XCB_DRI3_LIBS)
 endif
 
-libglx_la_LIBADD = $(top_builddir)/src/loader/libloader.la
+if HAVE_APPLEDRI
+libglx_la_SOURCES += \
+       applegl_glx.c
+
+SUBDIRS += apple
+libglx_la_LIBADD += $(builddir)/apple/libappleglx.la
+endif
 
 GL_LIBS = \
        libglx.la \
@@ -109,11 +152,16 @@ GL_LIBS = \
        $(GL_LIB_DEPS)
 
 GL_LDFLAGS = \
-       -Wl,-Bsymbolic \
-       -version-number 1:2 -no-undefined
+       -no-undefined \
+       -version-number 1:2 \
+       $(BSYMBOLIC) \
+       $(GC_SECTIONS) \
+       $(LD_NO_UNDEFINED)
 
 lib@GL_LIB@_la_SOURCES =
 lib@GL_LIB@_la_LIBADD = $(GL_LIBS)
 lib@GL_LIB@_la_LDFLAGS = $(GL_LDFLAGS)
 
+SUBDIRS += . tests
+
 include $(top_srcdir)/install-lib-links.mk