--- Makefile.conf.orig	2020-02-10 10:28:33.000000000 +0300
+++ Makefile.conf	2020-02-10 11:00:12.000000000 +0300
@@ -45,11 +45,11 @@
 # Installation locations (edit if required)
 
 ifneq ($(HOST),MINGW)
-  prefix=/usr/local
+  prefix=@PREFIX@
   bindir=$(prefix)/bin
   incdir=$(prefix)/include
   libdir=$(prefix)/lib
-  docdir=$(prefix)/doc/routino
+  docdir=$(prefix)/share/doc/routino
   datadir=$(prefix)/share/routino
 else
   prefix="c:/Program Files/Routino"
@@ -69,9 +69,9 @@
 
 
 # Compilation programs
-CC=gcc
-CXX=g++
-LD=gcc
+#CC=gcc
+#CXX=g++
+#LD=gcc
 
 ifdef CLANG
   ifeq ($(CLANG),1)
@@ -85,7 +85,7 @@
 LDFLAGS=-lm
 
 # Language dialect selection
-CFLAGS=-std=c99
+#CFLAGS=-std=c99
 
 # Warning options
 CFLAGS+=-Wall -Wmissing-prototypes -Wextra -Wno-unused-parameter -pedantic
@@ -123,7 +123,7 @@
 
 # Extra flags for compiling libroutino shared library (visibility of symbols, shared)
 CFLAGS_LIB=-fvisibility=hidden
-LDFLAGS_LIB=-shared
+LDFLAGS_LIB=-dynamiclib -install_name @PREFIX@/lib/$@
 
 # Extra flags for compiling libroutino shared library (position independent code)
 ifeq ($(HOST),UNIX)
@@ -132,13 +132,13 @@
 endif
 
 # Extra flags for compiling libroutino shared library (SONAME)
-ifeq ($(HOST),UNIX)
-  LDFLAGS_SONAME=-Wl,-soname=libroutino.so.$(SOVERSION)
-  LDFLAGS_SLIM_SONAME=-Wl,-soname=libroutino-slim.so.$(SOVERSION)
-endif
+#ifeq ($(HOST),UNIX)
+#  LDFLAGS_SONAME=-Wl,-soname=libroutino.so.$(SOVERSION)
+#  LDFLAGS_SLIM_SONAME=-Wl,-soname=libroutino-slim.so.$(SOVERSION)
+#endif
 
 # Put the current directory in the shared library path for the router using libroutino
-LDFLAGS_LDSO=-Wl,-R.
+LDFLAGS_LDSO=-Wl,-rpath,.
 
 
 # Required for multi-threaded support (comment these two lines out if not required)
