summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTJ Kolev <tjkolev@gmail.com>2023-02-02 15:10:37 -0600
committerTJ Kolev <tjkolev@gmail.com>2023-02-02 15:10:37 -0600
commitfdcadd906c21dcf2c09a965a6046f7bf9de84a69 (patch)
treef3ca129cb8f9d058a963fafadb707fee26b8a872
parent9defeb477aebf0eb575885eb1fd4a4330ce52531 (diff)
downloaddropbear-fdcadd906c21dcf2c09a965a6046f7bf9de84a69.tar.gz
Dropbear SSH - file structure reorg
Separating source and binaries. * Dropbear source files (.c, .h) were moved under a new ./src folder. * Object binaries get generated into the ./obj folder. This helps to keep less cluttered project. tjk :)
-rw-r--r--.gitignore2
-rw-r--r--Makefile.in72
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac1
-rw-r--r--libtomcrypt/Makefile.in2
-rw-r--r--libtommath/Makefile.in2
-rw-r--r--src/agentfwd.h (renamed from agentfwd.h)0
-rw-r--r--src/algo.h (renamed from algo.h)0
-rw-r--r--src/atomicio.c (renamed from atomicio.c)0
-rw-r--r--src/atomicio.h (renamed from atomicio.h)0
-rw-r--r--src/auth.h (renamed from auth.h)0
-rw-r--r--src/bignum.c (renamed from bignum.c)0
-rw-r--r--src/bignum.h (renamed from bignum.h)0
-rw-r--r--src/buffer.c (renamed from buffer.c)0
-rw-r--r--src/buffer.h (renamed from buffer.h)0
-rw-r--r--src/chachapoly.c (renamed from chachapoly.c)0
-rw-r--r--src/chachapoly.h (renamed from chachapoly.h)0
-rw-r--r--src/channel.h (renamed from channel.h)0
-rw-r--r--src/chansession.h (renamed from chansession.h)0
-rw-r--r--src/circbuffer.c (renamed from circbuffer.c)0
-rw-r--r--src/circbuffer.h (renamed from circbuffer.h)0
-rw-r--r--src/cli-agentfwd.c (renamed from cli-agentfwd.c)0
-rw-r--r--src/cli-auth.c (renamed from cli-auth.c)0
-rw-r--r--src/cli-authinteract.c (renamed from cli-authinteract.c)0
-rw-r--r--src/cli-authpasswd.c (renamed from cli-authpasswd.c)0
-rw-r--r--src/cli-authpubkey.c (renamed from cli-authpubkey.c)0
-rw-r--r--src/cli-channel.c (renamed from cli-channel.c)0
-rw-r--r--src/cli-chansession.c (renamed from cli-chansession.c)0
-rw-r--r--src/cli-kex.c (renamed from cli-kex.c)0
-rw-r--r--src/cli-main.c (renamed from cli-main.c)0
-rw-r--r--src/cli-runopts.c (renamed from cli-runopts.c)0
-rw-r--r--src/cli-session.c (renamed from cli-session.c)0
-rw-r--r--src/cli-tcpfwd.c (renamed from cli-tcpfwd.c)0
-rw-r--r--src/common-algo.c (renamed from common-algo.c)0
-rw-r--r--src/common-channel.c (renamed from common-channel.c)0
-rw-r--r--src/common-chansession.c (renamed from common-chansession.c)0
-rw-r--r--src/common-kex.c (renamed from common-kex.c)0
-rw-r--r--src/common-runopts.c (renamed from common-runopts.c)0
-rw-r--r--src/common-session.c (renamed from common-session.c)0
-rw-r--r--src/compat.c (renamed from compat.c)0
-rw-r--r--src/compat.h (renamed from compat.h)0
-rw-r--r--src/crypto_desc.c (renamed from crypto_desc.c)0
-rw-r--r--src/crypto_desc.h (renamed from crypto_desc.h)0
-rw-r--r--src/curve25519.c (renamed from curve25519.c)0
-rw-r--r--src/curve25519.h (renamed from curve25519.h)0
-rw-r--r--src/dbhelpers.c (renamed from dbhelpers.c)0
-rw-r--r--src/dbhelpers.h (renamed from dbhelpers.h)0
-rw-r--r--src/dbmalloc.c (renamed from dbmalloc.c)0
-rw-r--r--src/dbmalloc.h (renamed from dbmalloc.h)0
-rw-r--r--src/dbmulti.c (renamed from dbmulti.c)0
-rw-r--r--src/dbrandom.c (renamed from dbrandom.c)0
-rw-r--r--src/dbrandom.h (renamed from dbrandom.h)0
-rw-r--r--src/dbutil.c (renamed from dbutil.c)0
-rw-r--r--src/dbutil.h (renamed from dbutil.h)0
-rw-r--r--src/debug.h (renamed from debug.h)0
-rw-r--r--src/default_options.h (renamed from default_options.h)0
-rw-r--r--src/dh_groups.c (renamed from dh_groups.c)0
-rw-r--r--src/dh_groups.h (renamed from dh_groups.h)0
-rwxr-xr-xsrc/dropbear_lint.sh (renamed from dropbear_lint.sh)0
-rw-r--r--src/dropbearconvert.c (renamed from dropbearconvert.c)0
-rw-r--r--src/dropbearkey.c (renamed from dropbearkey.c)0
-rw-r--r--src/dss.c (renamed from dss.c)0
-rw-r--r--src/dss.h (renamed from dss.h)0
-rw-r--r--src/ecc.c (renamed from ecc.c)0
-rw-r--r--src/ecc.h (renamed from ecc.h)0
-rw-r--r--src/ecdsa.c (renamed from ecdsa.c)0
-rw-r--r--src/ecdsa.h (renamed from ecdsa.h)0
-rw-r--r--src/ed25519.c (renamed from ed25519.c)0
-rw-r--r--src/ed25519.h (renamed from ed25519.h)0
-rw-r--r--src/fake-rfc2553.c (renamed from fake-rfc2553.c)0
-rw-r--r--src/fake-rfc2553.h (renamed from fake-rfc2553.h)0
-rw-r--r--src/filelist.txt (renamed from filelist.txt)0
-rw-r--r--src/fuzz-wrapfd.h (renamed from fuzz-wrapfd.h)0
-rw-r--r--src/fuzz.h (renamed from fuzz.h)0
-rw-r--r--src/gcm.c (renamed from gcm.c)0
-rw-r--r--src/gcm.h (renamed from gcm.h)0
-rw-r--r--src/gendss.c (renamed from gendss.c)0
-rw-r--r--src/gendss.h (renamed from gendss.h)0
-rw-r--r--src/gened25519.c (renamed from gened25519.c)0
-rw-r--r--src/gened25519.h (renamed from gened25519.h)0
-rw-r--r--src/genrsa.c (renamed from genrsa.c)0
-rw-r--r--src/genrsa.h (renamed from genrsa.h)0
-rw-r--r--src/gensignkey.c (renamed from gensignkey.c)0
-rw-r--r--src/gensignkey.h (renamed from gensignkey.h)0
-rw-r--r--src/includes.h (renamed from includes.h)4
-rw-r--r--src/kex.h (renamed from kex.h)0
-rw-r--r--src/keyimport.c (renamed from keyimport.c)0
-rw-r--r--src/keyimport.h (renamed from keyimport.h)0
-rw-r--r--src/list.c (renamed from list.c)0
-rw-r--r--src/list.h (renamed from list.h)0
-rw-r--r--src/listener.c (renamed from listener.c)0
-rw-r--r--src/listener.h (renamed from listener.h)0
-rw-r--r--src/loginrec.c (renamed from loginrec.c)0
-rw-r--r--src/loginrec.h (renamed from loginrec.h)0
-rw-r--r--src/ltc_prng.c (renamed from ltc_prng.c)0
-rw-r--r--src/ltc_prng.h (renamed from ltc_prng.h)0
-rw-r--r--src/netio.c (renamed from netio.c)0
-rw-r--r--src/netio.h (renamed from netio.h)0
-rw-r--r--src/options.h (renamed from options.h)0
-rw-r--r--src/packet.c (renamed from packet.c)0
-rw-r--r--src/packet.h (renamed from packet.h)0
-rw-r--r--src/process-packet.c (renamed from process-packet.c)0
-rw-r--r--src/progressmeter.c (renamed from progressmeter.c)0
-rw-r--r--src/progressmeter.h (renamed from progressmeter.h)0
-rw-r--r--src/pubkeyapi.h (renamed from pubkeyapi.h)0
-rw-r--r--src/queue.c (renamed from queue.c)0
-rw-r--r--src/queue.h (renamed from queue.h)0
-rw-r--r--src/rsa.c (renamed from rsa.c)0
-rw-r--r--src/rsa.h (renamed from rsa.h)0
-rw-r--r--src/runopts.h (renamed from runopts.h)0
-rw-r--r--src/scp.c (renamed from scp.c)0
-rw-r--r--src/scpmisc.c (renamed from scpmisc.c)0
-rw-r--r--src/scpmisc.h (renamed from scpmisc.h)0
-rw-r--r--src/service.h (renamed from service.h)0
-rw-r--r--src/session.h (renamed from session.h)0
-rw-r--r--src/signkey.c (renamed from signkey.c)0
-rw-r--r--src/signkey.h (renamed from signkey.h)0
-rw-r--r--src/signkey_ossh.c (renamed from signkey_ossh.c)0
-rw-r--r--src/signkey_ossh.h (renamed from signkey_ossh.h)0
-rw-r--r--src/sk-ecdsa.c (renamed from sk-ecdsa.c)0
-rw-r--r--src/sk-ecdsa.h (renamed from sk-ecdsa.h)0
-rw-r--r--src/sk-ed25519.c (renamed from sk-ed25519.c)0
-rw-r--r--src/sk-ed25519.h (renamed from sk-ed25519.h)0
-rw-r--r--src/ssh.h (renamed from ssh.h)0
-rw-r--r--src/sshpty.c (renamed from sshpty.c)0
-rw-r--r--src/sshpty.h (renamed from sshpty.h)0
-rw-r--r--src/svr-agentfwd.c (renamed from svr-agentfwd.c)0
-rw-r--r--src/svr-auth.c (renamed from svr-auth.c)0
-rw-r--r--src/svr-authpam.c (renamed from svr-authpam.c)0
-rw-r--r--src/svr-authpasswd.c (renamed from svr-authpasswd.c)0
-rw-r--r--src/svr-authpubkey.c (renamed from svr-authpubkey.c)0
-rw-r--r--src/svr-authpubkeyoptions.c (renamed from svr-authpubkeyoptions.c)0
-rw-r--r--src/svr-chansession.c (renamed from svr-chansession.c)0
-rw-r--r--src/svr-kex.c (renamed from svr-kex.c)0
-rw-r--r--src/svr-main.c (renamed from svr-main.c)0
-rw-r--r--src/svr-runopts.c (renamed from svr-runopts.c)0
-rw-r--r--src/svr-service.c (renamed from svr-service.c)0
-rw-r--r--src/svr-session.c (renamed from svr-session.c)0
-rw-r--r--src/svr-tcpfwd.c (renamed from svr-tcpfwd.c)0
-rw-r--r--src/svr-x11fwd.c (renamed from svr-x11fwd.c)0
-rw-r--r--src/sysoptions.h (renamed from sysoptions.h)0
-rw-r--r--src/tcp-accept.c (renamed from tcp-accept.c)0
-rw-r--r--src/tcpfwd.h (renamed from tcpfwd.h)0
-rw-r--r--src/termcodes.c (renamed from termcodes.c)0
-rw-r--r--src/termcodes.h (renamed from termcodes.h)0
-rw-r--r--src/x11fwd.h (renamed from x11fwd.h)0
146 files changed, 49 insertions, 36 deletions
diff --git a/.gitignore b/.gitignore
index 65b8e15..8f0e200 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@
*.bbg
*.prof
.*.swp
+/obj
/autom4te.cache
/config.log
/config.status
@@ -27,3 +28,4 @@ tags
.pytest*
*.pyc
/test/venv
+.vscode/ \ No newline at end of file
diff --git a/Makefile.in b/Makefile.in
index e824491..e1c8246 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,25 +12,30 @@ ifndef PROGRAMS
PROGRAMS=dropbear dbclient dropbearkey dropbearconvert
endif
+srcdir=./src
+VPATH=$(srcdir)
+
STATIC_LTC=libtomcrypt/libtomcrypt.a
STATIC_LTM=libtommath/libtommath.a
LIBTOM_LIBS=@LIBTOM_LIBS@
ifeq (@BUNDLED_LIBTOM@, 1)
-LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM)
-LIBTOM_CLEAN=ltc-clean ltm-clean
-CPPFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/
-LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM)
+ LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM)
+ LIBTOM_CLEAN=ltc-clean ltm-clean
+ CPPFLAGS+=-I./libtomcrypt/src/headers/ -I./libtommath
+ LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM)
endif
-OPTION_HEADERS = default_options_guard.h sysoptions.h
-ifneq ($(wildcard localoptions.h),)
-CPPFLAGS+=-DLOCALOPTIONS_H_EXISTS
-OPTION_HEADERS += localoptions.h
+OPTION_HEADERS = $(srcdir)/default_options_guard.h $(srcdir)/sysoptions.h
+ifneq ($(wildcard $(srcdir)/localoptions.h),)
+ CPPFLAGS+=-DLOCALOPTIONS_H_EXISTS
+ OPTION_HEADERS += $(srcdir)/localoptions.h
endif
-COMMONOBJS=dbutil.o buffer.o dbhelpers.o \
+OBJ_DIR=./obj
+
+_COMMONOBJS=dbutil.o buffer.o dbhelpers.o \
dss.o bignum.o \
signkey.o rsa.o dbrandom.o \
queue.o \
@@ -39,27 +44,34 @@ COMMONOBJS=dbutil.o buffer.o dbhelpers.o \
curve25519.o ed25519.o sk-ed25519.o \
dbmalloc.o \
gensignkey.o gendss.o genrsa.o gened25519.o
+COMMONOBJS = $(patsubst %,$(OBJ_DIR)/%,$(_COMMONOBJS))
-SVROBJS=svr-kex.o svr-auth.o sshpty.o \
+_SVROBJS=svr-kex.o svr-auth.o sshpty.o \
svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \
svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\
svr-tcpfwd.o svr-authpam.o
+SVROBJS = $(patsubst %,$(OBJ_DIR)/%,$(_SVROBJS))
-CLIOBJS=cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \
+_CLIOBJS=cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \
cli-session.o cli-runopts.o cli-chansession.o \
cli-authpubkey.o cli-tcpfwd.o cli-channel.o cli-authinteract.o \
cli-agentfwd.o
+CLIOBJS = $(patsubst %,$(OBJ_DIR)/%,$(_CLIOBJS))
-CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \
- common-channel.o common-chansession.o termcodes.o loginrec.o \
- tcp-accept.o listener.o process-packet.o dh_groups.o \
- common-runopts.o circbuffer.o list.o netio.o chachapoly.o gcm.o
+_CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \
+ common-channel.o common-chansession.o termcodes.o loginrec.o \
+ tcp-accept.o listener.o process-packet.o dh_groups.o \
+ common-runopts.o circbuffer.o list.o netio.o chachapoly.o gcm.o
+CLISVROBJS = $(patsubst %,$(OBJ_DIR)/%,$(_CLISVROBJS))
-KEYOBJS=dropbearkey.o
+_KEYOBJS=dropbearkey.o
+KEYOBJS = $(patsubst %,$(OBJ_DIR)/%,$(_KEYOBJS))
-CONVERTOBJS=dropbearconvert.o keyimport.o signkey_ossh.o
+_CONVERTOBJS=dropbearconvert.o keyimport.o signkey_ossh.o
+CONVERTOBJS = $(patsubst %,$(OBJ_DIR)/%,$(_CONVERTOBJS))
-SCPOBJS=scp.o progressmeter.o atomicio.o scpmisc.o compat.o
+_SCPOBJS=scp.o progressmeter.o atomicio.o scpmisc.o compat.o
+SCPOBJS = $(patsubst %,$(OBJ_DIR)/%,$(_SCPOBJS))
ifeq (@DROPBEAR_FUZZ@, 1)
allobjs = $(COMMONOBJS) fuzz/fuzz-common.o fuzz/fuzz-wrapfd.o $(CLISVROBJS) $(CLIOBJS) $(SVROBJS) @CRYPTLIB@
@@ -82,17 +94,14 @@ else
endif
ifeq (@DROPBEAR_PLUGIN@, 1)
- # rdynamic makes all the global symbols of dropbear available to all the loaded shared libraries
- # this allow a plugin to reuse existing crypto/utilities like base64_decode/base64_encode without
- # the need to rewrite them.
- PLUGIN_LIBS=-ldl -rdynamic
+ # rdynamic makes all the global symbols of dropbear available to all the loaded shared libraries
+ # this allow a plugin to reuse existing crypto/utilities like base64_decode/base64_encode without
+ # the need to rewrite them.
+ PLUGIN_LIBS=-ldl -rdynamic
else
- PLUGIN_LIBS=
+ PLUGIN_LIBS=
endif
-VPATH=@srcdir@
-srcdir=@srcdir@
-
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir = @datarootdir@
@@ -107,7 +116,7 @@ AR=@AR@
RANLIB=@RANLIB@
STRIP=@STRIP@
INSTALL=@INSTALL@
-CPPFLAGS+=@CPPFLAGS@ -I. -I$(srcdir)
+CPPFLAGS+=@CPPFLAGS@ -I$(srcdir)
CFLAGS+=@CFLAGS@
LIBS+=@LIBS@
LDFLAGS=@LDFLAGS@
@@ -150,7 +159,11 @@ all: $(TARGETS)
# for simplicity assume all source depends on all headers
HEADERS=$(wildcard $(srcdir)/*.h *.h) $(OPTION_HEADERS)
-%.o : %.c $(HEADERS)
+
+$(OBJ_DIR):
+ mkdir -p $@
+
+$(OBJ_DIR)/%.o: $(srcdir)/%.c $(HEADERS) | $(OBJ_DIR)
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
default_options_guard.h: default_options.h
@@ -253,7 +266,8 @@ clean: $(LIBTOM_CLEAN) $(FUZZ_CLEAN) thisclean
thisclean:
-rm -f dropbear$(EXEEXT) dbclient$(EXEEXT) dropbearkey$(EXEEXT) \
dropbearconvert$(EXEEXT) scp$(EXEEXT) scp-progress$(EXEEXT) \
- dropbearmulti$(EXEEXT) *.o *.da *.bb *.bbg *.prof
+ dropbearmulti$(EXEEXT) *.o *.da *.bb *.bbg *.prof \
+ $(OBJ_DIR)/*
distclean: clean tidy
-rm -f config.h
diff --git a/configure b/configure
index e1986dd..ad5de25 100755
--- a/configure
+++ b/configure
@@ -613,7 +613,6 @@ PACKAGE_STRING=''
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
-ac_unique_file="buffer.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stddef.h>
@@ -2974,7 +2973,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
# Record which revision is being built
if test -s "`which hg`" && test -d "$srcdir/.hg"; then
hgrev=`hg id -i -R "$srcdir"`
diff --git a/configure.ac b/configure.ac
index a4f8f94..d82818a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,6 @@
AC_PREREQ([2.59])
AC_INIT
-AC_CONFIG_SRCDIR(buffer.c)
# Record which revision is being built
if test -s "`which hg`" && test -d "$srcdir/.hg"; then
diff --git a/libtomcrypt/Makefile.in b/libtomcrypt/Makefile.in
index d5c1f2f..c863dfe 100644
--- a/libtomcrypt/Makefile.in
+++ b/libtomcrypt/Makefile.in
@@ -42,7 +42,7 @@ ARFLAGS = r
EXTRALIBS = ../libtommath/libtommath.a
#Compilation flags
-LTC_CFLAGS = -Isrc/headers/ -I$(srcdir)/src/headers/ -I../ -I$(srcdir)/../ -DLTC_SOURCE -I../libtommath/ -I$(srcdir)/../libtommath/ $(CFLAGS) $(CPPFLAGS)
+LTC_CFLAGS = -Isrc/headers/ -I$(srcdir)/src/headers/ -I$(srcdir)/../src -DLTC_SOURCE -I../libtommath/ -I$(srcdir)/../libtommath/ $(CFLAGS) $(CPPFLAGS)
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
VERSION=1.18.1
diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in
index f1cb59c..1f17c57 100644
--- a/libtommath/Makefile.in
+++ b/libtommath/Makefile.in
@@ -6,7 +6,7 @@ VPATH=@srcdir@
srcdir=@srcdir@
# So that libtommath can include Dropbear headers for options and m_burn()
-CFLAGS += -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../
+CFLAGS += -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I$(srcdir)/../src
CFLAGS += -Wno-deprecated
CFLAGS += $(CPPFLAGS)
diff --git a/agentfwd.h b/src/agentfwd.h
index d913aea..d913aea 100644
--- a/agentfwd.h
+++ b/src/agentfwd.h
diff --git a/algo.h b/src/algo.h
index c46b409..c46b409 100644
--- a/algo.h
+++ b/src/algo.h
diff --git a/atomicio.c b/src/atomicio.c
index 2aacf51..2aacf51 100644
--- a/atomicio.c
+++ b/src/atomicio.c
diff --git a/atomicio.h b/src/atomicio.h
index 0bd019f..0bd019f 100644
--- a/atomicio.h
+++ b/src/atomicio.h
diff --git a/auth.h b/src/auth.h
index 0e854fb..0e854fb 100644
--- a/auth.h
+++ b/src/auth.h
diff --git a/bignum.c b/src/bignum.c
index c2b39b1..c2b39b1 100644
--- a/bignum.c
+++ b/src/bignum.c
diff --git a/bignum.h b/src/bignum.h
index 861acb0..861acb0 100644
--- a/bignum.h
+++ b/src/bignum.h
diff --git a/buffer.c b/src/buffer.c
index 1377b77..1377b77 100644
--- a/buffer.c
+++ b/src/buffer.c
diff --git a/buffer.h b/src/buffer.h
index 0ba6683..0ba6683 100644
--- a/buffer.h
+++ b/src/buffer.h
diff --git a/chachapoly.c b/src/chachapoly.c
index c065fac..c065fac 100644
--- a/chachapoly.c
+++ b/src/chachapoly.c
diff --git a/chachapoly.h b/src/chachapoly.h
index 5a7c5b2..5a7c5b2 100644
--- a/chachapoly.h
+++ b/src/chachapoly.h
diff --git a/channel.h b/src/channel.h
index dd174aa..dd174aa 100644
--- a/channel.h
+++ b/src/channel.h
diff --git a/chansession.h b/src/chansession.h
index cf4fba3..cf4fba3 100644
--- a/chansession.h
+++ b/src/chansession.h
diff --git a/circbuffer.c b/src/circbuffer.c
index aabd9dc..aabd9dc 100644
--- a/circbuffer.c
+++ b/src/circbuffer.c
diff --git a/circbuffer.h b/src/circbuffer.h
index 5aaa762..5aaa762 100644
--- a/circbuffer.h
+++ b/src/circbuffer.h
diff --git a/cli-agentfwd.c b/src/cli-agentfwd.c
index 6fb5c4b..6fb5c4b 100644
--- a/cli-agentfwd.c
+++ b/src/cli-agentfwd.c
diff --git a/cli-auth.c b/src/cli-auth.c
index 20d6371..20d6371 100644
--- a/cli-auth.c
+++ b/src/cli-auth.c
diff --git a/cli-authinteract.c b/src/cli-authinteract.c
index 6d2fad7..6d2fad7 100644
--- a/cli-authinteract.c
+++ b/src/cli-authinteract.c
diff --git a/cli-authpasswd.c b/src/cli-authpasswd.c
index 91790ce..91790ce 100644
--- a/cli-authpasswd.c
+++ b/src/cli-authpasswd.c
diff --git a/cli-authpubkey.c b/src/cli-authpubkey.c
index 975d3bd..975d3bd 100644
--- a/cli-authpubkey.c
+++ b/src/cli-authpubkey.c
diff --git a/cli-channel.c b/src/cli-channel.c
index b88e913..b88e913 100644
--- a/cli-channel.c
+++ b/src/cli-channel.c
diff --git a/cli-chansession.c b/src/cli-chansession.c
index 73bee17..73bee17 100644
--- a/cli-chansession.c
+++ b/src/cli-chansession.c
diff --git a/cli-kex.c b/src/cli-kex.c
index 6cb75c2..6cb75c2 100644
--- a/cli-kex.c
+++ b/src/cli-kex.c
diff --git a/cli-main.c b/src/cli-main.c
index 065fd76..065fd76 100644
--- a/cli-main.c
+++ b/src/cli-main.c
diff --git a/cli-runopts.c b/src/cli-runopts.c
index 38a73f7..38a73f7 100644
--- a/cli-runopts.c
+++ b/src/cli-runopts.c
diff --git a/cli-session.c b/src/cli-session.c
index 5981b24..5981b24 100644
--- a/cli-session.c
+++ b/src/cli-session.c
diff --git a/cli-tcpfwd.c b/src/cli-tcpfwd.c
index 1b95615..1b95615 100644
--- a/cli-tcpfwd.c
+++ b/src/cli-tcpfwd.c
diff --git a/common-algo.c b/src/common-algo.c
index 378f0ca..378f0ca 100644
--- a/common-algo.c
+++ b/src/common-algo.c
diff --git a/common-channel.c b/src/common-channel.c
index be5b57f..be5b57f 100644
--- a/common-channel.c
+++ b/src/common-channel.c
diff --git a/common-chansession.c b/src/common-chansession.c
index b350c6c..b350c6c 100644
--- a/common-chansession.c
+++ b/src/common-chansession.c
diff --git a/common-kex.c b/src/common-kex.c
index ac88442..ac88442 100644
--- a/common-kex.c
+++ b/src/common-kex.c
diff --git a/common-runopts.c b/src/common-runopts.c
index e9ad314..e9ad314 100644
--- a/common-runopts.c
+++ b/src/common-runopts.c
diff --git a/common-session.c b/src/common-session.c
index 6991f57..6991f57 100644
--- a/common-session.c
+++ b/src/common-session.c
diff --git a/compat.c b/src/compat.c
index 8bd6add..8bd6add 100644
--- a/compat.c
+++ b/src/compat.c
diff --git a/compat.h b/src/compat.h
index 58fd58e..58fd58e 100644
--- a/compat.h
+++ b/src/compat.h
diff --git a/crypto_desc.c b/src/crypto_desc.c
index d0dcc82..d0dcc82 100644
--- a/crypto_desc.c
+++ b/src/crypto_desc.c
diff --git a/crypto_desc.h b/src/crypto_desc.h
index 08a75d9..08a75d9 100644
--- a/crypto_desc.h
+++ b/src/crypto_desc.h
diff --git a/curve25519.c b/src/curve25519.c
index 51e0e76..51e0e76 100644
--- a/curve25519.c
+++ b/src/curve25519.c
diff --git a/curve25519.h b/src/curve25519.h
index 55ef043..55ef043 100644
--- a/curve25519.h
+++ b/src/curve25519.h
diff --git a/dbhelpers.c b/src/dbhelpers.c
index ce5c379..ce5c379 100644
--- a/dbhelpers.c
+++ b/src/dbhelpers.c
diff --git a/dbhelpers.h b/src/dbhelpers.h
index 551bcb4..551bcb4 100644
--- a/dbhelpers.h
+++ b/src/dbhelpers.h
diff --git a/dbmalloc.c b/src/dbmalloc.c
index e2cdc8f..e2cdc8f 100644
--- a/dbmalloc.c
+++ b/src/dbmalloc.c
diff --git a/dbmalloc.h b/src/dbmalloc.h
index e5554e8..e5554e8 100644
--- a/dbmalloc.h
+++ b/src/dbmalloc.h
diff --git a/dbmulti.c b/src/dbmulti.c
index 28ee959..28ee959 100644
--- a/dbmulti.c
+++ b/src/dbmulti.c
diff --git a/dbrandom.c b/src/dbrandom.c
index 41aaa48..41aaa48 100644
--- a/dbrandom.c
+++ b/src/dbrandom.c
diff --git a/dbrandom.h b/src/dbrandom.h
index 1db2c2f..1db2c2f 100644
--- a/dbrandom.h
+++ b/src/dbrandom.h
diff --git a/dbutil.c b/src/dbutil.c
index e8831c5..e8831c5 100644
--- a/dbutil.c
+++ b/src/dbutil.c
diff --git a/dbutil.h b/src/dbutil.h
index df2f89b..df2f89b 100644
--- a/dbutil.h
+++ b/src/dbutil.h
diff --git a/debug.h b/src/debug.h
index ab32fbd..ab32fbd 100644
--- a/debug.h
+++ b/src/debug.h
diff --git a/default_options.h b/src/default_options.h
index 5132775..5132775 100644
--- a/default_options.h
+++ b/src/default_options.h
diff --git a/dh_groups.c b/src/dh_groups.c
index 920f3f6..920f3f6 100644
--- a/dh_groups.c
+++ b/src/dh_groups.c
diff --git a/dh_groups.h b/src/dh_groups.h
index c995937..c995937 100644
--- a/dh_groups.h
+++ b/src/dh_groups.h
diff --git a/dropbear_lint.sh b/src/dropbear_lint.sh
index 4e8d33b..4e8d33b 100755
--- a/dropbear_lint.sh
+++ b/src/dropbear_lint.sh
diff --git a/dropbearconvert.c b/src/dropbearconvert.c
index 950608b..950608b 100644
--- a/dropbearconvert.c
+++ b/src/dropbearconvert.c
diff --git a/dropbearkey.c b/src/dropbearkey.c
index bd9c6af..bd9c6af 100644
--- a/dropbearkey.c
+++ b/src/dropbearkey.c
diff --git a/dss.c b/src/dss.c
index 012e72e..012e72e 100644
--- a/dss.c
+++ b/src/dss.c
diff --git a/dss.h b/src/dss.h
index 40806e5..40806e5 100644
--- a/dss.h
+++ b/src/dss.h
diff --git a/ecc.c b/src/ecc.c
index eaca65a..eaca65a 100644
--- a/ecc.c
+++ b/src/ecc.c
diff --git a/ecc.h b/src/ecc.h
index f4508f8..f4508f8 100644
--- a/ecc.h
+++ b/src/ecc.h
diff --git a/ecdsa.c b/src/ecdsa.c
index 5ac4e7b..5ac4e7b 100644
--- a/ecdsa.c
+++ b/src/ecdsa.c
diff --git a/ecdsa.h b/src/ecdsa.h
index 01cb134..01cb134 100644
--- a/ecdsa.h
+++ b/src/ecdsa.h
diff --git a/ed25519.c b/src/ed25519.c
index f200e13..f200e13 100644
--- a/ed25519.c
+++ b/src/ed25519.c
diff --git a/ed25519.h b/src/ed25519.h
index 1da9fbd..1da9fbd 100644
--- a/ed25519.h
+++ b/src/ed25519.h
diff --git a/fake-rfc2553.c b/src/fake-rfc2553.c
index 395cfcc..395cfcc 100644
--- a/fake-rfc2553.c
+++ b/src/fake-rfc2553.c
diff --git a/fake-rfc2553.h b/src/fake-rfc2553.h
index c64136c..c64136c 100644
--- a/fake-rfc2553.h
+++ b/src/fake-rfc2553.h
diff --git a/filelist.txt b/src/filelist.txt
index 3b9bb67..3b9bb67 100644
--- a/filelist.txt
+++ b/src/filelist.txt
diff --git a/fuzz-wrapfd.h b/src/fuzz-wrapfd.h
index d0dea88..d0dea88 100644
--- a/fuzz-wrapfd.h
+++ b/src/fuzz-wrapfd.h
diff --git a/fuzz.h b/src/fuzz.h
index 95cb4d8..95cb4d8 100644
--- a/fuzz.h
+++ b/src/fuzz.h
diff --git a/gcm.c b/src/gcm.c
index 2ceced1..2ceced1 100644
--- a/gcm.c
+++ b/src/gcm.c
diff --git a/gcm.h b/src/gcm.h
index 58c530a..58c530a 100644
--- a/gcm.h
+++ b/src/gcm.h
diff --git a/gendss.c b/src/gendss.c
index 46d161e..46d161e 100644
--- a/gendss.c
+++ b/src/gendss.c
diff --git a/gendss.h b/src/gendss.h
index 33858f2..33858f2 100644
--- a/gendss.h
+++ b/src/gendss.h
diff --git a/gened25519.c b/src/gened25519.c
index a027914..a027914 100644
--- a/gened25519.c
+++ b/src/gened25519.c
diff --git a/gened25519.h b/src/gened25519.h
index 8058310..8058310 100644
--- a/gened25519.h
+++ b/src/gened25519.h
diff --git a/genrsa.c b/src/genrsa.c
index e249d6e..e249d6e 100644
--- a/genrsa.c
+++ b/src/genrsa.c
diff --git a/genrsa.h b/src/genrsa.h
index 641d5a5..641d5a5 100644
--- a/genrsa.h
+++ b/src/genrsa.h
diff --git a/gensignkey.c b/src/gensignkey.c
index cfe0a80..cfe0a80 100644
--- a/gensignkey.c
+++ b/src/gensignkey.c
diff --git a/gensignkey.h b/src/gensignkey.h
index 73b9c3c..73b9c3c 100644
--- a/gensignkey.h
+++ b/src/gensignkey.h
diff --git a/includes.h b/src/includes.h
index 1e00002..98d35de 100644
--- a/includes.h
+++ b/src/includes.h
@@ -132,8 +132,8 @@
#endif
#ifdef BUNDLED_LIBTOM
-#include "libtomcrypt/src/headers/tomcrypt.h"
-#include "libtommath/tommath.h"
+#include "../libtomcrypt/src/headers/tomcrypt.h"
+#include "../libtommath/tommath.h"
#else
#include <tomcrypt.h>
#include <tommath.h>
diff --git a/kex.h b/src/kex.h
index 77cf21a..77cf21a 100644
--- a/kex.h
+++ b/src/kex.h
diff --git a/keyimport.c b/src/keyimport.c
index e88ef46..e88ef46 100644
--- a/keyimport.c
+++ b/src/keyimport.c
diff --git a/keyimport.h b/src/keyimport.h
index b566fc9..b566fc9 100644
--- a/keyimport.h
+++ b/src/keyimport.h
diff --git a/list.c b/src/list.c
index eeba7c3..eeba7c3 100644
--- a/list.c
+++ b/src/list.c
diff --git a/list.h b/src/list.h
index 2b5cc07..2b5cc07 100644
--- a/list.h
+++ b/src/list.h
diff --git a/listener.c b/src/listener.c
index 4c60589..4c60589 100644
--- a/listener.c
+++ b/src/listener.c
diff --git a/listener.h b/src/listener.h
index 4a7f5ff..4a7f5ff 100644
--- a/listener.h
+++ b/src/listener.h
diff --git a/loginrec.c b/src/loginrec.c
index b543bcb..b543bcb 100644
--- a/loginrec.c
+++ b/src/loginrec.c
diff --git a/loginrec.h b/src/loginrec.h
index 6abde48..6abde48 100644
--- a/loginrec.h
+++ b/src/loginrec.h
diff --git a/ltc_prng.c b/src/ltc_prng.c
index 4f2e9e1..4f2e9e1 100644
--- a/ltc_prng.c
+++ b/src/ltc_prng.c
diff --git a/ltc_prng.h b/src/ltc_prng.h
index 6bc8273..6bc8273 100644
--- a/ltc_prng.h
+++ b/src/ltc_prng.h
diff --git a/netio.c b/src/netio.c
index b8aebea..b8aebea 100644
--- a/netio.c
+++ b/src/netio.c
diff --git a/netio.h b/src/netio.h
index 605512b..605512b 100644
--- a/netio.h
+++ b/src/netio.h
diff --git a/options.h b/src/options.h
index c12cfc9..c12cfc9 100644
--- a/options.h
+++ b/src/options.h
diff --git a/packet.c b/src/packet.c
index 1055588..1055588 100644
--- a/packet.c
+++ b/src/packet.c
diff --git a/packet.h b/src/packet.h
index e3ab808..e3ab808 100644
--- a/packet.h
+++ b/src/packet.h
diff --git a/process-packet.c b/src/process-packet.c
index 9454160..9454160 100644
--- a/process-packet.c
+++ b/src/process-packet.c
diff --git a/progressmeter.c b/src/progressmeter.c
index 2038fd3..2038fd3 100644
--- a/progressmeter.c
+++ b/src/progressmeter.c
diff --git a/progressmeter.h b/src/progressmeter.h
index bfb9a0b..bfb9a0b 100644
--- a/progressmeter.h
+++ b/src/progressmeter.h
diff --git a/pubkeyapi.h b/src/pubkeyapi.h
index 21b1f24..21b1f24 100644
--- a/pubkeyapi.h
+++ b/src/pubkeyapi.h
diff --git a/queue.c b/src/queue.c
index f3ece7f..f3ece7f 100644
--- a/queue.c
+++ b/src/queue.c
diff --git a/queue.h b/src/queue.h
index ee8ea43..ee8ea43 100644
--- a/queue.h
+++ b/src/queue.h
diff --git a/rsa.c b/src/rsa.c
index 6152e1c..6152e1c 100644
--- a/rsa.c
+++ b/src/rsa.c
diff --git a/rsa.h b/src/rsa.h
index a8bbf41..a8bbf41 100644
--- a/rsa.h
+++ b/src/rsa.h
diff --git a/runopts.h b/src/runopts.h
index d44283d..d44283d 100644
--- a/runopts.h
+++ b/src/runopts.h
diff --git a/scp.c b/src/scp.c
index 72e04f8..72e04f8 100644
--- a/scp.c
+++ b/src/scp.c
diff --git a/scpmisc.c b/src/scpmisc.c
index c2f053e..c2f053e 100644
--- a/scpmisc.c
+++ b/src/scpmisc.c
diff --git a/scpmisc.h b/src/scpmisc.h
index 369b327..369b327 100644
--- a/scpmisc.h
+++ b/src/scpmisc.h
diff --git a/service.h b/src/service.h
index eaa7ff6..eaa7ff6 100644
--- a/service.h
+++ b/src/service.h
diff --git a/session.h b/src/session.h
index 6706592..6706592 100644
--- a/session.h
+++ b/src/session.h
diff --git a/signkey.c b/src/signkey.c
index 0aacddb..0aacddb 100644
--- a/signkey.c
+++ b/src/signkey.c
diff --git a/signkey.h b/src/signkey.h
index c6829f2..c6829f2 100644
--- a/signkey.h
+++ b/src/signkey.h
diff --git a/signkey_ossh.c b/src/signkey_ossh.c
index 59b44ad..59b44ad 100644
--- a/signkey_ossh.c
+++ b/src/signkey_ossh.c
diff --git a/signkey_ossh.h b/src/signkey_ossh.h
index 080372c..080372c 100644
--- a/signkey_ossh.h
+++ b/src/signkey_ossh.h
diff --git a/sk-ecdsa.c b/src/sk-ecdsa.c
index bed7e50..bed7e50 100644
--- a/sk-ecdsa.c
+++ b/src/sk-ecdsa.c
diff --git a/sk-ecdsa.h b/src/sk-ecdsa.h
index e883bf8..e883bf8 100644
--- a/sk-ecdsa.h
+++ b/src/sk-ecdsa.h
diff --git a/sk-ed25519.c b/src/sk-ed25519.c
index b4827e3..b4827e3 100644
--- a/sk-ed25519.c
+++ b/src/sk-ed25519.c
diff --git a/sk-ed25519.h b/src/sk-ed25519.h
index 74ab7c8..74ab7c8 100644
--- a/sk-ed25519.h
+++ b/src/sk-ed25519.h
diff --git a/ssh.h b/src/ssh.h
index 1b4fec6..1b4fec6 100644
--- a/ssh.h
+++ b/src/ssh.h
diff --git a/sshpty.c b/src/sshpty.c
index 9f12d67..9f12d67 100644
--- a/sshpty.c
+++ b/src/sshpty.c
diff --git a/sshpty.h b/src/sshpty.h
index cf72072..cf72072 100644
--- a/sshpty.h
+++ b/src/sshpty.h
diff --git a/svr-agentfwd.c b/src/svr-agentfwd.c
index a8941ea..a8941ea 100644
--- a/svr-agentfwd.c
+++ b/src/svr-agentfwd.c
diff --git a/svr-auth.c b/src/svr-auth.c
index 10131f1..10131f1 100644
--- a/svr-auth.c
+++ b/src/svr-auth.c
diff --git a/svr-authpam.c b/src/svr-authpam.c
index ec14632..ec14632 100644
--- a/svr-authpam.c
+++ b/src/svr-authpam.c
diff --git a/svr-authpasswd.c b/src/svr-authpasswd.c
index 899a8ab..899a8ab 100644
--- a/svr-authpasswd.c
+++ b/src/svr-authpasswd.c
diff --git a/svr-authpubkey.c b/src/svr-authpubkey.c
index 5d298cb..5d298cb 100644
--- a/svr-authpubkey.c
+++ b/src/svr-authpubkey.c
diff --git a/svr-authpubkeyoptions.c b/src/svr-authpubkeyoptions.c
index df9a7df..df9a7df 100644
--- a/svr-authpubkeyoptions.c
+++ b/src/svr-authpubkeyoptions.c
diff --git a/svr-chansession.c b/src/svr-chansession.c
index 656a968..656a968 100644
--- a/svr-chansession.c
+++ b/src/svr-chansession.c
diff --git a/svr-kex.c b/src/svr-kex.c
index 7d0f12c..7d0f12c 100644
--- a/svr-kex.c
+++ b/src/svr-kex.c
diff --git a/svr-main.c b/src/svr-main.c
index 9234361..9234361 100644
--- a/svr-main.c
+++ b/src/svr-main.c
diff --git a/svr-runopts.c b/src/svr-runopts.c
index cb92595..cb92595 100644
--- a/svr-runopts.c
+++ b/src/svr-runopts.c
diff --git a/svr-service.c b/src/svr-service.c
index 0aa487c..0aa487c 100644
--- a/svr-service.c
+++ b/src/svr-service.c
diff --git a/svr-session.c b/src/svr-session.c
index 769f073..769f073 100644
--- a/svr-session.c
+++ b/src/svr-session.c
diff --git a/svr-tcpfwd.c b/src/svr-tcpfwd.c
index 7967cfa..7967cfa 100644
--- a/svr-tcpfwd.c
+++ b/src/svr-tcpfwd.c
diff --git a/svr-x11fwd.c b/src/svr-x11fwd.c
index 5d9e6a9..5d9e6a9 100644
--- a/svr-x11fwd.c
+++ b/src/svr-x11fwd.c
diff --git a/sysoptions.h b/src/sysoptions.h
index 82249f5..82249f5 100644
--- a/sysoptions.h
+++ b/src/sysoptions.h
diff --git a/tcp-accept.c b/src/tcp-accept.c
index 73cfa54..73cfa54 100644
--- a/tcp-accept.c
+++ b/src/tcp-accept.c
diff --git a/tcpfwd.h b/src/tcpfwd.h
index 69e5af2..69e5af2 100644
--- a/tcpfwd.h
+++ b/src/tcpfwd.h
diff --git a/termcodes.c b/src/termcodes.c
index c5819c1..c5819c1 100644
--- a/termcodes.c
+++ b/src/termcodes.c
diff --git a/termcodes.h b/src/termcodes.h
index cd76b7f..cd76b7f 100644
--- a/termcodes.h
+++ b/src/termcodes.h
diff --git a/x11fwd.h b/src/x11fwd.h
index 96f51b1..96f51b1 100644
--- a/x11fwd.h
+++ b/src/x11fwd.h