[AD] Fwd: A few fixes to Al-CVS-2005/05/07

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


Oh gawd!!!! :-( Let's hope this makes it..

instructions: gunzip the grabber.gz, rename the fix.txt to fix.bat, makefile.vc is fine ... then apply the docu update given below in Allegro._tx ...

Ok.. add in the makefile targets section...

<li>
   COMPILER_ICL=1 (MSVC, using Intel compiler)<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.
<li>
   TARGET_ARCH_EXCL=[opts] (MSVC, using Intel compiler)<br>
   This option allows you to optimize exclusively for a given architecture.
   Pass 5 to optimize for all Pentium processors, 6 to optimize for PentiumPro,
   Pentium 2 and Pentium 3 only, 7 for Pentium 4 only (Default).
   Example: set TARGET_ARCH_EXCL=5
<li>
   TARGET_ARCH_DISPATCH=[opts] (MSVC, using Intel compiler)<br>
   This option allows you to specify processor specific dispatch of functions.
   Default uses PN to enable dispatch for Pentium 4 with SSE3 (P) Pentium 4 and
   compatible processors only (N).
   Example: set TARGET_ARCH_EXCL=KW will enable dispatch for Pentium 3 (K) and
   Pentium 4 compatible processors (W).
<li>
   ICL_IPO=1 (MSVC, using Intel compiler)<br>
   Used to enable Interprocedural optimization (IPO) while compilation. IPO is
   available for profiling and release builds only. It instructs the build process
   to use <i>xilink</i> as the linker. You don't normally need to pass
   this flag when using <i>fix.bat icl --iclipo</i>.

---------- Forwarded message ----------
From: guilt <karthikkumar@xxxxxxxxxx>
Date: May 16, 2005 11:06 AM
Subject: A few fixes to Al-CVS-2005/05/07
To: Allegro Developers <alleg-developers@xxxxxxxxxxxxxxxxxxxxx>

I managed to add Interprocedural optimization support for Intel C++.. I am also giving a much cleaner, more configurable makefile.vc ... I am also providing a new fix.bat (the fix.txt file) and some documentation for the same (allegro._tx) .. I can't make a diff however (because i can't direct cvs to sourceforge) .... if someone can make a diff, please do.

Also provided is a grabber.c which currently uses vsprintf (but in the future must use vsnprintf, when we find a way to do it for MSVC6/7)

Well.. lemme provide a .tar.gz file.. let's hope sf accepts it..


--
Karthik
http://guilt.bafsoft.net



--
Karthik
http://guilt.bafsoft.net
This has to be patched against the 2005/05/07 CVS version..

Changes:

fix.bat to add IPO options for icl/MSVC
makefile.vc cleaned/added substantially to support IPO, ARCH, DISPATCH options for ICL
added docu for the same in Allegro._tx
fixed grabber and converted all vsnprintfs to vsprintfs .. have to be convert when we find a 
way to add that support for MSVC* platform
@echo off

rem Sets up the Allegro package for building with the specified compiler,
rem and if possible converting text files from LF to CR/LF format.

rem Test if there are too many args.
if [%5] == []        goto arg4
goto help

:arg4
rem Test if fourth arg is ok.
if [%4] == [--quick]     goto arg3
if [%4] == [--msvcpaths] goto arg3
if [%4] == [--iclipo]    goto arg3
if [%4] == []            goto arg3
goto help

:arg3
rem Test if third arg is ok.
if [%3] == [--quick]     goto arg2
if [%3] == [--msvcpaths] goto arg2
if [%3] == [--iclipo]    goto arg2
if [%3] == []            goto arg2
goto help

:arg2
rem Test if second arg is ok.
if [%2] == [--quick]     goto arg1
if [%2] == [--msvcpaths] goto arg1
if [%2] == [--iclipo]    goto arg1
if [%2] == []            goto arg1
goto help

:arg1
rem Test if first arg is ok.
if [%1] == [bcc32]   goto head
if [%1] == [djgpp]   goto head
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


