Merge remote-tracking branch 'upstream/debian/sid' into feature/install-progress...
[ntk/apt.git] / buildlib / staticlibrary.mak
index 998ca5b..ce9259d 100644 (file)
@@ -24,6 +24,9 @@ library: $($(LOCAL)-LIB)
 clean: clean/$(LOCAL)
 veryclean: veryclean/$(LOCAL)
 
+# Make Directories
+MKDIRS += $(OBJ) $(DEP) $(LIB) $(dir $($(LOCAL)-HEADERS))
+
 # The clean rules
 .PHONY: clean/$(LOCAL) veryclean/$(LOCAL)
 clean/$(LOCAL):
@@ -39,6 +42,9 @@ $($(LOCAL)-LIB): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
        echo Building library $@
        -rm $@ > /dev/null 2>&1
        $(AR) cq $@ $(filter %.o,$^)
+ifneq ($(words $(RANLIB)),0)
+       $(RANLIB) $@
+endif
 
 # Compilation rules
 vpath %.cc $(SUBDIRS)