From bc918efb5643a6d23711b2ae6247be87615c847d Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 6 May 2010 11:03:00 +0800 Subject: mapi: Install .pc file for OpenVG. --- src/mapi/vgapi/Makefile | 20 +++++++++++++++++++- src/mapi/vgapi/vg.pc.in | 12 ++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/mapi/vgapi/vg.pc.in diff --git a/src/mapi/vgapi/Makefile b/src/mapi/vgapi/Makefile index 8e07ac5dca..702db03d15 100644 --- a/src/mapi/vgapi/Makefile +++ b/src/mapi/vgapi/Makefile @@ -48,17 +48,35 @@ vgapi_tmp.h: vgapi.csv $(MAPI)/mapi_abi.py .PHONY: clean clean: + -rm -f vg.pc -rm -f $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME) -rm -f libvgapi.a -rm -f $(VGAPI_OBJECTS) -rm -f depend depend.bak -rm -f $(GENERATED_SOURCES) +pcedit = \ + -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,@VG_PC_REQ_PRIV@,$(VG_PC_REQ_PRIV),' \ + -e 's,@VG_PC_LIB_PRIV@,$(VG_PC_LIB_PRIV),' \ + -e 's,@VG_PC_CFLAGS@,$(VG_PC_CFLAGS),' \ + -e 's,@VG_LIB@,$(VG_LIB),' + +vg.pc: vg.pc.in + @sed $(pcedit) $< > $@ + +install-pc: vg.pc + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + $(INSTALL) -m 644 $< $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + install-headers: $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/VG $(INSTALL) -m 644 $(TOP)/include/VG/*.h $(DESTDIR)$(INSTALL_INC_DIR)/VG -install: default install-headers +install: default install-headers install-pc $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) $(MINSTALL) $(TOP)/$(LIB_DIR)/$(VG_LIB_GLOB) \ $(DESTDIR)$(INSTALL_LIB_DIR) diff --git a/src/mapi/vgapi/vg.pc.in b/src/mapi/vgapi/vg.pc.in new file mode 100644 index 0000000000..63e9af8355 --- /dev/null +++ b/src/mapi/vgapi/vg.pc.in @@ -0,0 +1,12 @@ +prefix=@INSTALL_DIR@ +exec_prefix=${prefix} +libdir=@INSTALL_LIB_DIR@ +includedir=@INSTALL_INC_DIR@ + +Name: vg +Description: Mesa OpenVG 1.0 library +Requires.private: @VG_PC_REQ_PRIV@ +Version: @VERSION@ +Libs: -L${libdir} -l@VG_LIB@ +Libs.private: @VG_PC_LIB_PRIV@ +Cflags: -I${includedir} @VG_PC_CFLAGS@ -- cgit v1.2.3