diff --git a/config/generic.mak.in b/config/generic.mak.in
index 1cb74f5..2e9cabe 100644
--- a/config/generic.mak.in
+++ b/config/generic.mak.in
@@ -35,16 +35,16 @@ AR		= ar cr
 # Compilation and linking flags
 #
 SHLIB_CFLAGS	= @C_PIC@
-COMMON_CFLAGS	= $(OPTIMIZATION) @CFLAGS@ @C_WFLAGS@ -DUNIX=1
+COMMON_CFLAGS	= $(OPTIMIZATION) @CFLAGS@ @C_WFLAGS@ -DUNIX=1 @C_PIC@
 
-SHLIB_LDFLAGS	= -shared 
-COMMON_LDFLAGS  = $(OPTIMIZATION) 
+SHLIB_LDFLAGS	= -shared -Wl,-soname,$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR)
+COMMON_LDFLAGS  = $(OPTIMIZATION) $(LDFLAGS)
 
 RPC_INCLUDES = @RPC_INCLUDES@
 
 UCB_STATICLIB = 
 
-TCL_INCLUDE = -I/usr/include/tcl8.3
+TCL_INCLUDE = -I${prefix}/include
 TCL_LINKLIB =
 
 #
diff --git a/config/unix.mak b/config/unix.mak
index e3af578..927b0fc 100644
--- a/config/unix.mak
+++ b/config/unix.mak
@@ -55,7 +55,7 @@ LINK_SW		= -L
 ifeq ($(CFG),debug)
 OPTIMIZATION	= -g
 else
-OPTIMIZATION	= -O
+OPTIMIZATION	= 
 endif
 
 #
