Difference between revisions of "Compiling using GCC"

From OdaWiki
m (Cygwin)
Line 52: Line 52:
 
Once those ports are installed, you can simply untar or grab the latest source through subversion into its own directory, switch to the trunk subdirectory, and simply type '''gmake'''.  If you only want to compile the client or only compile the server, simply type '''gmake client''' or '''gmake server''' respectively.
 
Once those ports are installed, you can simply untar or grab the latest source through subversion into its own directory, switch to the trunk subdirectory, and simply type '''gmake'''.  If you only want to compile the client or only compile the server, simply type '''gmake client''' or '''gmake server''' respectively.
  
Odamex can be downloaded and built in cygwin!
+
== Windows ==
 +
 
 +
It is possible to compile Odamex with a makefile under Windows
  
 
== Cygwin ==
 
== Cygwin ==

Revision as of 18:33, 5 November 2006

Note: If you intend to build the client, you'll need the current version of SDL and SDL_mixer development libraries installed.

GNU/Linux

Get the source

You can either download a stable source package, or risk using the bleeding edge svn code.

Download

Download the latest source Untar the archive somewhere:

tar -xjf odamex_build.tar.bz2
cd odamex_build

SVN

Get a dev build using (must have subversion installed!):

svn co svn://odamex.net

Build

In the source directory, use the make command:

make

Binaries should appear in the bin dir after a successful compile: odamex, odasrv, odamaster

You can run "make server" or "make client" to only build the module you want:

make server
make client
make launcher

FreeBSD

To compile Odamex on FreeBSD, you must have the following ports installed, above and beyond the usual suspects:

In addition, if you want to compile the absolute latest cutting edge version of Odamex, you will also need:

Once those ports are installed, you can simply untar or grab the latest source through subversion into its own directory, switch to the trunk subdirectory, and simply type gmake. If you only want to compile the client or only compile the server, simply type gmake client or gmake server respectively.

Windows

It is possible to compile Odamex with a makefile under Windows

Cygwin

Screenshot of Odamex in Cygwin

Cygwin packages

You will first need to install the following Cygwin packages in addition to the default ones:

  • make
  • gcc
  • subversion (only if you intend to use svn within cygwin)

SDL patches

Odamex depends on SDL and SDL_mixer. You will need to download the current windows development libraries from the SDL site (VC6 development libraries work fine for this). You'll need to extract the libraries and edit SDL_LOCATION and SDL_MIXER_LOCATION in the Odamex Makefile to point there.

Unfortunately, SDL does not always play ball with cygwin's headers. The biggest offender has been a conflict between <SDL_config_minimal.h> and <stdint.h>. You may need to edit the following two lines in <SDL_config_minimal.h>:

  • typedef signed int int32_t;
  • typedef unsigned int uint32_t;

To read:

  • typedef signed long int int32_t;
  • typedef unsigned long int uint32_t;