This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 388daed53031b9c5e256025809e9d10c3849708c (commit) from 9732f5ac369f2bdf45492cfa4af74092654371aa (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/388daed53031b9c5e256025809e9d10c38497...
commit 388daed53031b9c5e256025809e9d10c3849708c Author: Cyril Hrubis metan@ucw.cz Date: Wed Jan 2 21:49:28 2013 +0100
build: Fix library filenames and symlinks.
Now libraries have correct realname, soname, etc...
diff --git a/build/Makefile b/build/Makefile index 2c1aa01..5b8a115 100644 --- a/build/Makefile +++ b/build/Makefile @@ -1,43 +1,48 @@ LIB_OBJECTS=$(shell ./get_objs.sh)
-all: libGP.a libGP.so libGP.so.0 +include ../libver.mk
-libGP.a: $(LIB_OBJECTS) -libGP.so: $(LIB_OBJECTS) -libGP.so.0: $(LIB_OBJECTS) +LIB_NAME=libGP + +STATIC_LIB=$(LIB_NAME).$(LIB_VERSION).a +DYNAMIC_LIB=$(LIB_NAME).so.$(LIB_VERSION).$(LIB_RELEASE) +SONAME=$(LIB_NAME).so.$(LIB_MAJOR) +SYMLINKS=$(LIB_NAME).so.$(LIB_MAJOR) $(LIB_NAME).so + +all: $(STATIC_LIB) $(DYNAMIC_LIB) $(SYMLINKS)
rebuild: all
clean: ifdef VERBOSE - rm -rf libGP.a libGP.so libGP.so.0 .lock + rm -rf $(STATIC_LIB) $(DYNAMIC_LIB) $(SYMLINKS) else - @echo "RM libGP.a libGP.so libGP.so.0 .lock" - @rm -rf libGP.a libGP.so libGP.so.0 .lock + @echo "RM $(STATIC_LIB) $(DYNAMIC_LIB) $(SYMLINKS)" + @rm -rf $(STATIC_LIB) $(DYNAMIC_LIB) $(SYMLINKS) endif
-libGP.a: +$(STATIC_LIB): ifdef VERBOSE - $(AR) rcs libGP.a $(LIB_OBJECTS) + $(AR) rcs $@ $(LIB_OBJECTS) else - @echo "AR libGP.a" - @$(AR) rcs libGP.a $(LIB_OBJECTS) + @echo "AR $@" + @$(AR) rcs $@ $(LIB_OBJECTS) endif
-libGP.so: +$(DYNAMIC_LIB): ifdef VERBOSE - $(CC) -fPIC -dPIC --shared -Wl,-soname -Wl,libGP.so.0 $(LIB_OBJECTS) -o libGP.so + $(CC) -fPIC -dPIC --shared -Wl,-soname -Wl,$(SONAME) $(LIB_OBJECTS) -o $@ else - @echo "LD libGP.so" - @$(CC) -fPIC -dPIC --shared -Wl,-soname -Wl,libGP.so.0 $(LIB_OBJECTS) -o libGP.so + @echo "LD $@" + @$(CC) -fPIC -dPIC --shared -Wl,-soname -Wl,$(SONAME) $(LIB_OBJECTS) -o $@ endif
-libGP.so.0: libGP.so +$(SYMLINKS): $(DYNAMIC_LIB) ifdef VERBOSE - rm -f libGP.so.0 - ln -s libGP.so libGP.so.0 + rm -f $@ + ln -s $< $@ else - @echo "LN libGP.so.0" - @rm -f libGP.so.0 - @ln -s libGP.so libGP.so.0 + @echo "LN $@" + @rm -f $@ + @ln -s $< $@ endif diff --git a/lib.mk b/lib.mk index 98a7e5a..0c5917b 100644 --- a/lib.mk +++ b/lib.mk @@ -6,34 +6,44 @@ ifndef LIBNAME $(error LIBNAME not defined, fix your library Makefile) endif
+ifeq ($(BUILDLIB),yes) # # Rules for single library, applied only when objects # are not linked to the libGP.so. This generates libGP_$(LIBNAME). # -ifeq ($(BUILDLIB),yes) -# BUILDLIB = yes
-LIB=libGP_$(LIBNAME) -LIBP=$(TOPDIR)/build/ +include $(TOPDIR)/libver.mk + +LIB_NAME=libGP_$(LIBNAME) +BUILD_DIR=$(TOPDIR)/build/
-ALL+=$(LIBP)$(LIB).so $(LIBP)$(LIB).a -CLEAN+=$(LIBP)$(LIB).so $(LIBP)$(LIB).so.0 $(LIBP)$(LIB).a -OBJS=$(CSOURCES:.c=.o) +STATIC_LIB=$(LIB_NAME).$(LIB_VERSION).a +DYNAMIC_LIB=$(LIB_NAME).so.$(LIB_VERSION).$(LIB_RELEASE) +SONAME=$(LIB_NAME).so.$(LIB_MAJOR) +SYMLINKS=$(LIB_NAME).so.$(LIB_MAJOR) $(LIB_NAME).so
+LIBS=$(BUILD_DIR)$(STATIC_LIB) $(BUILD_DIR)$(DYNAMIC_LIB) + +ALL+=$(LIBS) $(SYMLINKS) +CLEAN+=$(LIBS) $(addprefix $(BUILD_DIR),$(SYMLINKS)) + +# +# OBJECTS are set in post.mk so we need to set it here too to have +# correct dependencies we don't care that they are overwritten laten +# +OBJECTS=$(CSOURCES=.c=.o)
-$(LIBP)$(LIB).so: $(OBJS) +$(BUILD_DIR)$(DYNAMIC_LIB): $(OBJECTS) ifdef VERBOSE - rm -f $(LIBP)$(LIB).so.0 - cd $(LIBP) && ln -s $(LIB).so $(LIB).so.0 - $(CC) -fPIC --shared -Wl,-soname -Wl,$(LIB).so.0 $(OBJECTS) -o $@ + rm -f $@ + $(CC) -fPIC --shared -Wl,-soname -Wl,$(SONAME) $(OBJECTS) -o $@ else - @rm -f $(LIBP)$(LIB).so.0 - @cd $(LIBP) && ln -s $(LIB).so $(LIB).so.0 + @rm -f $(@) @echo "LD $@" - @$(CC) -fPIC --shared -Wl,-soname -Wl,$(LIB).so.0 $(OBJECTS) -o $@ + @$(CC) -fPIC --shared -Wl,-soname -Wl,$(SONAME) $(OBJECTS) -o $@ endif
-$(LIBP)$(LIB).a: $(OBJS) +$(BUILD_DIR)$(STATIC_LIB): $(OBJECTS) ifdef VERBOSE $(AR) rcs $@ $(OBJECTS) else @@ -41,8 +51,21 @@ else @$(AR) rcs $@ $(OBJECTS) endif
+$(SYMLINKS): $(BUILD_DIR)$(DYNAMIC_LIB) +ifdef VERBOSE + rm -f $(BUILD_DIR)$@ + cd $(BUILD_DIR) && ln -s $(DYNAMIC_LIB) $@ +else + @echo "LN $@" + @rm -f $(BUILD_DIR)$@ + @cd $(BUILD_DIR) && ln -s $(DYNAMIC_LIB) $@ +endif + else -# BUILDLIB = no +# +# If we are not executed from the top Makefile, trigger +# libGP.so rebuild. +# include $(TOPDIR)/config.mk
ifndef TOP_MAKE diff --git a/libver.mk b/libver.mk new file mode 100644 index 0000000..747c7b4 --- /dev/null +++ b/libver.mk @@ -0,0 +1,10 @@ +# +# Contains GFXprim library version used +# for library names, soname etc +# + +LIB_MAJOR=0 +LIB_MINOR=0 +LIB_RELEASE=0 + +LIB_VERSION=$(LIB_MAJOR).$(LIB_MINOR)
-----------------------------------------------------------------------
Summary of changes: build/Makefile | 47 ++++++++++++++++++++++++++--------------------- lib.mk | 55 +++++++++++++++++++++++++++++++++++++++---------------- libver.mk | 10 ++++++++++ 3 files changed, 75 insertions(+), 37 deletions(-) create mode 100644 libver.mk
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.