--- src/Makefile.in.orig	2019-12-25 12:35:44 UTC
+++ src/Makefile.in
@@ -51,7 +51,7 @@ ALL_LIBS = $(SHARED_LIBS) $(STATIC_LIBS)
 
 all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
 libfastcommon.so: $(FAST_SHARED_OBJS)
-	$(COMPILE) -o $@ -shared $(FAST_SHARED_OBJS) $(LIB_PATH)
+	$(COMPILE) -o $@ -shared -Wl,-soname,libfastcommon.so $(FAST_SHARED_OBJS) $(LIB_PATH)
 libfastcommon.a: $(FAST_STATIC_OBJS)
 	ar rcs $@ $(FAST_STATIC_OBJS)
 .o:
@@ -67,8 +67,8 @@ install:
 	mkdir -p $(TARGET_PREFIX)/lib
 	mkdir -p $(TARGET_PREFIX)/include/fastcommon
 
-	install -m 755 $(SHARED_LIBS) $(TARGET_LIB)
-	install -m 644 $(HEADER_FILES) $(TARGET_PREFIX)/include/fastcommon
+	${BSD_INSTALL_LIB} $(SHARED_LIBS) $(TARGET_LIB)
+	${BSD_INSTALL_DATA} $(HEADER_FILES) $(TARGET_PREFIX)/include/fastcommon
 	if [ ! -e $(TARGET_PREFIX)/lib/libfastcommon.so ]; then ln -s $(TARGET_LIB)/libfastcommon.so $(TARGET_PREFIX)/lib/libfastcommon.so; fi
 clean:
 	rm -f $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
