# HG changeset patch # User Sam Lantinga # Date 1013622324 0 # Node ID 051b991765bae9740c05a195020bdbdb3626086c # Parent 72acb06d3721d1c51e8e5384d92c9968feadf147 David Snopek added Borland compiler support diff -r 72acb06d3721 -r 051b991765ba Borland.zip Binary file Borland.zip has changed diff -r 72acb06d3721 -r 051b991765ba BorlandC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BorlandC.html Wed Feb 13 17:45:24 2002 +0000 @@ -0,0 +1,68 @@ +Date: Sun, 13 Jan 2002 13:59:56 -0600 +From: David Snopek +To: slouken@devolution.com +Subject: Compiling SDL with Borland C++ + + +Building SDL with Borland C++ + + +

Building SDL with Borland C++

+ by David Snopek + +
+
+ +These instructions cover how to compile SDL and its included test programs using either +Borland C++ Builder 5 or the free Borland compiler.
+ +

Extract the files

+ +

Unzip the Borland.zip archive into this directory. Do not unzip it into any +other directory because the makefiles use relative paths to refer to the SDL sources. This +should create a directory named "Borland" inside of the top level SDL source directory. +

+ +

Using Borland C++ Builder 5

+ +

Inside of the "Borland" directory there is a "bcb5" directory that contains a number +of Builder project files. Double-click on the "libSDL.bpg" file icon. Once Builder has +started click on the "Projects" menu on the menu-bar and go down to +"Build All Projects" option. This will proceed to build SDL, SDLmain, and all +the test programs.

+ +

Using the free Borland compiler

+ +

The free Borland compiler can be downloaded at no charge from the +Borland website . Make sure that it is installed and properly configured.

+ +

Open an MS-DOS Prompt. Change to the "Borland\freebcc" directory under the +SDL source directory. Type "make -f SDL.mak" to build SDL and "make -f +SDLmain.mak". There are also makefiles for all of the test +programs, if you wish to build them.

+ +

Output files

+ +No matter which compiler you used, three important files should have been produced: + + + +Both of the *.lib files will need to be added to all the projects that use SDL and SDL.dll +must be placed some where the Windows dynamic linker can find it (either in your +project directory or on the system path, C:\WINDOWS\SYSTEM). + + +

Test programs

+
+ +Some of the test programs require included media files. Before trying to run any of the +test programs, copy these media files from the "tests/" directory into the build directory. + + + + + diff -r 72acb06d3721 -r 051b991765ba Makefile.am --- a/Makefile.am Tue Jan 22 21:14:36 2002 +0000 +++ b/Makefile.am Wed Feb 13 17:45:24 2002 +0000 @@ -34,6 +34,8 @@ README.Win32 \ README.WinCE \ README-SDL.txt \ + BorlandC.html \ + Borland.zip \ VisualC.html \ VisualC.zip \ MPWmake.sea.bin \ diff -r 72acb06d3721 -r 051b991765ba README.Win32 --- a/README.Win32 Tue Jan 22 21:14:36 2002 +0000 +++ b/README.Win32 Wed Feb 13 17:45:24 2002 +0000 @@ -4,7 +4,9 @@ ============================================================================== These instructions are for people using the GNU free compilers. -If you want to use Microsoft VC++ with SDL, read "VisualC.html" +If you want to use Microsoft VC++ with SDL, read "VisualC.html" or +if you want to use Borland C++ Builder or the free Borland compiler, +read "BorlandC.html". ============================================================================== I. Building the Simple DirectMedia Layer libraries: diff -r 72acb06d3721 -r 051b991765ba include/begin_code.h --- a/include/begin_code.h Tue Jan 22 21:14:36 2002 +0000 +++ b/include/begin_code.h Wed Feb 13 17:45:24 2002 +0000 @@ -41,7 +41,15 @@ # endif # else # ifdef WIN32 -# define DECLSPEC __declspec(dllexport) +# ifdef __BORLANDC__ +# ifdef BUILD_SDL +# define DECLSPEC __declspec(dllexport) +# else +# define DECLSPEC __declspec(dllimport) +# endif +# else +# define DECLSPEC __declspec(dllexport) +# endif # else # define DECLSPEC # endif @@ -78,7 +86,7 @@ #define SDL_INLINE_OKAY #else /* Add any special compiler-specific cases here */ -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__BORLANDC__) #define __inline__ __inline #define SDL_INLINE_OKAY #else diff -r 72acb06d3721 -r 051b991765ba src/video/SDL_stretch.c --- a/src/video/SDL_stretch.c Tue Jan 22 21:14:36 2002 +0000 +++ b/src/video/SDL_stretch.c Wed Feb 13 17:45:24 2002 +0000 @@ -39,8 +39,8 @@ into the general blitting mechanism. */ -#if (defined(WIN32) && !defined(_M_ALPHA) && !defined(_WIN32_WCE)) || \ - defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT) +#if (defined(WIN32) && !defined(__FREEBCC__) && !defined(_M_ALPHA) && !defined(_WIN32_WCE)) || \ + defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT) #define USE_ASM_STRETCH #endif