From: Pavel Charvat Date: Fri, 6 Dec 2013 14:26:52 +0000 (+0100) Subject: Split install-lib* rules to runtime and dev parts. X-Git-Tag: v5.99~64 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=601499c1c1bb2196641ee1aebc127b901fe82458;p=libucw.git Split install-lib* rules to runtime and dev parts. --- diff --git a/charset/Makefile b/charset/Makefile index e54039e0..9b37fe68 100644 --- a/charset/Makefile +++ b/charset/Makefile @@ -8,11 +8,15 @@ LIBCHARSET_INCLUDES=charconv.h unicat.h fb-charconv.h stk-charconv.h mp-charconv $(o)/charset/libucw-charset.a: $(addsuffix .o,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS))) $(o)/charset/libucw-charset-pic.a: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS))) $(o)/charset/libucw-charset.so: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS))) +$(o)/charset/libucw-charset.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION) $(o)/charset/libucw-charset.pc: $(LIBUCW) ifdef CONFIG_STATIC_PIC $(o)/charset/libucw-charset.pc: $(o)/charset/libucw-charset-pic.a endif +ifdef CONFIG_INSTALL_API +$(o)/charset/libucw-charset.pc: $(o)/charset/libucw-charset.a $(o)/charset/libucw-charset-pic.a $(o)/charset/libucw-charset.so +endif API_LIBS+=libucw-charset API_INCLUDES+=$(o)/charset/.include-stamp @@ -32,14 +36,18 @@ build_charsets: clean:: rm -f $(s)/charset/misc/u-* -INSTALL_TARGETS+=install-libucw-charset +INSTALL_TARGETS+=install-libucw-charset install-libucw-charset-api + install-libucw-charset: + install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) + install -m 644 run/lib/libucw-charset.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR) + +install-libucw-charset-api: install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) install -m 644 $(addprefix run/include/charset/,$(LIBCHARSET_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset - install -m 644 run/lib/libucw-charset.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/pkgconfig/libucw-charset.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) -ifdef CONFIG_STATIC_PIC - install -m 644 run/lib/libucw-charset-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) -endif + ln -sf libucw-charset.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset.so + install -m 644 run/lib/libucw-charset.a $(DESTDIR)$(INSTALL_LIB_DIR) + install -m 644 run/lib/libucw-charset-pic.a $(DESTDIR)$(INSTALL_LIB_DIR) -.PHONY: install-libucw-charset +.PHONY: install-libucw-charset install-libucw-charset-api diff --git a/charset/libucw-charset.pc b/charset/libucw-charset.pc index 9119bdbe..b4a17ca3 100644 --- a/charset/libucw-charset.pc +++ b/charset/libucw-charset.pc @@ -8,7 +8,7 @@ picsuffix= Name: libucw-charset Description: Character set conversion library -Version: @UCW_VERSION@ +Version: @UCW_ABI_VERSION@ Cflags: -I${incdir} Libs: -L${libdir} -lucw-charset${picsuffix} Requires: @DEPS@ diff --git a/images/Makefile b/images/Makefile index 815c0781..bbf9be16 100644 --- a/images/Makefile +++ b/images/Makefile @@ -15,6 +15,9 @@ else LIBIMAGES_DEPS=$(LIBUCW) endif +ifdef CONFIG_INSTALL_API +$(o)/images/libucw-images.pc: $(o)/images/libucw-images.a $(o)/images/libucw-images-pic.a $(o)/images/libucw-images.so +endif ifdef CONFIG_STATIC_PIC LIBIMAGES_DEPS+=$(o)/images/libucw-images-pic.a endif @@ -67,6 +70,7 @@ CONFIGS+=$(LIBIMAGES_CONFIGS) $(o)/images/libucw-images.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) $(o)/images/libucw-images-pic.a: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) $(o)/images/libucw-images.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) +$(o)/images/libucw-images.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION) $(o)/images/libucw-images.pc: $(LIBIMAGES_DEPS) $(o)/images/image-tool: $(o)/images/image-tool.o $(LIBIMAGES) @@ -88,16 +92,20 @@ $(o)/images/.include-stamp: $(addprefix $(s)/images/,$(LIBIMAGES_INCLUDES)) $(o)/images/.include-stamp: IDST=images run/lib/pkgconfig/libucw-images.pc: $(o)/images/libucw-images.pc -INSTALL_TARGETS+=install-libucw-images +INSTALL_TARGETS+=install-libucw-images install-libucw-images-api + install-libucw-images: - install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_BIN_DIR) $(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR) $(INSTALL_CONFIG_DIR)) + install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_BIN_DIR) $(INSTALL_LIB_DIR) $(INSTALL_CONFIG_DIR)) install -m 755 $(LIBIMAGES_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR) + install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(LIBIMAGES_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR) + install -m 644 run/lib/libucw-images.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR) + +install-libucw-images-api: + install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_BIN_DIR) $(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR)) install -m 644 $(addprefix run/include/images/,$(LIBIMAGES_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/images - install -m 644 run/lib/libucw-images.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 run/lib/pkgconfig/libucw-images.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) - install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(LIBIMAGES_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR) -ifdef CONFIG_STATIC_PIC - install -m 644 run/lib/libucw-images-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) -endif + ln -sf libucw-images.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images.so + install -m 644 run/lib/libucw-images.a $(DESTDIR)$(INSTALL_LIB_DIR) + install -m 644 run/lib/libucw-images-pic.a $(DESTDIR)$(INSTALL_LIB_DIR) -.PHONY: install-libucw-images +.PHONY: install-libucw-images install-libucw-images-api diff --git a/images/libucw-images.pc b/images/libucw-images.pc index 3a129ceb..2b407e90 100644 --- a/images/libucw-images.pc +++ b/images/libucw-images.pc @@ -8,7 +8,7 @@ picsuffix= Name: libucw-images Description: UCW image library -Version: @UCW_VERSION@ +Version: @UCW_ABI_VERSION@ Cflags: -I${incdir} Libs: -L${libdir} -lucw-images${picsuffix} -lm -lpthread @LIBIMAGES_LIBS@ Requires: @DEPS@ diff --git a/shxml/Makefile b/shxml/Makefile index ccd03cea..598a1c66 100644 --- a/shxml/Makefile +++ b/shxml/Makefile @@ -12,11 +12,15 @@ LIBSHXML_MOD_PATHS=$(addprefix $(o)/shxml/,$(LIBSHXML_MODS)) $(o)/shxml/libucw-xml.a: $(addsuffix .o,$(LIBSHXML_MOD_PATHS)) $(o)/shxml/libucw-xml-pic.a: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS)) $(o)/shxml/libucw-xml.so: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS)) +$(o)/shxml/libucw-xml.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION) $(o)/shxml/libucw-xml.pc: $(LIBCHARSET) ifdef CONFIG_STATIC_PIC $(o)/shxml/libucw-xml.pc: $(o)/shxml/libucw-xml-pic.a endif +ifdef CONFIG_INSTALL_API +$(o)/shxml/libucw-xml.pc: $(o)/shxml/libucw-xml.a $(o)/shxml/libucw-xml-pic.a $(o)/shxml/libucw-xml.so +endif $(o)/shxml/common.o: $(o)/shxml/unicat.h $(o)/shxml/common.oo: $(o)/shxml/unicat.h @@ -41,14 +45,18 @@ $(o)/shxml/.include-stamp: $(addprefix $(s)/shxml/,$(LIBSHXML_INCLUDES)) $(o)/shxml/.include-stamp: IDST=shxml run/lib/pkgconfig/libucw-xml.pc: $(o)/shxml/libucw-xml.pc -INSTALL_TARGETS+=install-libucw-xml -install-sh-xml: +INSTALL_TARGETS+=install-libucw-xml install-libucw-xml-api + +install-libucw-xml: + install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) + install -m 644 run/lib/libucw-xml.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR) + +install-libucw-xml-api: install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) - install -m 644 $(addprefix run/include/shxml/,$(LIBSHXML_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml install -m 644 run/lib/pkgconfig/libucw-xml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) - install -m 644 run/lib/libucw-xml.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) -ifdef CONFIG_STATIC_PIC - install -m 644 run/lib/libucw-xml-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) -endif + install -m 644 $(addprefix run/include/shxml/,$(LIBSHXML_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml + ln -sf libucw-xml.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml.so + install -m 644 run/lib/libucw-xml.a $(DESTDIR)$(INSTALL_LIB_DIR) + install -m 644 run/lib/libucw-xml-pic.a $(DESTDIR)$(INSTALL_LIB_DIR) -.PHONY: install-libucw-xml +.PHONY: install-libucw-xml install-libucw-xml-api diff --git a/shxml/libucw-xml.pc b/shxml/libucw-xml.pc index 7082a543..2115af95 100644 --- a/shxml/libucw-xml.pc +++ b/shxml/libucw-xml.pc @@ -8,7 +8,7 @@ picsuffix= Name: libucw-xml Description: XML parser for LibUCW project -Version: @UCW_VERSION@ +Version: @UCW_ABI_VERSION@ Cflags: -I${incdir} Libs: -L${libdir} -lucw-xml${picsuffix} Requires: @DEPS@ diff --git a/ucw/Makefile b/ucw/Makefile index 1f236216..95731ba8 100644 --- a/ucw/Makefile +++ b/ucw/Makefile @@ -89,10 +89,14 @@ LIBUCW_MOD_PATHS=$(addprefix $(o)/ucw/,$(LIBUCW_MODS)) $(o)/ucw/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS)) $(o)/ucw/libucw-pic.a: $(addsuffix .oo,$(LIBUCW_MOD_PATHS)) $(o)/ucw/libucw.so: $(addsuffix .oo,$(LIBUCW_MOD_PATHS)) +$(o)/ucw/libucw.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION) ifdef CONFIG_STATIC_PIC $(o)/ucw/libucw.pc: $(o)/ucw/libucw-pic.a endif +ifdef CONFIG_INSTALL_API +$(o)/ucw/libucw.pc: $(o)/ucw/libucw.a $(o)/ucw/libucw-pic.a $(o)/ucw/libucw.so +endif $(o)/ucw/hashfunc.o $(o)/ucw/hashfunc.oo: CFLAGS += -funroll-loops $(o)/ucw/lizard.o: CFLAGS += $(COPT2) -funroll-loops @@ -180,15 +184,19 @@ endif CONFIGS+=libucw -INSTALL_TARGETS+=install-libucw +INSTALL_TARGETS+=install-libucw install-libucw-api + install-libucw: - install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/ $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) $(DESTDIR)$(INSTALL_CONFIG_DIR) + install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_CONFIG_DIR) + install -m 644 run/lib/libucw.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/ + install -m 644 run/$(CONFIG_DIR)/libucw $(DESTDIR)$(INSTALL_CONFIG_DIR) + +install-libucw-api: + install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/ $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) install -m 644 $(addprefix run/include/ucw/,$(LIBUCW_MAIN_INCLUDES) autoconf.h config.h) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/ install -m 644 run/lib/pkgconfig/libucw.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) - install -m 644 run/lib/libucw.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) -ifdef CONFIG_STATIC_PIC - install -m 644 run/lib/libucw-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) -endif - install -m 644 run/$(CONFIG_DIR)/libucw $(DESTDIR)$(INSTALL_CONFIG_DIR) + ln -sf libucw.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw.so + install -m 644 run/lib/libucw.a $(DESTDIR)$(INSTALL_LIB_DIR) + install -m 644 run/lib/libucw-pic.a $(DESTDIR)$(INSTALL_LIB_DIR) -.PHONY: install-libucw +.PHONY: install-libucw install-libucw-api diff --git a/ucw/default.cfg b/ucw/default.cfg index 60e1c046..7a2236da 100644 --- a/ucw/default.cfg +++ b/ucw/default.cfg @@ -4,6 +4,7 @@ # Version of the whole package Set("UCW_VERSION" => "5.0-dev"); Set("UCW_VERSION_CODE" => 5000000); +Set("UCW_ABI_VERSION" => "5.0"); # Compile everything with debug information and ASSERT's UnSet("CONFIG_DEBUG"); diff --git a/ucw/libucw.pc b/ucw/libucw.pc index 7d1c1542..3b4a092f 100644 --- a/ucw/libucw.pc +++ b/ucw/libucw.pc @@ -30,6 +30,6 @@ build_system=@INSTALL_SHARE_DIR@/ucw/build Name: libucw Description: A library of utility functions and data structures -Version: @UCW_VERSION@ +Version: @UCW_ABI_VERSION@ Cflags: -I${incdir} Libs: -L${libdir} -lucw${picsuffix} ${threads} ${regex} ${rt}