if HAVE_SHARED_GLAPI
SHARED_GLAPI_CFLAGS = -DGLX_SHARED_GLAPI
-SHARED_GLAPI_LIBS = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
+SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
endif
-GLAPI_LIB = ../mapi/glapi/libglapi.a
+SUBDIRS =
if HAVE_XF86VIDMODE
EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
AM_CFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/GL/internal \
+ -I$(top_srcdir)/src/loader \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mapi/glapi \
+ -I$(top_builddir)/src/mapi \
+ -I$(top_builddir)/src/mapi/glapi \
+ $(VISIBILITY_CFLAGS) \
$(SHARED_GLAPI_CFLAGS) \
$(EXTRA_DEFINES_XF86VIDMODE) \
-D_REENTRANT \
$(GLPROTO_CFLAGS) \
$(X11_INCLUDES)
-if HAVE_MANGLED_GL
-MANGLED_GL_LIB = libMangledGL.la
-else
-NORMAL_GL_LIB = libGL.la
-endif
+lib_LTLIBRARIES = lib@GL_LIB@.la
-lib_LTLIBRARIES = \
- $(NORMAL_GL_LIB) \
- $(MANGLED_GL_LIB)
+noinst_LTLIBRARIES = libglx.la
-GL_FILES = \
+libglx_la_SOURCES = \
clientattrib.c \
clientinfo.c \
compsize.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 \
+ glxhash.c
+
+libglx_la_LIBADD = $(top_builddir)/src/loader/libloader.la
+
+if HAVE_DRISW
+libglx_la_SOURCES += \
+ drisw_glx.c
+endif
+
+if HAVE_DRICOMMON
+libglx_la_SOURCES += \
+ xfont.c \
dri_common.c \
+ dri_common_query_renderer.c
+endif
+
+if HAVE_DRI2
+libglx_la_SOURCES += \
dri_glx.c \
XF86dri.c \
- glxhash.c \
dri2_glx.c \
- dri2.c \
+ dri2.c
+endif
+
+if HAVE_DRI3
+libglx_la_SOURCES += \
+ dri3_glx.c
+endif
+
+if HAVE_APPLEDRI
+libglx_la_SOURCES += \
applegl_glx.c
+SUBDIRS += apple
+libglx_la_LIBADD += $(builddir)/apple/libappleglx.la
+endif
+
GL_LIBS = \
- $(SHARED_GLAPI_LIBS) \
- $(GLAPI_LIB) \
+ libglx.la \
+ $(top_builddir)/src/mapi/glapi/libglapi.la \
+ $(SHARED_GLAPI_LIB) \
$(GL_LIB_DEPS)
GL_LDFLAGS = \
- -version-number 1:2
-
-libGL_la_SOURCES = $(GL_FILES)
-libMangledGL_la_SOURCES = $(GL_FILES)
-libGL_la_LIBADD = $(GL_LIBS)
-libMangledGL_la_LIBADD = $(GL_LIBS)
-libGL_la_LDFLAGS = $(GL_LDFLAGS)
-libMangledGL_la_LDFLAGS = $(GL_LDFLAGS)
-
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-if !HAVE_MANGLED_GL
-all-local: $(NORMAL_GL_LIB) $(MANGLED_GL_LIB)
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
- ln -f .libs/libGL.so.1.2.0 $(top_builddir)/$(LIB_DIR)/libGL.so.1
- ln -sf libGL.so.1 $(top_builddir)/$(LIB_DIR)/libGL.so
-endif
+ -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
-$(GLAPI_LIB):
- @$(MAKE) -C $(TOP)/src/mapi/glapi
+include $(top_srcdir)/install-lib-links.mk