Browse Source

Sharing compiled objects across different projects to save time.

David Piuva 3 years ago
parent
commit
0239888550

+ 1 - 2
Source/SDK/cube/build_windows.bat

@@ -2,6 +2,5 @@
 
 
 rem Launch the build system with main.DsrProj and Windows selected as the platform.
 rem Launch the build system with main.DsrProj and Windows selected as the platform.
 
 
-echo "Running build_windows.bat %@%
-
+echo "Running build_windows.bat %@%
 ../../tools/builder/buildProject.bat main.DsrProj Windows %@%
 ../../tools/builder/buildProject.bat main.DsrProj Windows %@%

+ 6 - 0
Source/SDK/fileFinder/build_linux.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Launch the build system with main.DsrProj and Linux selected as the platform.
+echo "Running build_linux.sh $@"
+chmod +x ../../tools/builder/buildProject.sh;
+../../tools/builder/buildProject.sh main.DsrProj Linux $@;

+ 6 - 0
Source/SDK/fileFinder/build_windows.bat

@@ -0,0 +1,6 @@
+@echo off
+
+rem Launch the build system with main.DsrProj and Windows selected as the platform.
+
+echo "Running build_windows.bat %@%
+../../tools/builder/buildProject.bat main.DsrProj Windows %@%

+ 9 - 0
Source/SDK/fileFinder/main.DsrProj

@@ -0,0 +1,9 @@
+CompilerFlag "-std=c++14"
+Graphics
+Sound
+Crawl "main.cpp"
+Import "../../DFPSR/DFPSR.DsrHead"
+ProgramPath = "application"
+
+# Uncomment to enable debug mode, which is slower
+#Debug

+ 6 - 0
Source/SDK/guiExample/build_linux.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Launch the build system with main.DsrProj and Linux selected as the platform.
+echo "Running build_linux.sh $@"
+chmod +x ../../tools/builder/buildProject.sh;
+../../tools/builder/buildProject.sh main.DsrProj Linux $@;

+ 6 - 0
Source/SDK/guiExample/build_windows.bat

@@ -0,0 +1,6 @@
+@echo off
+
+rem Launch the build system with main.DsrProj and Windows selected as the platform.
+
+echo "Running build_windows.bat %@%
+../../tools/builder/buildProject.bat main.DsrProj Windows %@%

+ 9 - 0
Source/SDK/guiExample/main.DsrProj

@@ -0,0 +1,9 @@
+CompilerFlag "-std=c++14"
+Graphics
+Sound
+Crawl "main.cpp"
+Import "../../DFPSR/DFPSR.DsrHead"
+ProgramPath = "application"
+
+# Uncomment to enable debug mode, which is slower
+#Debug

+ 6 - 0
Source/SDK/sandbox/build_linux.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Launch the build system with main.DsrProj and Linux selected as the platform.
+echo "Running build_linux.sh $@"
+chmod +x ../../tools/builder/buildProject.sh;
+../../tools/builder/buildProject.sh main.DsrProj Linux $@;

+ 6 - 0
Source/SDK/sandbox/build_windows.bat

@@ -0,0 +1,6 @@
+@echo off
+
+rem Launch the build system with main.DsrProj and Windows selected as the platform.
+
+echo "Running build_windows.bat %@%
+../../tools/builder/buildProject.bat main.DsrProj Windows %@%

+ 17 - 0
Source/SDK/sandbox/main.DsrProj

@@ -0,0 +1,17 @@
+CompilerFlag "-std=c++14"
+Graphics
+Sound
+
+# An include using quotation marks will detect the header and its headers recursively.
+# For each detected header, the build system looks for an implementation file of the same name in the same folder.
+# Because sandbox.cpp and tool.cpp don't have sandbox.h/hpp or tool.h/hpp, the build system can't know that main depends on them.
+Crawl "main.cpp"
+# Then we just start a new crawl search from each of those disconnected include branches.
+Crawl "sandbox.cpp"
+Crawl "tool.cpp"
+
+Import "../../DFPSR/DFPSR.DsrHead"
+ProgramPath = "application"
+
+# Uncomment to enable debug mode, which is slower
+#Debug

+ 6 - 0
Source/SDK/terrain/build_linux.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Launch the build system with main.DsrProj and Linux selected as the platform.
+echo "Running build_linux.sh $@"
+chmod +x ../../tools/builder/buildProject.sh;
+../../tools/builder/buildProject.sh main.DsrProj Linux $@;

+ 6 - 0
Source/SDK/terrain/build_windows.bat

@@ -0,0 +1,6 @@
+@echo off
+
+rem Launch the build system with main.DsrProj and Windows selected as the platform.
+
+echo "Running build_windows.bat %@%
+../../tools/builder/buildProject.bat main.DsrProj Windows %@%

