]> mj.ucw.cz Git - libucw.git/blobdiff - build/Makebottom
Makefiles: implement a symlink-alias macro.
[libucw.git] / build / Makebottom
index bf9a49e966489e0c5479274212b0ec0c56fcc064..19d1179dc3fcf5ec5416ab1b64f4fa9dcbdbcbb3 100644 (file)
@@ -55,13 +55,13 @@ $(o)/%.cf: $(s)/%.cf $(o)/config.mk $(s)/build/genconf
        $(Q)rm -f $@
        $(Q)ar rcs $@ $^
 ifdef CONFIG_INSTALL_API
-       $(Q)$(call symlink,$@,run/lib)
+       $(Q)$(call symlink-alias,$@,run/lib,$(*F)$(LIBNAME_INFIX).a)
 endif
 
 %.so:
        $(M)LD $@
        $(Q)$(CC) $(LSHARED) $(LDFLAGS) -o $@ $^
-       $(Q)$(call symlink,$@,run/lib)
+       $(Q)$(call symlink-alias,$@,run/lib,$(*F)$(SONAME_INFIX).so$(SONAME_SUFFIX))
 
 $(o)/%.pc: $(s)/%.pc $(o)/%.$(LS)
        $(M)PC $<
@@ -123,7 +123,7 @@ $(o)/%-tt.o: $(s)/%.c $(o)/autoconf.h
 
 $(o)/%-t: $(o)/%-tt.o $(TESTING_DEPS)
        $(M)LD-TEST $@
-       $(Q)$(CC) $(LDFLAGS) -o $@ $(shell $(s)/build/lib-flags $^) $(LIBS)
+       $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(s)/build/lib-flags $^) $(LIBS)
 
 $(o)/%.test: $(s)/%.t $(s)/build/tester
        $(M)TEST $@
@@ -135,7 +135,7 @@ BINDIR=bin
 
 $(o)/%: $(o)/%.o
        $(M)LD $@
-       $(Q)$(CC) $(LDFLAGS) -o $@ $(shell $(s)/build/lib-flags $^) $(LIBS)
+       $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(s)/build/lib-flags $^) $(LIBS)
        $(Q)$(call symlink,$@,run/$(BINDIR))
 
 $(o)/%: $(s)/%.sh $(o)/config.mk $(s)/build/genconf