diff --git a/ndb/config/type_ndbapi.mk.am b/ndb/config/type_ndbapi.mk.am
index a9c98f3f6e6..864690cec7b 100644
--- a/ndb/config/type_ndbapi.mk.am
+++ b/ndb/config/type_ndbapi.mk.am
@@ -1,3 +1,2 @@
 
 INCLUDES += @NDB_NDBAPI_INCLUDES@
-LDADD += $(top_srcdir)/ndb/src/ndbapi/libNDB_API.la
diff --git a/ndb/config/type_util.mk.am b/ndb/config/type_util.mk.am
index 8c9c7e0b504..4a3740ff811 100644
--- a/ndb/config/type_util.mk.am
+++ b/ndb/config/type_util.mk.am
@@ -1,7 +1,2 @@
 
-LDADD += \
-              $(top_srcdir)/ndb/src/common/logger/liblogger.la       \
-              $(top_srcdir)/ndb/src/common/util/libgeneral.la \
-              $(top_srcdir)/ndb/src/common/portlib/unix/libportlib.la
-
 INCLUDES += @NDB_UTIL_INCLUDES@
diff --git a/ndb/src/cw/cpcd/Makefile.am b/ndb/src/cw/cpcd/Makefile.am
index 0d38f4ca536..53eeaa48dc3 100644
--- a/ndb/src/cw/cpcd/Makefile.am
+++ b/ndb/src/cw/cpcd/Makefile.am
@@ -3,7 +3,7 @@ ndbtools_PROGRAMS = ndb_cpcd
 
 ndb_cpcd_SOURCES = main.cpp CPCD.cpp Process.cpp APIService.cpp Monitor.cpp common.cpp
 
-LDADD_LOC = $(top_srcdir)/ndb/src/common/logger/liblogger.la
+LDADD_LOC = $(top_srcdir)/ndb/src/libndbclient.la
 
 include $(top_srcdir)/ndb/config/common.mk.am
 include $(top_srcdir)/ndb/config/type_util.mk.am
diff --git a/ndb/src/kernel/ndb-main/Makefile.am b/ndb/src/kernel/ndb-main/Makefile.am
index ae5e88fee1f..77565800f71 100644
--- a/ndb/src/kernel/ndb-main/Makefile.am
+++ b/ndb/src/kernel/ndb-main/Makefile.am
@@ -45,10 +45,10 @@ LDADD +=  \
               $(top_srcdir)/ndb/src/common/transporter/libtransporter.la   \
               $(top_srcdir)/ndb/src/common/debugger/libtrace.la     \
               $(top_srcdir)/ndb/src/common/debugger/signaldata/libsignaldataprint.la \
+              $(top_srcdir)/ndb/src/common/logger/liblogger.la       \
               $(top_srcdir)/ndb/src/common/mgmcommon/libmgmsrvcommon.la \
               $(top_srcdir)/ndb/src/mgmapi/libmgmapi.la \
               $(top_srcdir)/ndb/src/common/portlib/unix/libportlib.la      \
-              $(top_srcdir)/ndb/src/common/logger/liblogger.la       \
               $(top_srcdir)/ndb/src/common/util/libgeneral.la 
 
 # Don't update the files from bitkeeper
diff --git a/ndb/src/mgmclient/Makefile.am b/ndb/src/mgmclient/Makefile.am
index ae763d112e2..a560d8e6d6f 100644
--- a/ndb/src/mgmclient/Makefile.am
+++ b/ndb/src/mgmclient/Makefile.am
@@ -8,16 +8,12 @@ mgmtclient_SOURCES = \
 
 include $(top_srcdir)/ndb/config/common.mk.am
 include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
+
 INCLUDES += -I$(top_srcdir)/ndb/include/mgmapi -I$(top_srcdir)/ndb/src/common/mgmcommon
 
-LDADD += \
-	$(top_srcdir)/ndb/src/common/debugger/libtrace.la \
-	$(top_srcdir)/ndb/src/common/logger/liblogger.la \
-	$(top_srcdir)/ndb/src/common/util/libgeneral.la \
-	$(top_srcdir)/ndb/src/common/mgmcommon/libmgmsrvcommon.la \
-	$(top_srcdir)/ndb/src/mgmapi/libmgmapi.la \
-	$(top_srcdir)/ndb/src/common/portlib/unix/libportlib.la \
-	$(top_srcdir)/ndb/src/common/editline/libeditline.a
+LDADD_LOC = $(top_srcdir)/ndb/src/libndbclient.la \
+            $(top_srcdir)/ndb/src/common/editline/libeditline.a \
+            @TERMCAP_LIB@
 
 # Don't update the files from bitkeeper
 %::SCCS/s.%
diff --git a/ndb/src/mgmsrv/Makefile.am b/ndb/src/mgmsrv/Makefile.am
index 895b7375512..b70f8937b3b 100644
--- a/ndb/src/mgmsrv/Makefile.am
+++ b/ndb/src/mgmsrv/Makefile.am
@@ -13,12 +13,11 @@ mgmtsrvr_SOURCES = \
 	MgmtSrvrConfig.cpp \
 	CommandInterpreter.cpp
 
-INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi -I$(top_srcdir)/ndb/src/common/mgmcommon -I$(top_srcdir)/ndb/src/mgmapi
+INCLUDES_LOC = -I$(top_srcdir)/ndb/src/ndbapi -I$(top_srcdir)/ndb/src/common/mgmcommon
 
-LDADD_LOC = \
-	$(top_srcdir)/ndb/src/mgmapi/libmgmapi.la \
-	$(top_srcdir)/ndb/src/common/editline/libeditline.a \
-	@TERMCAP_LIB@
+LDADD_LOC = $(top_srcdir)/ndb/src/libndbclient.la \
+	    $(top_srcdir)/ndb/src/common/editline/libeditline.a \
+	    @TERMCAP_LIB@
 
 include $(top_srcdir)/ndb/config/common.mk.am
 include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
diff --git a/ndb/test/run-test/Makefile.am b/ndb/test/run-test/Makefile.am
index 11dc15a0988..205c315cb04 100644
--- a/ndb/test/run-test/Makefile.am
+++ b/ndb/test/run-test/Makefile.am
@@ -6,11 +6,12 @@ atrt_SOURCES = main.cpp
 ndbtest_SCRIPTS = atrt-analyze-result.sh atrt-gather-result.sh atrt-setup.sh \
           atrt-clear-result.sh make-config.sh
 
-INCLUDES_LOC = -I$(top_srcdir)/ndb/include/mgmapi -I$(top_srcdir)/ndb/src/mgmclient
-LDADD_LOC = $(top_srcdir)/ndb/src/mgmapi/libmgmapi.la $(top_srcdir)/ndb/src/mgmclient/CpcClient.o
+INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmclient
+LDADD_LOC = $(top_srcdir)/ndb/src/mgmclient/CpcClient.o $(top_srcdir)/ndb/src/libndbclient.la
 
 include $(top_srcdir)/ndb/config/common.mk.am
 include $(top_srcdir)/ndb/config/type_util.mk.am
+include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am
 
 # Don't update the files from bitkeeper
 %::SCCS/s.%