X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3aa695e3e07925d89bae59e0890f1f3b55b9e15a..c4d749b78a46e69887ec9662851f180e587f2d34:/buildlib/library.mak

diff --git a/buildlib/library.mak b/buildlib/library.mak
index 029e87463..cc0286d7e 100644
--- a/buildlib/library.mak
+++ b/buildlib/library.mak
@@ -51,7 +51,7 @@ $(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR)
 	ln -sf $(<F) $@
 
 # The binary build rule
-$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
+$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) $(LIBRARYDEPENDS)
 	-rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null
 	echo Building shared library $@
 	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
@@ -61,9 +61,9 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
 
 # Compilation rules
 vpath %.cc $(SUBDIRS)
-$(OBJ)/%.opic: %.cc
+$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS)
 	echo Compiling $< to $@
-	$(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -o $@ $<
+	$(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -o $@ $(abspath $<)
 	$(DoDep)
 
 # Include the dependencies that are available