Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Setting up a build system for a finished project

This thread is locked; no one can reply to it. rss feed Print
Setting up a build system for a finished project
killer_b
Member #15,458
January 2014

Hey guys, I apologize if this topic is in the wrong section of the forums, but let me know and I'll be happy to redirect my questions.

I am in the final stages of creating a game with Allegro 5.0.11. I have been searching through the packages released by other people that have created games using Allegro, and it looks like the easiest and most portable way to set up a build system is by using GNU autotools (autoconf, automake, libtools).

I am working through as many sources as I can trying to learn more about these autotools and how they could help in this process, but the information is too detailed in some cases and lacking information in other areas.

Is there anyone else that has prepared their project for distribution this way? If so, are there any pointers or resources that you could send my way?

I can write very basic makefiles, but checking that the end user has the allegro libraries and dumb and all of the other dependencies is beyond my knowledge.

My game is near completion and I would like to share it with the allegro community to be criticized, commented on, played, etc... Any help at all on the build process would be greatly appreciated.

pkrcel
Member #14,001
February 2012

I don't really get the hang of the question.

As I understood, you would like to release a SOURCE package that others should be able to build independently (e.g. without distributing the libriaries yourself)?

But just to know something more, WHAT build system are you unign right now? Do you work in an IDE?

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Allegro Development forum is for developing allegro......

Now that's out of the way -

cmake seems to be a popular option these days. autotools seemed too daunting for me to ever try it. I need to come up with a build system too. Another option is the premake build system, which is fairly simple and only requires you to install lua.

killer_b
Member #15,458
January 2014

pkrcel-
I am developing the game on a linux system and compiling with gcc. What I meant to say was that I would like to release a tarball (game-1.0.tar.gz) with all source included so that the user would just have to unpack and run something like:

#SelectExpand
1configure 2make 3sudo make install

and the game would be ready to play.

Since I am developing on linux, as of now that is the only OS that will be able to play the game. I am certain after a small amount of research and a few small adjustments I can port to Windows.

Edgar-
Thank you for the suggestions! I will look into cmake and premake and see if either makes more sense than using autotools.

pkrcel
Member #14,001
February 2012

Okay that was more or less what I had in mind after reading the OP.

And in my first post was right about to suggest you looking into CMAKE, I am no expert and barely scratched the surface of it, but seems a solid choice, well documented, quite supported, easily maintanable.

It's also more portable than autotools, in my view.

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

SiegeLord
Member #7,827
October 2006
avatar

pkrcel said:

quite supported, easily maintanable

I wouldn't go that far.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

pkrcel
Member #14,001
February 2012

Well okay, I may have been overly optimistic :P

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

kazzmir
Member #1,786
December 2001
avatar

Theres also http://scons.org

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

kazzmir
Member #1,786
December 2001
avatar

SCons has native support for gcc so you don't have to do anything to get it to work with mingw.

Build configurations are also a simple affair. You set up environments that control how the build takes place, i.e. which targets are built and what commands build them.

env = Environment()
env['CXX'] = 'clang++'
build_with(env)

env2 = Environment()
env['CXX'] = 'g++'
build_with(env2)

Thats pretty simplified but you get the idea. Actually scons is a bit hard to deal with. Its a lot like a complex framework so you have to learn the idiosyncracies of the framework to use it properly. CMake tends to be easier for 'simple' projects because it has more machinery out of the box, but scons is much more extensible because it uses a real language (python).

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: