--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -74,8 +74,11 @@
 	utils.h
 
 
-INCLUDES = -I$(top_srcdir) -I$(srcdir)/../scintilla/include -I$(srcdir)/../tagmanager/include \
-			-I$(topsrcdir)/tagmanager/mio @GTK_CFLAGS@ @GTHREAD_CFLAGS@
+INCLUDES = \
+	-I$(top_srcdir) \
+	-I$(top_srcdir)/scintilla/include \
+	-I$(top_srcdir)/tagmanager/src \
+	@GTK_CFLAGS@ @GTHREAD_CFLAGS@
 
 # tell automake we have a C++ file so it uses the C++ linker we need for Scintilla
 nodist_EXTRA_geany_SOURCES = dummy.cxx
@@ -86,9 +89,16 @@
 
 geany_SOURCES = $(SRCS) win32.c win32.h
 
-geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a ../tagmanager/mio/libmio.a \
-				@GTK_LIBS@ @GTHREAD_LIBS@ $(INTLLIBS) -lole32 -luuid -liberty -lwsock32 \
-				geany_private.res
+geany_LDADD = \
+	$(top_builddir)/scintilla/libscintilla.a \
+	$(top_builddir)/tagmanager/ctags/libctags.a \
+	$(top_builddir)/tagmanager/mio/libmio.a \
+	$(top_builddir)/tagmanager/src/libtagmanager.a \
+	@GTK_LIBS@ \
+	@GTHREAD_LIBS@ \
+	$(INTLLIBS) \
+	-lole32 -luuid -liberty -lwsock32 \
+	geany_private.res
 
 AM_CFLAGS = -DGEANY_DATADIR=\"data\" \
 			-DGEANY_DOCDIR=\"\" \
@@ -114,8 +124,14 @@
 
 geany_SOURCES = $(SRCS) vte.c vte.h
 
-geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a ../tagmanager/mio/libmio.a \
-				@GTK_LIBS@ @GTHREAD_LIBS@ $(INTLLIBS)
+geany_LDADD = \
+	$(top_builddir)/scintilla/libscintilla.a \
+	$(top_builddir)/tagmanager/ctags/libctags.a \
+	$(top_builddir)/tagmanager/mio/libmio.a \
+	$(top_builddir)/tagmanager/src/libtagmanager.a \
+	@GTK_LIBS@ \
+	@GTHREAD_LIBS@ \
+	$(INTLLIBS)
 
 AM_CFLAGS = -DGEANY_DATADIR=\""$(datadir)"\" \
 			-DGEANY_DOCDIR=\""$(docdir)"\" \