From 76b1d421f6ddbe8856b40dcec8fc468e6dc043d6 Mon Sep 17 00:00:00 2001 From: Moritz Wundke Date: Thu, 6 Mar 2014 20:46:15 +0100 Subject: [PATCH 1/6] Addinf basic makefile to support many C/C++ IDEs out there Make file is configured by default to act identically as a default SCons build. Baseic actions such as all and clean will be supported by default by quite all IDE for building and rebuilding. Additionaly you can configure your targets for release, debug or profile mode. --- makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 makefile diff --git a/makefile b/makefile new file mode 100644 index 00000000000..d24bd0cd321 --- /dev/null +++ b/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 From 12a3989cd7b645f271c8b297a09cb0a4a7d8d2d4 Mon Sep 17 00:00:00 2001 From: Moritz Wundke Date: Fri, 7 Mar 2014 20:20:06 +0100 Subject: [PATCH 2/6] Speed build time up by 6 using multiple jobs Adding aggresive build mode that spawns num_core+1 jobs. This speeds up build time by 6. On my 8 core machine I'm down from 6m:16s to 1m:34s. --- SConstruct | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SConstruct b/SConstruct index ed65f2b89fe..1b4ee5ab96d 100644 --- a/SConstruct +++ b/SConstruct @@ -6,6 +6,13 @@ import os.path import glob import sys import methods +import multiprocessing + +# Enable aggresive compile mode if building on amulti core box +if ARGUMENTS.get('spawn_jobs', 'yes') == 'yes': + NUM_JOBS = multiprocessing.cpu_count() + if NUM_JOBS > 1: + SetOption('num_jobs', multiprocessing.cpu_count()+1) methods.update_version() From 1fd08ad1ac543830bc908d5caa34d7f5371b26c1 Mon Sep 17 00:00:00 2001 From: Moritz Wundke Date: Fri, 7 Mar 2014 20:31:17 +0100 Subject: [PATCH 3/6] Fixed typo --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 1b4ee5ab96d..2b83cb67cfe 100644 --- a/SConstruct +++ b/SConstruct @@ -8,7 +8,7 @@ import sys import methods import multiprocessing -# Enable aggresive compile mode if building on amulti core box +# Enable aggresive compile mode if building on a multi core box if ARGUMENTS.get('spawn_jobs', 'yes') == 'yes': NUM_JOBS = multiprocessing.cpu_count() if NUM_JOBS > 1: From f1b1a38af95c28e8b08e97ca25cc7cf638ef6da3 Mon Sep 17 00:00:00 2001 From: Moritz Wundke Date: Sat, 8 Mar 2014 18:50:24 +0100 Subject: [PATCH 4/6] Do not set number of jobs if already specified --- SConstruct | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 2b83cb67cfe..a9739ca604c 100644 --- a/SConstruct +++ b/SConstruct @@ -9,10 +9,13 @@ import methods import multiprocessing # Enable aggresive compile mode if building on a multi core box -if ARGUMENTS.get('spawn_jobs', 'yes') == 'yes': +# 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', multiprocessing.cpu_count()+1) + SetOption('num_jobs', NUM_JOBS+1) methods.update_version() From 5634da99342deb17ffa3253cd5bf1494bec65001 Mon Sep 17 00:00:00 2001 From: Moritz Wundke Date: Sat, 8 Mar 2014 20:44:18 +0100 Subject: [PATCH 5/6] Adding CodeLite and KDE files to .gitignore --- .gitignore | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index abe1a234f52..8c36422675c 100644 --- a/.gitignore +++ b/.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/ From caa1586480bb9105a43e6790a9025c931af7452f Mon Sep 17 00:00:00 2001 From: Moritz Wundke Date: Sat, 8 Mar 2014 20:46:04 +0100 Subject: [PATCH 6/6] Adding CodeLite hidden folder to .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8c36422675c..dc7b118c799 100644 --- a/.gitignore +++ b/.gitignore @@ -119,7 +119,7 @@ ipch/ # CodeLite project files *.project *.workspace -*.codelite +.codelite/ # TFS 2012 Local Workspace $tf/