[AD] ICL/MSVC documentation patch

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


Attached is what I came up with as the synthesis of the patches posted 
today for the MSVC documentation and Intel compiler is Windows. I changed 
a few things compared to versions posted as I had to edit the patches 
manually. Someone please check that I didn't break anything in the process 
before I apply it (it should apply cleanly to current CVS).

Evert
Index: makefile.vc
===================================================================
RCS file: /cvsroot/alleg/allegro/makefile.vc,v
retrieving revision 1.63
diff -u -r1.63 makefile.vc
--- makefile.vc	28 Mar 2005 12:23:46 -0000	1.63
+++ makefile.vc	29 Mar 2005 21:33:30 -0000
@@ -5,6 +5,12 @@
 #  To path MSVC so it can be used from the commandline, run the
 #  vcvars32.bat file which can be found in your MSVC bin directory.
 #
+#  To use MSVC specific options, the variable COMPILER_MSVC7 must be set. The
+#  fix.bat script should do this automatically if run as `fix --msvc7'
+#
+#  To use the Intel commandline compiler instead of the MSVC compiler,
+#  COMPILER_ICL must be set. Again, `fix --icl' should take care of this.
+#
 #  This platform uses GCC for building the assembler sources and calculating
 #  source dependencies, so you'll need to have that installed in the form of
 #  DJGPP, MinGW or Cygwin.
@@ -122,7 +128,11 @@
 
 # -------- Work out the absolute pathnames for some MSVC tools to avoid confusion --------
 
-MSVC_CL = $(MSVCDIR_U)/bin/cl
+ifdef COMPILER_ICL
+   MSVC_CL = icl
+else
+   MSVC_CL = $(MSVCDIR_U)/bin/cl
+endif
 MSVC_LINK = $(MSVCDIR_U)/bin/link
 MSVC_LIB = $(MSVCDIR_U)/bin/lib
 MSVC_RC = rc
@@ -172,11 +182,17 @@
 
 # -------- optimised build --------
 
-CFLAGS = $(WFLAGS) -Gd -O2 -GB $(RUNTIME_FLAGS)
+CFLAGS = $(WFLAGS) -Gd $(RUNTIME_FLAGS)
 SFLAGS = -Wall
 LFLAGS = -release
 LIBPARMS = 
 
+ifdef COMPILER_ICL
+   CFLAGS += -Os -G7 -QaxPN
+else
+   CFLAGS += -O2 -GB
+endif
+
 ifdef COMPILER_MSVC7
    CFLAGS += -GL
    LFLAGS += -LTCG
Index: fix.bat
===================================================================
RCS file: /cvsroot/alleg/allegro/fix.bat,v
retrieving revision 1.15
diff -u -r1.15 fix.bat
--- fix.bat	3 Feb 2005 23:31:36 -0000	1.15
+++ fix.bat	29 Mar 2005 21:33:30 -0000
@@ -28,6 +28,7 @@
 if [%1] == [mingw32] goto head
 if [%1] == [msvc]    goto head
 if [%1] == [msvc7]   goto head
+if [%1] == [icl]     goto head
 if [%1] == [watcom]  goto head
 goto help
 
@@ -41,8 +42,9 @@
 if [%1] == [bcc32]   goto bcc32
 if [%1] == [djgpp]   goto djgpp
 if [%1] == [mingw32] goto mingw32
-if [%1] == [msvc]    goto msvc
+if [%1] == [msvc]    goto msvc6
 if [%1] == [msvc7]   goto msvc7
+if [%1] == [icl]     goto icl
 if [%1] == [watcom]  goto watcom
 
 echo fix.bat internal error: not reached
@@ -66,12 +68,21 @@
 echo #define ALLEGRO_MINGW32 >> include\allegro\platform\alplatf.h
 goto tail
 
+:icl
+echo Configuring Allegro for Windows/ICL...
+echo COMPILER_ICL = 1 >> makefile
+goto msvccommon
+
 :msvc7
+echo Configuring Allegro for Windows/MSVC7...
 echo COMPILER_MSVC7 = 1 >> makefile
-goto msvc
+goto msvccommon
+
+:msvc6
+echo Configuring Allegro for Windows/MSVC6...
+goto msvccommon
 
-:msvc
-echo Configuring Allegro for Windows/MSVC...
+:msvccommon
 echo MAKEFILE_INC = makefile.vc >> makefile
 echo #define ALLEGRO_MSVC >> include\allegro\platform\alplatf.h
 goto tail
@@ -86,7 +97,7 @@
 echo.
 echo Usage: fix platform [--quick] [--msvcpaths]
 echo.
-echo Where platform is one of: bcc32, djgpp, mingw32, msvc, msvc7 or watcom.
+echo Where platform is one of: bcc32, djgpp, mingw32, msvc, msvc7, icl or watcom.
 echo.
 echo The --quick parameter is used to turn off LF to CR/LF conversion.
 echo.
@@ -129,4 +140,4 @@
 :done
 echo Done!
 
-:end
\ No newline at end of file
+:end
Index: docs/src/build/msvc._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/build/msvc._tx,v
retrieving revision 1.8
diff -u -r1.8 msvc._tx
--- docs/src/build/msvc._tx	3 Feb 2005 23:31:37 -0000	1.8
+++ docs/src/build/msvc._tx	29 Mar 2005 21:33:30 -0000
@@ -133,9 +133,9 @@
    using MinGW and want the <tt>fix.bat</tt> to solve problems with long paths,
    type "<tt>fix.bat msvc --msvcpaths</tt>".
    
-   If you are using MSVC 7 or higher you can specify "msvc7" instead of "msvc"
-   which will enable better optimalization. However it can make the compilation
-   slower especially for the statically linked version.
+   If you are using MSVC 7 you can specify "msvc7" instead of "msvc" to enable
+   better optimizations. Likewise, you can specify "icl" to use the Intel
+   commandline compiler.
 
    If you are compiling from CVS, before continuing you must run both
    "<tt>make depend</tt>" and "<tt>misc/fixdll.sh</tt>" as explained below, or the build will
Index: docs/src/allegro._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
retrieving revision 1.309
diff -u -r1.309 allegro._tx
--- docs/src/allegro._tx	22 Mar 2005 20:23:29 -0000	1.309
+++ docs/src/allegro._tx	29 Mar 2005 21:39:15 -0000
@@ -12957,6 +12957,18 @@
    Instructs the build process to use Unix-like tools instead of DOS tools.
    Note that you usually don't need to set it because the build proces will
    try to autodetect this configuration.
+<li>
+   COMPILER_MSVC7=1 (MSVC only)<br>
+   Enables special optimizations for MSVC 7 (the default is MSVC 6). You don't
+   normally need to set this flag since <i>fix.bat msvc7</i> should do the same
+   thing and is the prefered way of doing this.
+<li>
+   COMPILER_ICL=1 (MSVC only)<br>
+   Instructs the build process to use the Intel commandline compiler icl rather
+   than Microsoft's commandline compiler cl. You don't normally need to pass 
+   this flag since <i>fix.bat icl</i> should do the same thing and is the 
+   prefered way of doing this. Do not try COMPILER_MSVC7=1 and COMPILER_ICL=1
+   at the same time.
 </ul>
 If you only want to recompile a specific test program or utility, you can 
 specify it as an argument to make, eg. "make demo" or "make grabber". The 


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