X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/e1b1ae50b50242e30a56e14df854d4368e8b49c2..e169fa4a85e03b2b03bb1bdba716b96654ae6050:/buildlib/staticlibrary.mak?ds=inline diff --git a/buildlib/staticlibrary.mak b/buildlib/staticlibrary.mak index 998ca5bf2..e81770e8a 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) $(CXXSTD) $(CXXFLAGS) -o $@ '$(abspath $<)' $(DoDep) # Include the dependencies that are available