Use an indirect reference to detect the 3rdparty directory
diff --git a/3rdparty/Makefile.inc b/3rdparty/Makefile.inc
index c93fcbc..0ed85af 100644
--- a/3rdparty/Makefile.inc
+++ b/3rdparty/Makefile.inc
@@ -1,5 +1,2 @@
-ifeq ($(INCLUDING_FROM_MBEDTLS), 1)
-include ../crypto/3rdparty/everest/Makefile.inc
-else
-include ../3rdparty/everest/Makefile.inc
-endif
+THIRDPARTY_DIR = $(dir $(lastword $(MAKEFILE_LIST)))
+include $(THIRDPARTY_DIR)/everest/Makefile.inc