egl: Update driver Makefiles.
authorChia-I Wu <olvaffe@gmail.com>
Fri, 22 Jan 2010 05:29:10 +0000 (13:29 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Fri, 22 Jan 2010 05:29:23 +0000 (13:29 +0800)
Update to use the new Makefile.template.

src/egl/drivers/glx/Makefile
src/egl/drivers/xdri/Makefile

index 20ef0352ad9cb407a0d44e2f0c122e2c752a090f..634638f5387a11cdea55f2a0443a186325c5da5a 100644 (file)
@@ -1,77 +1,16 @@
 # src/egl/drivers/glx/Makefile
 
-# Build XEGL DRI driver loader library:  egl_glx.so
-
-
 TOP = ../../../..
 include $(TOP)/configs/current
 
+EGL_DRIVER = egl_glx.so
+EGL_SOURCES = egl_glx.c
 
-EXTRA_DEFINES = -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
-
-DRIVER_NAME = egl_glx.so
-
-
-INCLUDE_DIRS = \
-       -I. \
-       -I/usr/include \
-       $(shell pkg-config --cflags-only-I libdrm) \
+EGL_INCLUDES = \
        -I$(TOP)/include \
-       -I$(TOP)/include/GL/internal \
-       -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/mesa/drivers/dri/common \
-       -I$(TOP)/src/mesa/main \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/egl/main \
-       -I$(TOP)/src/glx/x11
-
-SOURCES = egl_glx.c
-
-OBJECTS = $(SOURCES:.c=.o)
-
-DRM_LIB = `pkg-config --libs libdrm`
-
-MISC_LIBS = -ldl -lXext -lGL
-
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
-
-
-.PHONY: library
-
-
-default: depend library Makefile
-
-
-library: $(TOP)/$(LIB_DIR)/$(DRIVER_NAME)
-
-
-# Make the egl_glx.so library
-$(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(OBJECTS)
-       $(TOP)/bin/mklib -o $(DRIVER_NAME) \
-               -noprefix \
-               -major 1 -minor 0 \
-               -L$(TOP)/$(LIB_DIR) \
-               -install $(TOP)/$(LIB_DIR) \
-               $(OBJECTS) $(DRM_LIB) $(MISC_LIBS)
-
-install:
-       $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
-       $(MINSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(DESTDIR)$(INSTALL_LIB_DIR)
-
-clean:
-       rm -f *.o
-       rm -f *.so
-       rm -f depend depend.bak
-
+       -I$(TOP)/src/egl/main
 
-depend: $(SOURCES) $(HEADERS)
-       @ echo "running $(MKDEP)"
-       @ rm -f depend
-       @ touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
-               $(SOURCES) $(HEADERS) >/dev/null 2>/dev/null
+EGL_CFLAGS =
+EGL_LIBS = -lX11 -lGL
 
-include depend
-# DO NOT DELETE
+include ../Makefile.template
index 4c1fc9071c5457b4bd0df8f284a3bc1f46421cfd..8e748b71cd4efc820668b2458d132b3bdf347c39 100644 (file)
@@ -1,78 +1,28 @@
 # src/egl/drivers/xdri/Makefile
 
-# Build XEGL DRI driver loader library:  egl_xdri.so
-
-
 TOP = ../../../..
 include $(TOP)/configs/current
 
+EGL_DRIVER = egl_xdri.so
 
-DRIVER_NAME = egl_xdri.so
-
-
-INCLUDE_DIRS = \
-       -I. \
-       -I/usr/include \
+# steal sources from GLX
+GLX_SOURCES = dri_common.c XF86dri.c dri2.c dri2_glx.c dri_glx.c
+GLX_SOURCES := $(addprefix ../../../glx/x11/,$(GLX_SOURCES))
+GLX_INCLUDES = \
        $(shell pkg-config --cflags-only-I libdrm) \
-       -I$(TOP)/include \
        -I$(TOP)/include/GL/internal \
-       -I$(TOP)/src/mesa \
+       -I$(TOP)/src/glx/x11 \
        -I$(TOP)/src/mesa/glapi \
-       -I$(TOP)/src/egl/main \
-       -I$(TOP)/src/glx/x11
-
-HEADERS = glxinit.h driinit.h
-SOURCES = egl_xdri.c glxinit.c driinit.c
-
-DRI_SOURCES = dri_common.c XF86dri.c dri2.c dri2_glx.c dri_glx.c
-DRI_SOURCES := $(addprefix ../../../glx/x11/,$(DRI_SOURCES))
-
-SOURCES += $(DRI_SOURCES)
-
-OBJECTS = $(SOURCES:.c=.o)
-
-DRM_LIB = `pkg-config --libs libdrm`
-
-CFLAGS += -DGLX_DIRECT_RENDERING
-
-.c.o:
-       $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
-
-
-.PHONY: library
-
-
-default: depend library Makefile
-
-
-library: $(TOP)/$(LIB_DIR)/$(DRIVER_NAME)
-
-
-# Make the egl_xdri.so library
-$(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(OBJECTS)
-       $(TOP)/bin/mklib -o $(DRIVER_NAME) \
-               -noprefix \
-               -major 1 -minor 0 \
-               -L$(TOP)/$(LIB_DIR) \
-               -install $(TOP)/$(LIB_DIR) \
-               $(OBJECTS) $(DRM_LIB) $(GL_LIB_DEPS)
-
-install:
-       $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
-       $(MINSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(DESTDIR)$(INSTALL_LIB_DIR)
-
-clean:
-       rm -f *.o
-       rm -f *.so
-       rm -f depend depend.bak
+       -I$(TOP)/src/mesa
+GLX_CFLAGS = -DGLX_DIRECT_RENDERING
 
+EGL_SOURCES = egl_xdri.c glxinit.c driinit.c $(GLX_SOURCES)
+EGL_INCLUDES = \
+       -I$(TOP)/include \
+       -I$(TOP)/src/egl/main \
+       $(GLX_INCLUDES)
 
-depend: $(SOURCES) $(HEADERS)
-       @ echo "running $(MKDEP)"
-       @ rm -f depend
-       @ touch depend
-       $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
-               $(SOURCES) $(HEADERS) >/dev/null 2>/dev/null
+EGL_CFLAGS = $(GLX_CFLAGS)
+EGL_LIBS = -lX11 -lGL
 
-include depend
-# DO NOT DELETE
+include ../Makefile.template