Mesa (master): egl: Add Makefile.template for EGL drivers.

Chia-I Wu olv at kemper.freedesktop.org
Fri Jan 22 07:07:21 UTC 2010


Module: Mesa
Branch: master
Commit: e63272050f5775a28ab699c804a34f33940a900d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e63272050f5775a28ab699c804a34f33940a900d

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Fri Jan 22 12:02:00 2010 +0800

egl: Add Makefile.template for EGL drivers.

---

 src/egl/drivers/Makefile.template |   51 +++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/src/egl/drivers/Makefile.template b/src/egl/drivers/Makefile.template
new file mode 100644
index 0000000..02a65b0
--- /dev/null
+++ b/src/egl/drivers/Makefile.template
@@ -0,0 +1,51 @@
+# src/egl/drivers/Makefile.template
+#
+# Drivers should define
+#
+# EGL_DRIVER, the driver name
+# EGL_SOURCES, the driver sources
+# EGL_INCLUDES, the include pathes
+# EGL_CFLAGS, additional CFLAGS
+# EGL_LIBS, additional LIBS
+#
+# before including this template.
+#
+
+
+EGL_DRIVER_PATH = $(TOP)/$(LIB_DIR)/$(EGL_DRIVER)
+EGL_OBJECTS = $(EGL_SOURCES:.c=.o)
+
+
+default: depend $(EGL_DRIVER_PATH)
+
+$(EGL_DRIVER_PATH): $(EGL_DRIVER)
+	$(INSTALL) $< $(TOP)/$(LIB_DIR)
+
+$(EGL_DRIVER): $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
+	@$(MKLIB) -o $(EGL_DRIVER) -noprefix \
+		-linker '$(CC)' -ldflags '$(LDFLAGS)' \
+		-L$(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+		$(EGL_OBJECTS) $(EGL_LIBS)
+
+.c.o:
+	$(CC) -c $(EGL_INCLUDES) $(CFLAGS) $(EGL_CFLAGS) $< -o $@
+
+
+install: $(EGL_DRIVER_PATH)
+	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+	$(MINSTALL) $(EGL_DRIVER_PATH) $(DESTDIR)$(INSTALL_LIB_DIR)
+
+clean:
+	rm -f $(EGL_DRIVER)
+	rm -f $(EGL_OBJECTS)
+	rm -f depend depend.bak
+
+depend: $(EGL_SOURCES)
+	@ echo "running $(MKDEP)"
+	@ rm -f depend
+	@ touch depend
+	$(MKDEP) $(MKDEP_OPTIONS) $(EGL_INCLUDES) $(EGL_SOURCES) \
+		>/dev/null 2>/dev/null
+
+sinclude depend
+# DO NOT DELETE




More information about the mesa-commit mailing list