-- Cleanup a couple of Makefile.in
-- Source nrf_setup_vars.sh when building lock example app targets
   to bring in the env vars that were generated during the prepare
   script.
diff --git a/.travis/build_nrf52840_lock_example.sh b/.travis/build_nrf52840_lock_example.sh
index cda8bbd..513065f 100755
--- a/.travis/build_nrf52840_lock_example.sh
+++ b/.travis/build_nrf52840_lock_example.sh
@@ -27,6 +27,9 @@
 # Add Nordic nRF jprog tool to the path.
 export PATH=${PATH}:${NRF5_TOOLS_ROOT}/nrfjprog
 
+# Source env variables generated from the prepare script.
+source ${TRAVIS_BUILD_DIR}/nrf_setup_vars.sh
+
 # Set OPENWEAVE_ROOT to the Travis build directory. This will result in the example app being
 # built using the target OpenWeave commit.
 export OPENWEAVE_ROOT=${TRAVIS_BUILD_DIR}
diff --git a/.travis/prepare_nrf52840_lock_example.sh b/.travis/prepare_nrf52840_lock_example.sh
index 31f210f..e01c493 100755
--- a/.travis/prepare_nrf52840_lock_example.sh
+++ b/.travis/prepare_nrf52840_lock_example.sh
@@ -44,8 +44,12 @@
 EXAMPLE_APP_BRANCH=`git -C ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example rev-parse --abbrev-ref HEAD`
 
 # Call the prepare script in the lock example repo to install related
-# dependencies.
-source ${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example/.travis/prepare.sh
+# dependencies. This will also generate a file ${TRAVIS_BUILD_DIR}/nrf_setup_vars.sh
+${TRAVIS_BUILD_DIR}/openweave-nrf52840-lock-example/.travis/prepare.sh
+
+# Source nrf_setup_vars.sh since it contains the URLs and paths to the tools
+# that were generated.
+source ${TRAVIS_BUILD_DIR}/nrf_setup_vars.sh
 
 # Initialize and update all submodules within the example app EXCEPT the
 # OpenWeave submodule.
diff --git a/src/adaptations/device-layer/Makefile.in b/src/adaptations/device-layer/Makefile.in
index f7e2638..38ede4e 100644
--- a/src/adaptations/device-layer/Makefile.in
+++ b/src/adaptations/device-layer/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -39,17 +39,7 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -150,6 +140,10 @@
 @CONFIG_DEVICE_LAYER_TRUE@@WEAVE_DEVICE_LAYER_TARGET_NRF5_TRUE@    $(NULL)
 
 subdir = src/adaptations/device-layer
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/mkinstalldirs \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/depcomp \
+	$(noinst_HEADERS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_compiler.m4 \
 	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage.m4 \
@@ -180,8 +174,6 @@
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
-	$(am__DIST_COMMON)
 mkinstalldirs = $(SHELL) \
 	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/src/include/BuildConfig.h
@@ -378,9 +370,6 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/depcomp \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/mkinstalldirs
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -629,7 +618,6 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -763,6 +751,7 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/adaptations/device-layer/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --foreign src/adaptations/device-layer/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -2016,8 +2005,6 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am uninstall-libLIBRARIES
 
-.PRECIOUS: Makefile
-
 
 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
 
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
index 67140f5..bce6a29 100644
--- a/src/include/Makefile.in
+++ b/src/include/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -42,17 +42,7 @@
 #
 
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -133,38 +123,10 @@
 @WEAVE_BUILD_LEGACY_WDM_TRUE@$(NULL)
 
 subdir = src/include
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_compiler.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage_reporting.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_debug.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_docs.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_optimization.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_tests.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_werror.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_filtered_canonical.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_prog_lndir.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_werror.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_with_package.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_compare_version.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_11.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_jni_include_dir.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_pthread.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/libtool.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltoptions.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltsugar.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltversion.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/lt~obsolete.m4 \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/pkg.m4 \
-	$(top_srcdir)/build/autoconf/m4/nl_check_project_config_includes.m4 \
-	$(top_srcdir)/build/autoconf/m4/nl_enable_long_tests.m4 \
-	$(top_srcdir)/build/autoconf/m4/nl_with_lwip.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(dist_ble_ble_HEADERS) \
-	$(dist_ble_device_manager_HEADERS) \
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(srcdir)/BuildConfig.h.in \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/mkinstalldirs \
+	$(dist_ble_ble_HEADERS) $(dist_ble_device_manager_HEADERS) \
 	$(dist_device_manager_HEADERS) $(dist_inet_HEADERS) \
 	$(dist_micro_ecc_HEADERS) $(dist_mincrypt_HEADERS) \
 	$(dist_platform_ble_bluez_HEADERS) $(dist_system_HEADERS) \
@@ -216,7 +178,37 @@
 	$(weave_profiles_status_report_HEADERS) \
 	$(weave_profiles_time_HEADERS) \
 	$(weave_profiles_token_pairing_HEADERS) \
-	$(weave_profiles_weave_tunneling_HEADERS) $(am__DIST_COMMON)
+	$(weave_profiles_weave_tunneling_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_compiler.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage_reporting.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_debug.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_docs.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_optimization.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_tests.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_werror.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_filtered_canonical.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_prog_lndir.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_werror.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/autoconf/m4/nl_with_package.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_compare_version.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_11.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_jni_include_dir.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_pthread.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/libtool.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltoptions.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltsugar.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltversion.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/lt~obsolete.m4 \
+	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/pkg.m4 \
+	$(top_srcdir)/build/autoconf/m4/nl_check_project_config_includes.m4 \
+	$(top_srcdir)/build/autoconf/m4/nl_enable_long_tests.m4 \
+	$(top_srcdir)/build/autoconf/m4/nl_with_lwip.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) \
 	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/mkinstalldirs
 CONFIG_HEADER = BuildConfig.h
@@ -413,8 +405,6 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/BuildConfig.h.in $(srcdir)/Makefile.in \
-	$(top_srcdir)/third_party/nlbuild-autotools/repo/third_party/autoconf/mkinstalldirs
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -663,7 +653,6 @@
 psdir = @psdir@
 pyexecdir = @pyexecdir@
 pythondir = @pythondir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -1659,6 +1648,7 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/include/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --foreign src/include/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -3413,8 +3403,6 @@
 	uninstall-weave_profiles_token_pairingHEADERS \
 	uninstall-weave_profiles_weave_tunnelingHEADERS
 
-.PRECIOUS: Makefile
-
 
 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am