--- a/src/include.am
+++ b/src/include.am
@@ -34,6 +34,7 @@ mega_cmd_SOURCES = src/megacmdcommonutil
 
 mega_cmd_CXXFLAGS = $(RL_CXXFLAGS) -Isdk/include/ $(LMEGAINC)
 mega_cmd_LDADD = $(RL_LDFLAGS) $(RL_LIBS) $(TERMCAP_LDFLAGS) $(TERMCAP_LIBS) $(MEGA_LIBS)
+mega_exec_LDADD = $(RL_LDFLAGS) $(RL_LIBS) $(TERMCAP_LDFLAGS) $(TERMCAP_LIBS) $(MEGA_LIBS)
 
 mega_cmd_server_CXXFLAGS = $(LMEGAINC)
 if USE_PCRE