+ 9 - 0
Source/SDK/terrain/main.DsrProj

@@ -0,0 +1,9 @@
+CompilerFlag "-std=c++14"
+Graphics
+Sound
+Crawl "main.cpp"
+Import "../../DFPSR/DFPSR.DsrHead"
+ProgramPath = "application"
+
+# Uncomment to enable debug mode, which is slower
+#Debug

+ 6 - 0
Source/templates/basic3D/build_linux.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Launch the build system with main.DsrProj and Linux selected as the platform.
+echo "Running build_linux.sh $@"
+chmod +x ../../tools/builder/buildProject.sh;
+../../tools/builder/buildProject.sh main.DsrProj Linux $@;

+ 6 - 0
Source/templates/basic3D/build_windows.bat

@@ -0,0 +1,6 @@
+@echo off
+
+rem Launch the build system with main.DsrProj and Windows selected as the platform.
+
+echo "Running build_windows.bat %@%
+../../tools/builder/buildProject.bat main.DsrProj Windows %@%

+ 9 - 0
Source/templates/basic3D/main.DsrProj

@@ -0,0 +1,9 @@
+CompilerFlag "-std=c++14"
+Graphics
+Sound
+Crawl "main.cpp"
+Import "../../DFPSR/DFPSR.DsrHead"
+ProgramPath = "application"
+
+# Uncomment to enable debug mode, which is slower
+#Debug

+ 6 - 0
Source/templates/basicCLI/build_linux.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Launch the build system with main.DsrProj and Linux selected as the platform.
+echo "Running build_linux.sh $@"
+chmod +x ../../tools/builder/buildProject.sh;
+../../tools/builder/buildProject.sh main.DsrProj Linux $@;

+ 6 - 0
Source/templates/basicCLI/build_windows.bat

@@ -0,0 +1,6 @@
+@echo off
+
+rem Launch the build system with main.DsrProj and Windows selected as the platform.
+
+echo "Running build_windows.bat %@%
+../../tools/builder/buildProject.bat main.DsrProj Windows %@%

+ 9 - 0
Source/templates/basicCLI/main.DsrProj

@@ -0,0 +1,9 @@
+CompilerFlag "-std=c++14"
+Graphics
+Sound
+Crawl "main.cpp"
+Import "../../DFPSR/DFPSR.DsrHead"
+ProgramPath = "application"
+
+# Uncomment to enable debug mode, which is slower
+#Debug

+ 6 - 0
Source/templates/basicGUI/build_linux.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Launch the build system with main.DsrProj and Linux selected as the platform.
+echo "Running build_linux.sh $@"
+chmod +x ../../tools/builder/buildProject.sh;
+../../tools/builder/buildProject.sh main.DsrProj Linux $@;

+ 6 - 0
Source/templates/basicGUI/build_windows.bat

@@ -0,0 +1,6 @@
+@echo off
+
+rem Launch the build system with main.DsrProj and Windows selected as the platform.
+
+echo "Running build_windows.bat %@%
+../../tools/builder/buildProject.bat main.DsrProj Windows %@%

+ 9 - 0
Source/templates/basicGUI/main.DsrProj

@@ -0,0 +1,9 @@
+CompilerFlag "-std=c++14"
+Graphics
+Sound
+Crawl "main.cpp"
+Import "../../DFPSR/DFPSR.DsrHead"
+ProgramPath = "application"
+
+# Uncomment to enable debug mode, which is slower
+#Debug

+ 1 - 1
Source/tools/builder/generator.cpp

@@ -384,7 +384,7 @@ void generateCompilationScript(const Machine &settings, const ReadableString& pr
 		if (extension == Extension::C || extension == Extension::Cpp) {
 		if (extension == Extension::C || extension == Extension::Cpp) {
 			// Dependency paths are already absolute from the recursive search.
 			// Dependency paths are already absolute from the recursive search.
 			String sourcePath = dependencies[d].path;
 			String sourcePath = dependencies[d].path;
-			String identity = string_combine(sourcePath, compilerFlags, projectPath);
+			String identity = string_combine(sourcePath, compilerFlags);
 			sourceObjects.pushConstruct(sourcePath, tempFolder, identity, d);
 			sourceObjects.pushConstruct(sourcePath, tempFolder, identity, d);
 			if (file_getEntryType(sourcePath) != EntryType::File) {
 			if (file_getEntryType(sourcePath) != EntryType::File) {
 				throwError(U"The source file ", sourcePath, U" could not be found!\n");
 				throwError(U"The source file ", sourcePath, U" could not be found!\n");