summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-inst/makefile1
-rw-r--r--buildlib/library.mak4
2 files changed, 3 insertions, 2 deletions
diff --git a/apt-inst/makefile b/apt-inst/makefile
index cfb22741a..da983df5f 100644
--- a/apt-inst/makefile
+++ b/apt-inst/makefile
@@ -18,6 +18,7 @@ MAJOR=1.5
MINOR=0
SLIBS=$(PTHREADLIB) -lapt-pkg
APT_DOMAIN:=libapt-inst$(MAJOR)
+LIBRARYDEPENDS=$(LIB)/libapt-pkg.so
# Source code for the contributed non-core things
SOURCE = contrib/extracttar.cc contrib/arfile.cc
diff --git a/buildlib/library.mak b/buildlib/library.mak
index 029e87463..ef1306b66 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,7 +61,7 @@ $(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 $@ $<
$(DoDep)