summaryrefslogtreecommitdiff
path: root/src/egl/wayland/Makefile
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-02-04 12:24:08 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-02-07 13:55:20 +0100
commit214fc6e85057bc4661b76ae3f3c22733910da69c (patch)
tree6b8a31fcf2180ee6f5575db6fabb7da7e51a9254 /src/egl/wayland/Makefile
parente586c4b7634f856a350f029709adc8a32271562c (diff)
egl: Implement libwayland-egl
This library is required and defined by wayland for EGL implementations supporting wayland.
Diffstat (limited to 'src/egl/wayland/Makefile')
-rw-r--r--src/egl/wayland/Makefile67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/egl/wayland/Makefile b/src/egl/wayland/Makefile
new file mode 100644
index 0000000000..4cd036519d
--- /dev/null
+++ b/src/egl/wayland/Makefile
@@ -0,0 +1,67 @@
+# src/egl/main/Makefile
+
+TOP = ../../..
+include $(TOP)/configs/current
+
+INCLUDE_DIRS = -I$(TOP)/include
+
+HEADERS = wayland-egl-priv.h
+SOURCES = wayland-egl.c
+
+OBJECTS = $(SOURCES:.c=.o)
+
+LOCAL_CFLAGS = -I$(TOP)/include/EGL $(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,@INSTALL_DIR@,$(INSTALL_DIR),' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
+ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
+ -e 's,@WAYLAND_EGL_PC_REQ_PRIV@,$(WAYLAND_EGL_PC_REQ_PRIV),' \
+ -e 's,@WAYLAND_EGL_PC_LIB_PRIV@,$(WAYLAND_EGL_PC_LIB_PRIV),' \
+ -e 's,@WAYLAND_EGL_PC_CFLAGS@,$(WAYLAND_EGL_PC_CFLAGS),' \
+ -e 's,@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