aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-01-23 20:18:43 +0800
committerChia-I Wu <[email protected]>2010-01-23 20:30:11 +0800
commit28c3e57c8354f988f49bac69a6866418e6009a5d (patch)
treeb7047a239d752c1c03739851dbb91894d976a746
parent6c4431c092b06d31eee5ac7ed656ab6d6423c3ef (diff)
egl: Install drivers to ${libdir}/egl.
Install EGL drivers to EGL_DRIVER_INSTALL_DIR, which is default to ${libdir}/egl.
-rw-r--r--configs/autoconf.in3
-rw-r--r--configs/default3
-rw-r--r--configure.ac7
-rw-r--r--src/egl/drivers/Makefile.template4
-rw-r--r--src/egl/main/Makefile2
-rw-r--r--src/gallium/winsys/drm/Makefile.egl15
6 files changed, 22 insertions, 12 deletions
diff --git a/configs/autoconf.in b/configs/autoconf.in
index d9fa2dafe93..b0024ec6899 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -130,6 +130,9 @@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@
+# EGL driver install directory
+EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@
+
# Xorg driver install directory (for xorg state-tracker)
XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@
diff --git a/configs/default b/configs/default
index 3aa136b9c58..d79039561e2 100644
--- a/configs/default
+++ b/configs/default
@@ -130,6 +130,9 @@ DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
+# EGL driver install directory
+EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl
+
# Xorg driver install directory (for xorg state-tracker)
XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
diff --git a/configure.ac b/configure.ac
index 370bd1b9b7f..6f8b76d7ca9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1231,6 +1231,13 @@ yes)
esac
AC_SUBST([EGL_DISPLAYS])
+AC_ARG_WITH([egl-driver-dir],
+ [AS_HELP_STRING([--with-egl-driver-dir=DIR],
+ [directory for EGL drivers [[default=${libdir}/egl]]])],
+ [EGL_DRIVER_INSTALL_DIR="$withval"],
+ [EGL_DRIVER_INSTALL_DIR='${libdir}/egl'])
+AC_SUBST([EGL_DRIVER_INSTALL_DIR])
+
AC_ARG_WITH([xorg-driver-dir],
[AS_HELP_STRING([--with-xorg-driver-dir=DIR],
[Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],
diff --git a/src/egl/drivers/Makefile.template b/src/egl/drivers/Makefile.template
index 02a65b094a7..e9a614ce62d 100644
--- a/src/egl/drivers/Makefile.template
+++ b/src/egl/drivers/Makefile.template
@@ -32,8 +32,8 @@ $(EGL_DRIVER): $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
install: $(EGL_DRIVER_PATH)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(MINSTALL) $(EGL_DRIVER_PATH) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR)
+ $(MINSTALL) $(EGL_DRIVER_PATH) $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR)
clean:
rm -f $(EGL_DRIVER)
diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile
index 66f8f01b8e2..20614d87536 100644
--- a/src/egl/main/Makefile
+++ b/src/egl/main/Makefile
@@ -53,7 +53,7 @@ EGL_DEFAULT_DISPLAY = $(word 1, $(EGL_DISPLAYS))
LOCAL_CFLAGS += \
-D_EGL_DEFAULT_DISPLAY=\"$(EGL_DEFAULT_DISPLAY)\" \
- -D_EGL_DRIVER_SEARCH_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
+ -D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\"
.c.o:
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
diff --git a/src/gallium/winsys/drm/Makefile.egl b/src/gallium/winsys/drm/Makefile.egl
index 1b10f1115ca..d79ceee5b78 100644
--- a/src/gallium/winsys/drm/Makefile.egl
+++ b/src/gallium/winsys/drm/Makefile.egl
@@ -29,14 +29,12 @@ kms_LIBS = $(common_LIBS)
EGL_DISPLAY_DRIVERS = $(foreach dpy, $(EGL_DISPLAYS), egl_$(dpy)_$(EGL_DRIVER_NAME).so)
-LIB_GALLIUM_DIR = $(TOP)/$(LIB_DIR)/gallium
-EGL_DISPLAY_LIBS = $(foreach drv, $(EGL_DISPLAY_DRIVERS), $(LIB_GALLIUM_DIR)/$(drv))
+EGL_DISPLAY_LIBS = $(foreach drv, $(EGL_DISPLAY_DRIVERS), $(TOP)/$(LIB_DIR)/$(drv))
default: $(EGL_DISPLAY_LIBS)
-$(EGL_DISPLAY_LIBS): $(LIB_GALLIUM_DIR)/%.so: %.so
- @mkdir -p $(LIB_GALLIUM_DIR)
- $(INSTALL) $^ $(LIB_GALLIUM_DIR)
+$(EGL_DISPLAY_LIBS): $(TOP)/$(LIB_DIR)/%.so: %.so
+ $(INSTALL) $< $(TOP)/$(LIB_DIR)
define mklib-egl
$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
@@ -56,10 +54,9 @@ clean:
-rm -f $(EGL_DISPLAY_DRIVERS)
install: $(EGL_DISPLAY_LIBS)
- @$(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
- @echo "Install $(EGL_DISPLAY_DRIVERS)"
- @for lib in "$(EGL_DISPLAY_LIBS)"; do \
- $(MINSTALL) -m 755 "$$lib" $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR); \
+ $(INSTALL) -d $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR)
+ for lib in "$(EGL_DISPLAY_LIBS)"; do \
+ $(MINSTALL) -m 755 "$$lib" $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR); \
done
depend: