David Snopek added Borland compiler support
authorSam Lantinga <slouken@libsdl.org>
Wed, 13 Feb 2002 17:45:24 +0000
changeset 274051b991765ba
parent 273 72acb06d3721
child 275 53fc686e9428
David Snopek added Borland compiler support
Borland.zip
BorlandC.html
Makefile.am
README.Win32
include/begin_code.h
src/video/SDL_stretch.c
     1.1 Binary file Borland.zip has changed
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/BorlandC.html	Wed Feb 13 17:45:24 2002 +0000
     2.3 @@ -0,0 +1,68 @@
     2.4 +Date: Sun, 13 Jan 2002 13:59:56 -0600
     2.5 +From: David Snopek <xevol@newtonave.net>
     2.6 +To: slouken@devolution.com
     2.7 +Subject: Compiling SDL with Borland C++
     2.8 +
     2.9 +<html>
    2.10 +<title>Building SDL with Borland C++ </title>
    2.11 +<body>
    2.12 +
    2.13 +<h1>Building SDL with Borland C++ </h1>
    2.14 +<b> by <a href=mailto:xevol@users.sourceforge.net> David Snopek </a> </b> 
    2.15 +
    2.16 +<br>
    2.17 +<br>
    2.18 +
    2.19 +These instructions cover how to compile SDL and its included test programs using either 
    2.20 +Borland C++ Builder 5 or the free Borland compiler. <br>
    2.21 +
    2.22 +<h3> <b> Extract the files </b> </h3>
    2.23 +
    2.24 +<p> Unzip the Borland.zip archive into <b>this</b> directory.  Do not unzip it into any 
    2.25 +other directory because the makefiles use relative paths to refer to the SDL sources.  This 
    2.26 +should create a directory named "Borland" inside of the top level SDL source directory. 
    2.27 +</p>
    2.28 +
    2.29 +<h3> <b> Using Borland C++ Builder 5 </b> </h3>
    2.30 +
    2.31 +<p> Inside of the "Borland" directory there is a "bcb5" directory that contains a number 
    2.32 +of Builder project files.  Double-click on the "libSDL.bpg" file icon.  Once Builder has 
    2.33 +started click on the "<u>P</u>rojects" menu on the menu-bar and go down to 
    2.34 +"B<u>u</u>ild All Projects" option.  This will proceed to build SDL, SDLmain, and all 
    2.35 +the <a href="#tests">test programs</a>. </p>
    2.36 +
    2.37 +<h3> <b> Using the free Borland compiler </b> </h3>
    2.38 +
    2.39 +<p> The free Borland compiler can be downloaded at no charge from <a href="http://www.borland.com/bcppbuilder/freecompiler/"> the 
    2.40 +Borland website </a>.  Make sure that it is installed and properly configured. </p>
    2.41 +
    2.42 +<p> Open an MS-DOS Prompt.  Change to the "Borland\freebcc" directory under the 
    2.43 +SDL source directory.  Type "make -f SDL.mak" to build SDL and "make -f 
    2.44 +SDLmain.mak".  There are also makefiles for all of the <a href="#tests">test 
    2.45 +programs</a>, if you wish to build them. </p>
    2.46 +
    2.47 +<h3> <b> Output files </b> </h3>
    2.48 +
    2.49 +No matter which compiler you used, three important files should have been produced:
    2.50 + 
    2.51 +<UL>
    2.52 +	<LI> SDL.dll </LI>
    2.53 +	<LI> SDL.lib </LI>
    2.54 +	<LI> SDLmain.lib </LI>
    2.55 +</UL>
    2.56 +
    2.57 +Both of the *.lib files will need to be added to all the projects that use SDL and SDL.dll 
    2.58 +must be placed some where the Windows dynamic linker can find it (either in your 
    2.59 +project directory or on the system path, C:\WINDOWS\SYSTEM).
    2.60 +
    2.61 +<a name="tests">
    2.62 +<h3> <b> Test programs </b> </h3>
    2.63 +</a>
    2.64 +
    2.65 +Some of the test programs require included media files.  Before trying to run any of the 
    2.66 +test programs, copy these media files from the "tests/" directory into the build directory.
    2.67 +
    2.68 +</body>
    2.69 +</html>
    2.70 +
    2.71 +
     3.1 --- a/Makefile.am	Tue Jan 22 21:14:36 2002 +0000
     3.2 +++ b/Makefile.am	Wed Feb 13 17:45:24 2002 +0000
     3.3 @@ -34,6 +34,8 @@
     3.4  	README.Win32	\
     3.5  	README.WinCE	\
     3.6  	README-SDL.txt	\
     3.7 +	BorlandC.html	\
     3.8 +	Borland.zip	\
     3.9          VisualC.html	\
    3.10          VisualC.zip	\
    3.11          MPWmake.sea.bin	\
     4.1 --- a/README.Win32	Tue Jan 22 21:14:36 2002 +0000
     4.2 +++ b/README.Win32	Wed Feb 13 17:45:24 2002 +0000
     4.3 @@ -4,7 +4,9 @@
     4.4  ==============================================================================
     4.5  
     4.6  These instructions are for people using the GNU free compilers.
     4.7 -If you want to use Microsoft VC++ with SDL, read "VisualC.html"
     4.8 +If you want to use Microsoft VC++ with SDL, read "VisualC.html" or 
     4.9 +if you want to use Borland C++ Builder or the free Borland compiler,
    4.10 +read "BorlandC.html".
    4.11  
    4.12  ==============================================================================
    4.13  I.  Building the Simple DirectMedia Layer libraries:
     5.1 --- a/include/begin_code.h	Tue Jan 22 21:14:36 2002 +0000
     5.2 +++ b/include/begin_code.h	Wed Feb 13 17:45:24 2002 +0000
     5.3 @@ -41,7 +41,15 @@
     5.4  #  endif
     5.5  # else
     5.6  # ifdef WIN32
     5.7 -#  define DECLSPEC	__declspec(dllexport)
     5.8 +#  ifdef __BORLANDC__
     5.9 +#   ifdef BUILD_SDL
    5.10 +#    define DECLSPEC __declspec(dllexport)
    5.11 +#   else
    5.12 +#    define DECLSPEC __declspec(dllimport)
    5.13 +#   endif
    5.14 +#  else
    5.15 +#   define DECLSPEC	__declspec(dllexport)
    5.16 +#  endif
    5.17  # else
    5.18  #  define DECLSPEC
    5.19  # endif
    5.20 @@ -78,7 +86,7 @@
    5.21  #define SDL_INLINE_OKAY
    5.22  #else
    5.23  /* Add any special compiler-specific cases here */
    5.24 -#if defined(_MSC_VER)
    5.25 +#if defined(_MSC_VER) || defined(__BORLANDC__)
    5.26  #define __inline__	__inline
    5.27  #define SDL_INLINE_OKAY
    5.28  #else
     6.1 --- a/src/video/SDL_stretch.c	Tue Jan 22 21:14:36 2002 +0000
     6.2 +++ b/src/video/SDL_stretch.c	Wed Feb 13 17:45:24 2002 +0000
     6.3 @@ -39,8 +39,8 @@
     6.4     into the general blitting mechanism.
     6.5  */
     6.6  
     6.7 -#if (defined(WIN32) && !defined(_M_ALPHA) && !defined(_WIN32_WCE)) || \
     6.8 -    defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
     6.9 +#if (defined(WIN32) && !defined(__FREEBCC__) && !defined(_M_ALPHA) && !defined(_WIN32_WCE)) || \
    6.10 +    defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT) 
    6.11  #define USE_ASM_STRETCH
    6.12  #endif
    6.13