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 = \
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 \
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