X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/e1b1ae50b50242e30a56e14df854d4368e8b49c2..aaf677da5b62d3d0fdeb26f9b4c63fed544b63cd:/buildlib/staticlibrary.mak diff --git a/buildlib/staticlibrary.mak b/buildlib/staticlibrary.mak index 998ca5bf2..86908700f 100644 --- a/buildlib/staticlibrary.mak +++ b/buildlib/staticlibrary.mak @@ -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,12 +42,15 @@ $($(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) $(OBJ)/%.o: %.cc echo Compiling $< to $@ - $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< + $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) -o $@ $(abspath $<) $(DoDep) # Include the dependencies that are available