Parcourir la source

Merge pull request #175 from MysticTreeGames/master

Engine build improvements
reduz il y a 11 ans
Parent
commit
3dcfdc057c
3 fichiers modifiés avec 48 ajouts et 0 suppressions
  1. 8 0
      .gitignore
  2. 10 0
      SConstruct
  3. 30 0
      makefile

+ 8 - 0
.gitignore

@@ -116,6 +116,11 @@ ipch/
 *.vsp
 *.vspx
 
+# CodeLite project files
+*.project
+*.workspace
+.codelite/
+
 # TFS 2012 Local Workspace
 $tf/
 
@@ -198,6 +203,9 @@ ClientBin/
 *.publishsettings
 node_modules/
 
+# KDE
+.directory
+
 # RIA/Silverlight projects
 Generated_Code/
 

+ 10 - 0
SConstruct

@@ -6,6 +6,16 @@ import os.path
 import glob
 import sys
 import methods
+import multiprocessing
+
+# Enable aggresive compile mode if building on a multi core box
+# only is we have not set the number of jobs already or we do
+# not want it
+if ARGUMENTS.get('spawn_jobs', 'yes') == 'yes' and \
+	int(GetOption('num_jobs')) <= 1:
+	NUM_JOBS = multiprocessing.cpu_count()
+	if NUM_JOBS > 1:
+		SetOption('num_jobs', NUM_JOBS+1)
 
 methods.update_version()
 

+ 30 - 0
makefile

@@ -0,0 +1,30 @@
+#*************************************************************************/
+#*                       This file is part of:                           */
+#*                           GODOT ENGINE                                */
+#*                    http://www.godotengine.org                         */
+#*************************************************************************/
+# Simple makefile to give support for external C/C++ IDEs                */
+#*************************************************************************/
+
+# Default build
+all: debug
+
+# Release Build
+release:
+	scons target="release" bin/godot
+
+# Profile Build
+profile:
+	scons target="profile" bin/godot
+
+# Debug Build
+debug:
+	# Debug information (code size gets severely affected):
+	# g: Default (same as g2)
+	# g0: no debug info
+	# g1: minimal info
+	# g3: maximal info
+	scons target="debug" CCFLAGS="-g" bin/godot
+
+clean:
+	scons -c bin/godot