summaryrefslogtreecommitdiff
path: root/src/egl/main/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/Makefile')
-rw-r--r--src/egl/main/Makefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile
index 3b4ebf7fec..82fd855b1d 100644
--- a/src/egl/main/Makefile
+++ b/src/egl/main/Makefile
@@ -82,10 +82,27 @@ install-headers:
$(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