+vserverimpl.so vduimpl.so: %.so: %.o
+ # relink the object against libvserver with libtool
+ ../libtool --tag=CC --mode=link $(CC) -shared -o $@ $< ../lib/libvserver.la
+
+util_vserver_vars.py: ../scripts/util-vserver-vars
+ install -m 644 $< $@
+
+install: $(ALL)
+ # install relinked libraries and byte-compiled scripts
+ python setup.py install --root="$(DESTDIR)"
+ # reinstall libraries with libtool so that the final path
+ # to libvserver is resolved
+ for so in $(filter %.so, $(ALL)) ; do \
+ ../libtool --tag=CC --mode=install install "$$so" `find "$(DESTDIR)" -name "$$so"` ; \
+ done
+
+clean:
+ rm -rf $(ALL) *.o build
+
+.PHONY: all install clean