APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
# GLcore dependencies
+XORG_CFLAGS = @XORG_CFLAGS@
GLCORE_LIB_DEPS = $(EXTRA_LIB_PATH) @GLCORE_LIB_DEPS@
# DRI dependencies
# Program dependencies - specific GL/glut libraries added in Makefiles
APP_LIB_DEPS = -lm
+# GLcore dependencies
+XORG_CFLAGS = `pkg-config --cflags xorg-server`
+GLCORE_LIB_DEPS = -lm -lpthread
# Installation directories (for make install)
GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
fi
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
- GLCORE_LIB_DEPS=""
# if static, move the external libraries to the programs
# and empty the libraries for libGL
# need DRM libs, -lpthread, etc.
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
- GLCORE_LIB_DEPS="-lm -lpthread $DLOPEN_LIBS"
;;
osmesa)
# No libGL for osmesa
GL_LIB_DEPS=""
- GLCORE_LIB_DEPS=""
;;
esac
AC_SUBST(GL_LIB_DEPS)
-AC_SUBST(GLCORE_LIB_DEPS)
dnl
dnl More X11 setup
AC_SUBST(OSMESA_LIB_DEPS)
AC_SUBST(OSMESA_MESA_DEPS)
+dnl
+dnl GLcore configuration
+dnl
+# delay pkg-config checks until `make glcore' run
+XORG_CFLAGS='`pkg-config --cflags xorg-server`'
+GLCORE_LIB_DEPS='-lm -lpthread'
+if test "$mesa_driver" = dri; then
+ GLCORE_LIB_DEPS="$GLCORE_LIB_DEPS $DLOPEN_LIBS"
+fi
+AC_SUBST(XORG_CFLAGS)
+AC_SUBST(GLCORE_LIB_DEPS)
+
dnl
dnl GLU configuration
dnl
MESA_MODULES = $(TOP)/src/mesa/libmesa.a
C_SOURCES += ../common/driverfuncs.c
-ifeq ("${DRIVER_DIRS}", "dri")
+ifeq ($(WINDOW_SYSTEM),dri)
C_SOURCES += ../dri/common/utils.c
endif
-I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
- `pkg-config --cflags xorg-server`
+ $(XORG_CFLAGS)
-ifeq ("${DRIVER_DIRS}", "dri")
+ifeq ($(WINDOW_SYSTEM),dri)
INCLUDES += \
-I$(TOP)/src/mesa/drivers/dri/common \
- `pkg-config --cflags libdrm`
+ $(LIBDRM_CFLAGS)
endif
# undef 'USE_XSHM' to make it explicit that 'XFree86Server' takes precedence