[AD] New makefile option STATICRUNTIME

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


As requested by Omar, this patch adds a new makefile option STATICRUNTIME 
that instructs the build process to link Allegro against static versions of 
the runtime libraries, instead of dynamic versions.  It works for MSVC only 
for the time being.

Could anyone give it a try?

-- 
Eric Botcazou
--- /home/eric/cvs/allegro/makefile.vc	Sat Nov 29 08:51:10 2003
+++ allegro/makefile.vc	Sun Feb 15 19:33:31 2004
@@ -136,11 +136,17 @@
    WFLAGS = -W1
 endif
 
+ifdef STATICRUNTIME
+   RUNTIME_FLAGS = -MT
+else
+   RUNTIME_FLAGS = -MD
+endif
+
 ifdef DEBUGMODE
 
 # -------- debugging build --------
 
-CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Gd -Zi -MDd
+CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Gd -Zi $(RUNTIME_FLAGS)d
 SFLAGS = -DDEBUGMODE=$(DEBUGMODE) -Wall
 LFLAGS = -debug -debugtype:cv
 
@@ -149,7 +155,7 @@
 
 # -------- profiling build --------
 
-CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD
+CFLAGS = $(WFLAGS) -Gd -Ox -GB $(RUNTIME_FLAGS)
 SFLAGS = -Wall
 LFLAGS = -profile
 
@@ -157,7 +163,7 @@
 
 # -------- optimised build --------
 
-CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD
+CFLAGS = $(WFLAGS) -Gd -Ox -GB $(RUNTIME_FLAGS)
 SFLAGS = -Wall
 LFLAGS = -release
 
--- /home/eric/cvs/allegro/docs/src/allegro._tx	Sat Feb 14 16:28:12 2004
+++ allegro/docs/src/allegro._tx	Sun Feb 15 19:35:10 2004
@@ -10054,6 +10054,10 @@
    STATICLINK=1 (MinGW, MSVC, BeOS, MacOS X only)<br>
    Link as a static library, rather than the default dynamic library.
 <li>
+   STATICRUNTIME=1 (MSVC only)<br>
+   Link against static runtime libraries, rather than the default dynamic
+   runtime libraries.
+<li>
    TARGET_ARCH_COMPAT=[cpu] (GCC-based platforms only)<br>
    This option will optimize for the given processor while maintaining
    compatibility with older processors.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/