OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
GLESv1_CM_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@
GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@
+EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
+EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
+EGL_PC_CFLAGS = @GL_PC_CFLAGS@
EGL_DRI2_CFLAGS = @EGL_DRI2_CFLAGS@
EGL_DRI2_LIBS = @EGL_DRI2_LIBS@
$(INSTALL) -m 644 $(TOP)/include/EGL/*.h \
$(DESTDIR)$(INSTALL_INC_DIR)/EGL
-install: default install-headers
+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,@EGL_PC_REQ_PRIV@,$(EGL_PC_REQ_PRIV),' \
+ -e 's,@EGL_PC_LIB_PRIV@,$(EGL_PC_LIB_PRIV),' \
+ -e 's,@EGL_PC_CFLAGS@,$(EGL_PC_CFLAGS),' \
+ -e 's,@EGL_LIB@,$(EGL_LIB),'
+
+egl.pc: egl.pc.in
+ $(gl_pcedit) $< > $@
+
+install: default install-headers egl.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
$(MINSTALL) $(TOP)/$(LIB_DIR)/$(EGL_LIB_GLOB) \
$(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR)
+ $(INSTALL) -m 644 egl.pc $(DESTDIR)$(PKG_CONFIG_DIR)
clean:
-rm -f *.o
--- /dev/null
+prefix=@INSTALL_DIR@
+exec_prefix=${prefix}
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
+
+Name: egl
+Description: Mesa EGL library
+Requires.private: @EGL_PC_REQ_PRIV@
+Version: @VERSION@
+Libs: -L${libdir} -l@EGL_LIB@
+Libs.private: @EGL_PC_LIB_PRIV@
+Cflags: -I${includedir} @EGL_PC_CFLAGS@