diff --git a/VortexEngine/VortexCLI/Makefile b/VortexEngine/VortexCLI/Makefile
index 5b4dc85bf4..b4b2f2b541 100644
--- a/VortexEngine/VortexCLI/Makefile
+++ b/VortexEngine/VortexCLI/Makefile
@@ -2,7 +2,7 @@
 .SUFFIXES:
 
 # List all make targets which are not filenames
-.PHONY: all tests clean wasm
+.PHONY: all tests clean wasm compute_version
 
 # compiler tool definitions
 ifdef WASM
@@ -21,7 +21,11 @@ CFLAGS=-O2 -g -Wall
 
 # compiler defines
 DEFINES=\
-	-D VORTEX_LIB
+	-D VORTEX_LIB \
+	-D VORTEX_VERSION_MAJOR=$(VORTEX_VERSION_MAJOR) \
+	-D VORTEX_VERSION_MINOR=$(VORTEX_VERSION_MINOR) \
+	-D VORTEX_BUILD_NUMBER=$(VORTEX_BUILD_NUMBER) \
+	-D VORTEX_VERSION_NUMBER=$(VORTEX_VERSION_NUMBER)
 
 # compiler include paths
 INCLUDES=\
@@ -107,8 +111,8 @@ wasm: FORCE
 	env WASM=1 $(MAKE)
 
 # target for vortex lib
-vortex: $(DEPS)
-	$(CC) $(CFLAGS) $^ -o $@ $(LLIBS)
+vortex: compute_version $(DEPS)
+	$(CC) $(CFLAGS) $(DEPS) -o $@ $(LLIBS)
 
 # catch-all make target to generate .o and .d files
 %.o: %.cpp
@@ -129,6 +133,17 @@ clean:
 	@$(RM) $(DFILES) $(OBJS) $(TARGETS) $(TESTS) vortex.wasm *.txt FlashStorage.flash
 	$(MAKE) -C ../VortexLib clean
 
+# calculate the version number of the build
+compute_version:
+	$(eval LATEST_TAG ?= $(shell git fetch --depth=1 origin +refs/tags/*:refs/tags/* &> /dev/null && git tag --list | grep --invert-match '[a-zA-Z]' | sort -V | tail -n1))
+	$(eval VORTEX_VERSION_MAJOR ?= $(shell echo $(LATEST_TAG) | cut -d. -f1))
+	$(eval VORTEX_VERSION_MINOR ?= $(shell echo $(LATEST_TAG) | cut -d. -f2))
+	$(eval VORTEX_BUILD_NUMBER ?= $(shell git rev-list --count $(LATEST_TAG)..HEAD))
+	$(eval VORTEX_VERSION_MAJOR := $(if $(VORTEX_VERSION_MAJOR),$(VORTEX_VERSION_MAJOR),0))
+	$(eval VORTEX_VERSION_MINOR := $(if $(VORTEX_VERSION_MINOR),$(VORTEX_VERSION_MINOR),1))
+	$(eval VORTEX_BUILD_NUMBER := $(if $(VORTEX_BUILD_NUMBER),$(VORTEX_BUILD_NUMBER),0))
+	$(eval VORTEX_VERSION_NUMBER := $(VORTEX_VERSION_MAJOR).$(VORTEX_VERSION_MINOR).$(VORTEX_BUILD_NUMBER))
+
 # Now include our target dependency files
 # the hyphen means ignore non-existent files
 -include $(DFILES)
diff --git a/VortexEngine/VortexLib/Makefile b/VortexEngine/VortexLib/Makefile
index 6a2445d2a6..d51ed0f74c 100644
--- a/VortexEngine/VortexLib/Makefile
+++ b/VortexEngine/VortexLib/Makefile
@@ -113,7 +113,7 @@ TARGETS=vortex.a
 endif
 
 # Default target for 'make' command
-all: compute_version $(TARGETS)
+all: $(TARGETS)
 
 # unit test target
 tests: $(TESTS)
@@ -123,11 +123,11 @@ wasm: FORCE
 	env WASM=1 $(MAKE)
 
 # target for vortex lib
-vortex.a: $(DEPS)
-	$(AR) $@ $^
+vortex.a: compute_version $(DEPS)
+	$(AR) $@ $(DEPS)
 
-VortexLib.js: $(DEPS)
-	$(CC) $(LDFLAGS) $^ -o $@ $(LLIBS)
+VortexLib.js: compute_version $(DEPS)
+	$(CC) $(LDFLAGS) $(DEPS) -o $@ $(LLIBS)
 
 # catch-all make target to generate .o and .d files
 %.o: %.cpp