diff --git a/libtomcrypt/Makefile.in b/libtomcrypt/Makefile.in
index 3056ef0ba8edfe091a29f501c86a292affaaa532..7970700e43f4a426b5482428f6a501f671cada49 100644
--- a/libtomcrypt/Makefile.in
+++ b/libtomcrypt/Makefile.in
@@ -19,7 +19,7 @@ srcdir=@srcdir@
 
 # Compilation flags. Note the += does not write over the user's CFLAGS!
 # The rest of the flags come from the parent Dropbear makefile
-CFLAGS += -c -I$(srcdir)/src/headers/ -I$(srcdir)/../ -DLTC_SOURCE -I$(srcdir)/../libtommath/
+CFLAGS += -c -Isrc/headers/ -I$(srcdir)/src/headers/ -I../ -I$(srcdir)/../ -DLTC_SOURCE -I../libtommath/ -I$(srcdir)/../libtommath/
 
 # additional warnings (newer GCC 3.4 and higher)
 ifdef GCC_34
diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in
index 06aba68d28cf0dd9f6a351ca411cfbb9d3f60b78..019c50bf49c1d8b9b57dc3633ba9c1253025f6df 100644
--- a/libtommath/Makefile.in
+++ b/libtommath/Makefile.in
@@ -9,7 +9,7 @@ VPATH=@srcdir@
 srcdir=@srcdir@
 
 # So that libtommath can include Dropbear headers for options and m_burn()
-CFLAGS += -I$(srcdir)/../libtomcrypt/src/headers/ -I$(srcdir)/../
+CFLAGS += -I. -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../
 
 ifndef IGNORE_SPEED