diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000000000000000000000000000000000000..80d844f1c19d99ef83a9fd100061b97c064d4dfd
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "third_party/luajit"]
+	path = third_party/luajit
+	url = http://luajit.org/git/luajit-2.0.git
diff --git a/cmake/luajit.cmake b/cmake/luajit.cmake
index 0fa22afae268012056da5c21139d73b9c6dca6e9..39605efd69b5596d437253f3f8cb341be59d5358 100644
--- a/cmake/luajit.cmake
+++ b/cmake/luajit.cmake
@@ -152,9 +152,6 @@ macro(luajit_build)
         add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/third_party/luajit/src/libluajit.a
             WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/third_party/luajit
             COMMAND $(MAKE) clean
-            COMMAND $(MAKE) -C src -t buildvm_x86.h buildvm_arm.h
-                            buildvm_x64.h buildvm_x64win.h buildvm_ppc.h
-                            buildvm_ppcspe.h
             COMMAND $(MAKE) -C src ${luajit_buildoptions}
             DEPENDS ${CMAKE_SOURCE_DIR}/CMakeCache.txt
         )
@@ -166,9 +163,6 @@ macro(luajit_build)
             WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/third_party/luajit
             COMMAND cp -r ${PROJECT_SOURCE_DIR}/third_party/luajit/* .
             COMMAND $(MAKE) clean
-            COMMAND $(MAKE) -C src -t buildvm_x86.h buildvm_arm.h
-                            buildvm_x64.h buildvm_x64win.h buildvm_ppc.h
-                            buildvm_ppcspe.h
             COMMAND $(MAKE) -C src ${luajit_buildoptions}
             DEPENDS ${PROJECT_BINARY_DIR}/CMakeCache.txt ${PROJECT_BINARY_DIR}/third_party/luajit
         )
diff --git a/third_party/README b/third_party/README
index abf30f28929d178fc20a98792a4e243a663aab54..ae9125d4a8f75eebe8cb8944a995f198e34818d8 100644
--- a/third_party/README
+++ b/third_party/README
@@ -11,11 +11,8 @@ cvs up
 How to update luajit
 ====================
 
-- download the latest release source tarball
-- replace the contents of the luajit directory 
-with the contents of the tarball
-- merge the original Makefile and the Makefile
-from the new tarball.
+Run from project root dir:
+git submodule update --reference v2.0.1-fixed -- third_party/luajit
 
 How to update libobjc2
 ======================
diff --git a/third_party/luajit b/third_party/luajit
new file mode 160000
index 0000000000000000000000000000000000000000..e7633dba1e446763454a7969ce7e27139debc6cd
--- /dev/null
+++ b/third_party/luajit
@@ -0,0 +1 @@
+Subproject commit e7633dba1e446763454a7969ce7e27139debc6cd