Mesa (master): egl/wayland: Move wayland-egl into a subdir
Kristian Høgsberg
krh at kemper.freedesktop.org
Fri Mar 4 21:39:29 UTC 2011
Module: Mesa
Branch: master
Commit: e71920929e3933b007b0bd2358def91df1447eb3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e71920929e3933b007b0bd2358def91df1447eb3
Author: Benjamin Franzke <benjaminfranzke at googlemail.com>
Date: Thu Mar 3 11:05:03 2011 +0100
egl/wayland: Move wayland-egl into a subdir
This hopefully fixes wayland-egl's dependency
resolution for autogenerated wayland-drm headers.
---
src/egl/drivers/dri2/Makefile | 2 +-
src/egl/wayland/Makefile | 77 ++++----------------
src/egl/wayland/wayland-egl/Makefile | 71 ++++++++++++++++++
.../wayland/{ => wayland-egl}/wayland-egl-priv.h | 0
src/egl/wayland/{ => wayland-egl}/wayland-egl.c | 0
.../wayland/{ => wayland-egl}/wayland-egl.pc.in | 0
src/gallium/state_trackers/egl/Makefile | 2 +-
7 files changed, 87 insertions(+), 65 deletions(-)
diff --git a/src/egl/drivers/dri2/Makefile b/src/egl/drivers/dri2/Makefile
index eac599e..4783975 100644
--- a/src/egl/drivers/dri2/Makefile
+++ b/src/egl/drivers/dri2/Makefile
@@ -27,7 +27,7 @@ endif
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
EGL_SOURCES += platform_wayland.c
EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \
- -I$(TOP)/src/egl/wayland \
+ -I$(TOP)/src/egl/wayland/wayland-egl \
-I$(TOP)/src/egl/wayland/wayland-drm
EGL_LIBS += $(WAYLAND_LIBS) \
$(TOP)/src/egl/wayland/wayland-drm/libwayland-drm.a
diff --git a/src/egl/wayland/Makefile b/src/egl/wayland/Makefile
index f484ff8..c38a130 100644
--- a/src/egl/wayland/Makefile
+++ b/src/egl/wayland/Makefile
@@ -3,62 +3,10 @@
TOP = ../../..
include $(TOP)/configs/current
-INCLUDE_DIRS = -I$(TOP)/include
+SUBDIRS = wayland-drm wayland-egl
-HEADERS = wayland-egl-priv.h
-SOURCES = wayland-egl.c
+default: subdirs
-OBJECTS = $(SOURCES:.c=.o)
-
-LOCAL_CFLAGS = -I$(TOP)/include/EGL \
- -I$(TOP)/src/egl/wayland/wayland-drm \
- $(LIBDRM_CFLAGS) \
- $(WAYLAND_CFLAGS)
-
-LOCAL_LIBS =
-
-SUBDIRS = wayland-drm
-
-.c.o:
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
-
-
-default: subdirs depend library
-
-# wayland-egl Library
-library: $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME)
-
-$(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME): $(OBJECTS) $(LOCAL_LIBS)
- $(MKLIB) -o $(WAYLAND_EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
- -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
- -L$(TOP)/$(LIB_DIR) $(WAYLAND_EGL_LIB_DEPS) \
- $(OBJECTS) $(LOCAL_LIBS)
-
-PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig
-
-gl_pcedit = sed \
- -e 's, at INSTALL_DIR@,$(INSTALL_DIR),' \
- -e 's, at INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
- -e 's, at INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
- -e 's, at VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
- -e 's, at WAYLAND_EGL_PC_REQ_PRIV@,$(WAYLAND_EGL_PC_REQ_PRIV),' \
- -e 's, at WAYLAND_EGL_PC_LIB_PRIV@,$(WAYLAND_EGL_PC_LIB_PRIV),' \
- -e 's, at WAYLAND_EGL_PC_CFLAGS@,$(WAYLAND_EGL_PC_CFLAGS),' \
- -e 's, at WAYLAND_EGL_LIB@,$(WAYLAND_EGL_LIB),'
-
-wayland-egl.pc: wayland-egl.pc.in
- $(gl_pcedit) $< > $@
-
-install: default wayland-egl.pc
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(MINSTALL) $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_GLOB) \
- $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR)
- $(INSTALL) -m 644 wayland-egl.pc $(DESTDIR)$(PKG_CONFIG_DIR)
-
-clean:
- -rm -f *.o
- -rm -f depend depend.bak
subdirs:
@for dir in $(SUBDIRS) ; do \
@@ -67,13 +15,16 @@ subdirs:
fi \
done
-depend: $(SOURCES) $(HEADERS)
- @ echo "running $(MKDEP)"
- @ rm -f depend
- @ touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
- $(SOURCES) $(HEADERS) > /dev/null 2>/dev/null
-
+install:
+ @for dir in $(SUBDIRS) ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE) install) || exit 1 ; \
+ fi \
+ done
--include depend
-# DO NOT DELETE
+clean:
+ - at for dir in $(SUBDIRS) ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE) clean) ; \
+ fi \
+ done
diff --git a/src/egl/wayland/wayland-egl/Makefile b/src/egl/wayland/wayland-egl/Makefile
new file mode 100644
index 0000000..b9d13dc
--- /dev/null
+++ b/src/egl/wayland/wayland-egl/Makefile
@@ -0,0 +1,71 @@
+# src/egl/wayland/wayland-egl/Makefile
+
+TOP = ../../../..
+include $(TOP)/configs/current
+
+INCLUDE_DIRS = -I$(TOP)/include \
+ -I$(TOP)/include/EGL \
+ -I$(TOP)/src/egl/wayland/wayland-drm
+
+
+HEADERS = wayland-egl-priv.h
+SOURCES = wayland-egl.c
+
+OBJECTS = $(SOURCES:.c=.o)
+
+LOCAL_CFLAGS = $(LIBDRM_CFLAGS) \
+ $(WAYLAND_CFLAGS)
+
+LOCAL_LIBS =
+
+.c.o:
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
+
+
+default: depend library
+
+# wayland-egl Library
+library: $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME)
+
+$(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME): $(OBJECTS) $(LOCAL_LIBS)
+ $(MKLIB) -o $(WAYLAND_EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+ -L$(TOP)/$(LIB_DIR) $(WAYLAND_EGL_LIB_DEPS) \
+ $(OBJECTS) $(LOCAL_LIBS)
+
+PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig
+
+gl_pcedit = sed \
+ -e 's, at INSTALL_DIR@,$(INSTALL_DIR),' \
+ -e 's, at INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's, at INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
+ -e 's, at VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
+ -e 's, at WAYLAND_EGL_PC_REQ_PRIV@,$(WAYLAND_EGL_PC_REQ_PRIV),' \
+ -e 's, at WAYLAND_EGL_PC_LIB_PRIV@,$(WAYLAND_EGL_PC_LIB_PRIV),' \
+ -e 's, at WAYLAND_EGL_PC_CFLAGS@,$(WAYLAND_EGL_PC_CFLAGS),' \
+ -e 's, at WAYLAND_EGL_LIB@,$(WAYLAND_EGL_LIB),'
+
+wayland-egl.pc: wayland-egl.pc.in
+ $(gl_pcedit) $< > $@
+
+install: default wayland-egl.pc
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_GLOB) \
+ $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR)
+ $(INSTALL) -m 644 wayland-egl.pc $(DESTDIR)$(PKG_CONFIG_DIR)
+
+clean:
+ -rm -f *.o
+ -rm -f depend depend.bak
+
+depend: $(SOURCES) $(HEADERS)
+ @ echo "running $(MKDEP)"
+ @ rm -f depend
+ @ touch depend
+ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
+ $(SOURCES) $(HEADERS) > /dev/null 2>/dev/null
+
+
+-include depend
+# DO NOT DELETE
diff --git a/src/egl/wayland/wayland-egl-priv.h b/src/egl/wayland/wayland-egl/wayland-egl-priv.h
similarity index 100%
rename from src/egl/wayland/wayland-egl-priv.h
rename to src/egl/wayland/wayland-egl/wayland-egl-priv.h
diff --git a/src/egl/wayland/wayland-egl.c b/src/egl/wayland/wayland-egl/wayland-egl.c
similarity index 100%
rename from src/egl/wayland/wayland-egl.c
rename to src/egl/wayland/wayland-egl/wayland-egl.c
diff --git a/src/egl/wayland/wayland-egl.pc.in b/src/egl/wayland/wayland-egl/wayland-egl.pc.in
similarity index 100%
rename from src/egl/wayland/wayland-egl.pc.in
rename to src/egl/wayland/wayland-egl/wayland-egl.pc.in
diff --git a/src/gallium/state_trackers/egl/Makefile b/src/gallium/state_trackers/egl/Makefile
index 6864321..53673a7 100644
--- a/src/gallium/state_trackers/egl/Makefile
+++ b/src/gallium/state_trackers/egl/Makefile
@@ -25,7 +25,7 @@ x11_OBJECTS = $(x11_SOURCES:.c=.o)
wayland_INCLUDES = \
-I$(TOP)/src/gallium/winsys \
- -I$(TOP)/src/egl/wayland \
+ -I$(TOP)/src/egl/wayland/wayland-egl \
-I$(TOP)/src/egl/wayland/wayland-drm \
$(shell pkg-config --cflags-only-I libdrm wayland-client)
More information about the mesa-commit
mailing list