Whamcloud - gitweb
LU-10638 build: add support for Scientific
[tools/e2fsprogs.git] / lib / Makefile.library
index 5cff608..1b86b02 100644 (file)
@@ -4,13 +4,22 @@ install-shlibs::
 
 uninstall-shlibs::
 
-subdirs::
+real-subdirs::
+
+subdirs:: Makefile
+       $(Q) $(MAKE) -s real-subdirs
+       $(Q) touch subdirs
+
+clean::
+       $(Q) $(RM) -f subdirs
 
 $(LIBRARY).a: $(OBJS)
-       @echo " GEN_LIB $@"
-       @(if test -r $@; then $(RM) -f $@.bak && $(MV) $@ $@.bak; fi)
-       @$(ARGEN) $@ $(OBJS)
+       $(E) "  GEN_LIB $@"
+       $(Q) (if test -r $@; then $(RM) -f $@.bak && $(MV) $@ $@.bak; fi)
+       $(Q) $(ARGEN) $@ $(OBJS)
        -@$(RANLIB) $@
-       @$(RM) -f ../$@
-       @$(LN) $@ ../$@
+       $(Q) $(RM) -f ../$@
+       $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
+               `echo $(my_dir) | sed -e 's;lib/;;'`/$@ $@)
 
+$(LIB)/$(LIBRARY).a: $(LIBRARY).a