summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-21 17:58:28 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-26 11:03:54 +0800
commit146931769c75978c58ac0088e8ab630fc41074ec (patch)
treeac730ac643d0ce39fd9ff86ae0c3d5b9fc840647
parenta6342afe502fe52190be4d97df58eb3406b70246 (diff)
glx: Build GLX normally.
GLX was built specially and before Mesa core because libglapi.a could not be built with IN_DRI_DRIVER defined. This is no longer the case since 6e99e6ddbf488f6955e34ef0bc438fdcb4d90f74. It works fine in my (limited) testing with both direct and indirect rendering. I also compare the outputs after preprocessing (gcc -E) with or without this commit, and they are identical.
-rw-r--r--configure.ac2
-rw-r--r--src/glx/x11/Makefile21
2 files changed, 10 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 6f8b76d7ca9..10e0bd47aba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -445,7 +445,7 @@ xlib)
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS xlib"
;;
dri)
- CORE_DIRS="glx/x11 $CORE_DIRS"
+ SRC_DIRS="$SRC_DIRS glx/x11"
DRIVER_DIRS="dri"
WINDOW_SYSTEM="dri"
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS drm"
diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile
index 86d84d4b9ff..e681be834f0 100644
--- a/src/glx/x11/Makefile
+++ b/src/glx/x11/Makefile
@@ -1,7 +1,7 @@
TOP = ../../..
include $(TOP)/configs/current
-EXTRA_DEFINES = -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER \
+EXTRA_DEFINES = -DXF86VIDMODE -D_REENTRANT \
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
SOURCES = \
@@ -39,13 +39,9 @@ SOURCES = \
dri2_glx.c \
dri2.c
-include $(TOP)/src/mesa/sources.mak
+GLAPI_LIB = $(TOP)/src/mesa/libglapi.a
-MESA_GLAPI_ASM_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_ASM_SOURCES))
-MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES))
-MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS))
-
-OBJECTS = $(SOURCES:.c=.o) $(MESA_GLAPI_OBJECTS)
+OBJECTS = $(SOURCES:.c=.o)
INCLUDES = -I. \
-I$(TOP)/include \
@@ -70,18 +66,19 @@ INCLUDES = -I. \
default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
# Make libGL
-$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
+$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(GLAPI_LIB) Makefile
$(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major 1 -minor 2 $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \
- $(GL_LIB_DEPS) $(OBJECTS)
+ $(GL_LIB_DEPS) $(OBJECTS) $(GLAPI_LIB)
+$(GLAPI_LIB):
+ @$(MAKE) -C $(TOP)/src/mesa libglapi.a
-depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile
+depend: $(SOURCES) Makefile
rm -f depend
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
- $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES)
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES)
# Emacs tags