From: Chia-I Wu Date: Thu, 21 Jan 2010 09:58:28 +0000 (+0800) Subject: glx: Build GLX normally. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=146931769c75978c58ac0088e8ab630fc41074ec;p=mesa.git 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. --- 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