add Help with list of targets to SConstruct pyrit
authorRadek Brich <radek.brich@devl.cz>
Wed, 09 Apr 2008 17:55:29 +0200
branchpyrit
changeset 64 5785cca4cdb9
parent 63 440e1ae80459
child 65 242839c6d27d
add Help with list of targets to SConstruct
DEVNOTES
SConstruct
--- a/DEVNOTES	Wed Apr 09 16:51:14 2008 +0200
+++ b/DEVNOTES	Wed Apr 09 17:55:29 2008 +0200
@@ -1,26 +1,3 @@
-SCons Targets
--------------
-models = local-models, download-models
-local-models
-download-models
-
-demos = python-demos, cc-demos
-python-demos
-cc-demos
-
-libs = static-lib, python-module
-objs
-static-lib
-shared-objs
-python-module
-
-all = no-docs, docs
-no-download = libs, demos, local-models
-no-docs = libs, demos, models
-docs
-
-Default is no-docs.
-
 Classes
 -------
 
--- a/SConstruct	Wed Apr 09 16:51:14 2008 +0200
+++ b/SConstruct	Wed Apr 09 17:55:29 2008 +0200
@@ -1,3 +1,32 @@
+Help("""
+Targets:
+    all              - build everything,
+
+    libs             - build all libraries
+    demos            - build all demos
+    models           - download/prepare all models
+    docs             - compile doxygen documentation
+
+    libs = (static-lib, python-module)
+    static-lib       - ray tracer library to link with
+    python-module    - ray tracer module for Python
+
+    demos = (python-demos, cc-demos)
+    python-demos     - Python demos, this depends on python-module
+    cc-demos         - C++ demos
+
+    models = (local-models, download-models)
+    local-models     - prepare local models
+    download-models  - download models which are not locally available
+
+    no-docs = (libs, demos, models)
+                     - everything but docs
+    no-download = (libs, demos, local-models)
+                     - everything but docs and downloadable models
+
+Default target is no-download.
+""")
+
 Decider('MD5-timestamp')
 import os
 env = Environment(ENV = {'PATH' : os.environ['PATH']})
@@ -11,12 +40,14 @@
 env.Append(CCFLAGS="-O3 -w1 -mtune=core2 -xT ")
 
 ### MinGW32
-#  LDFLAGS+=-lpthreadGC2
 #  PY_CCFLAGS=-I"C:\Program Files\Python25\include"
 #  PY_LDFLAGS=-L"C:\Program Files\Python25\libs" -lpython25
 
 # pthread
-env.Append(CCFLAGS="-pthread ")
+if env['PLATFORM'] == 'win32':
+	env.Append(LINKFLAGS="-lpthreadGC2 ")
+else:
+	env.Append(CCFLAGS="-pthread ")
 
 # CCFLAGS=-g -fno-strict-aliasing
 
@@ -33,9 +64,10 @@
 env.Alias('docs', Command('docs/html', [], 'doxygen'))
 env.Clean('docs', ['docs/html', 'docs/latex'])
 
-env.Alias('all', ['no-docs', 'docs'])
 env.Alias('no-docs', ['libs', 'demos', 'models'])
 env.Alias('no-download', ['libs', 'demos', 'local-models'])
 
+env.Alias('all', ['no-docs', 'docs'])
+
 env.Alias('pyrit', 'no-download')
 Default('pyrit')