:head
rem Generate header of makefile and alplatf.h,
rem then go to platform specific function.
echo # generated by fix.bat > makefile
echo /* generated by fix.bat */ > include\allegro\platform\alplatf.h

if [%1] == [bcc32]   goto bcc32
if [%1] == [djgpp]   goto djgpp
if [%1] == [mingw32] goto mingw32
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
goto help

:bcc32
echo Configuring Allegro for Windows/BCC32...
echo MAKEFILE_INC = makefile.bcc >> makefile
echo #define ALLEGRO_BCC32 >> include\allegro\platform\alplatf.h
goto tail

:djgpp
echo Configuring Allegro for DOS/djgpp...
echo MAKEFILE_INC = makefile.dj >> makefile
echo #define ALLEGRO_DJGPP >> include\allegro\platform\alplatf.h
goto tail

:mingw32
echo Configuring Allegro for Windows/Mingw32...
echo MAKEFILE_INC = makefile.mgw >> makefile
echo #define ALLEGRO_MINGW32 >> include\allegro\platform\alplatf.h
goto tail

:icl
echo Configuring Allegro for Windows/ICL...
echo COMPILER_ICL = 1 >> makefile
if [%4] == [--iclipo] echo ICL_IPO = 1 >> makefile
if [%3] == [--iclipo] echo ICL_IPO = 1 >> makefile
if [%2] == [--iclipo] echo ICL_IPO = 1 >> makefile
goto msvccommon

:msvc7
echo Configuring Allegro for Windows/MSVC7...
echo COMPILER_MSVC7 = 1 >> makefile
goto msvccommon

:msvc6
echo Configuring Allegro for Windows/MSVC6...
goto msvccommon

:msvccommon
echo MAKEFILE_INC = makefile.vc >> makefile
echo #define ALLEGRO_MSVC >> include\allegro\platform\alplatf.h
goto tail

:watcom
echo Configuring Allegro for DOS/Watcom...
echo MAKEFILE_INC = makefile.wat >> makefile
echo #define ALLEGRO_WATCOM >> include\allegro\platform\alplatf.h
goto tail

:help
echo.
echo Usage: fix platform [--quick] [--msvcpaths] [--iclipo]
echo.
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.
echo Use the --msvcpaths parameter if your MSVCDir variable contains 
echo spaces (you can view content of that variable by typing 
echo.
echo   echo %%MSVCDir%%
echo. 
echo on the command line). Remember that this will only work if you
echo have MinGW gcc in your PATH.
echo.
echo The --iclipo parameter is only applicable for the icl platform, 
echo and is used to enable Interprocedural optimization (IPO). 
echo.
goto end

:convertmsvcdir
echo Converting MSVCDir path...
gcc -s -o msvchelp.exe misc/msvchelp.c
msvchelp MSVCDir
del msvchelp.exe
echo include makefile.helper >> makefile
goto realtail

:tail
if [%4] == [--msvcpaths] goto convertmsvcdir
if [%3] == [--msvcpaths] goto convertmsvcdir
if [%2] == [--msvcpaths] goto convertmsvcdir

:realtail
rem Generate last line of makefile and optionally convert CR/LF.
echo include makefile.all >> makefile

if [%4] == [--quick] goto done
if [%3] == [--quick] goto done
if [%2] == [--quick] goto done
if [%1] == [bcc32]   goto done
if [%1] == [mingw32] goto done
if [%1] == [msvc]    goto done
if [%1] == [msvc7]   goto done

echo Converting Allegro files to DOS CR/LF format...
utod .../*.bat .../*.sh .../*.c *.cfg .../*.h .../*.inc .../*.rc
utod .../*.rh .../*.inl .../*.s .../*.txt .../*._tx makefile.*

:done
echo Done!

:end

Attachment: makefile.vc
Description: Binary data

Attachment: grabber.gz
Description: GNU Zip compressed data



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