-rm -f $(LIB)/lib$($(@F)-LIBRARY)*.dylib* 2> /dev/null
echo Building shared library $@
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
- -o $@ -dynamiclib \
+ -o $@ -Wl,-dylib_install_name,$(patsubst $(LIB)/%,/usr/lib/%,$@) -dynamiclib \
$(filter %.opic,$^) \
$($(@F)-SLIBS)