Sign in to follow this  
3DModelerMan

Extensible build system?

Recommended Posts

I'm trying to decide what to use as a build system. I really like premake and cmake, but as far as I know they can't be extended to add platforms easily. I'm pretty sure that writing a build system myself is going to take way too long. Does anyone know of a build system that can be scripted to extend functionality and add new platforms?

Share this post


Link to post
Share on other sites

Actually both premake and CMake are quite extensible to different platforms.  The difficult bit is supporting new IDE's which is generally a large undertaking and probably something you would not be doing.  If you take a look at http://www.gamedev.net/page/resources/_/technical/general-programming/cross-platform-test-driven-development-environment-using-cmake-part-1-r2986 it walks through targeting linux, osx and windows.  When I get part 4 up I'll have added ios targets also.

 

Anyway, both premake and cmake are script driven and you can override the compilers, flags given to the compilers etc.  So, they seem to fit the bill, unless I'm missing something in what you want to do with them.

Share this post


Link to post
Share on other sites

So if I have an SDK for a platform that uses an existing IDE then it should work fine? For example if I need to support a platform that uses Visual Studio IDE but a different compiler.

Share this post


Link to post
Share on other sites

So if I have an SDK for a platform that uses an existing IDE then it should work fine? For example if I need to support a platform that uses Visual Studio IDE but a different compiler.

You will have to do a bit of customization to change the compiler/sdk references for the target but it works fine.  I've used Visual Studio and CMake to target XBox 360 and Android native in the past and other than a bit of work up front, it was no big deal.  Of course remember you are "cross compiling" so all the detection work CMake does for you is out the door, you need to override just about everything.  (About 20 variables to update, though really only about 5-10 since most build off of others.)  I cover using Xcode as a cross compiler for iPhone targets in part four of the linked article series.  I suppose I could have included support for Android but I don't have any Android devices right now so it would be completely untested.

Share this post


Link to post
Share on other sites

Thanks for the help. I started reading your articles and I really like them. They're some of the most useful ones I've read in a while. If you need help testing for Android I've got 3 android devices and an Eclipse Android environment setup on Windows and Ubuntu.

Share this post


Link to post
Share on other sites

Glad you like the articles.  I still feel they need some cleanup but figure they hit the important points well enough right now.  If you can't tell though, I'm a bit of a perfectionist in such things, I feel build environments are so under rated as an important bit in making games that it was well worth four articles.  I'm sure I could pack in even more but I think that will get spread out over the next couple planned items.  The one thing which may end up as a part 5 though is integration with a continuous build system, probably Hudson, since they really help as you work.  I.e. once I'm working in Xcode, I don't like jumping over to Windows every 15-20 minutes to make sure I didn't screw something up there.  Switching environments is a pain once key combo's and such have kicked in on muscle memory, i.e. command-c versus ctrl-c is a real pain since one is pinky and forefinger and the other is thumb and forefinger.  May sound trivial but when switching back and forth that one is a constant source of hassle.  Anyway, yes, even for me by my lonesome, I prefer having all the infrastructure I would have in a full team.  :)

 

As to the Android stuff, I might hit you up on that.  I remember it not being too difficult to setup, I just have to do it blindly without any Android devices.  I have an iPhone though, so that was testable for me.  For the future though, I'm going to stick to SFML based future articles since it takes care of all the non-trivial but nitpicky stuff and I can get to the meat of the matter I want to cover.  I'm not sure what the status of iPhone and Android are with SFML, I remember different efforts going on to port it though.

Share this post


Link to post
Share on other sites

I'll keep checking back in case you need the help with android. You could also use the android emulator.

Oh, if I do it, I'll poke you with the direct messenger.  :)  I may write a general request for folks to test it in general programming but I'd probably ask you to double check things for me initially.  I hate posting completely broken stuff first time, a little private testing is always good. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this