Skip to main content
gamedev.net
🔒 Locked

makefiles

Started by icecubeflower Dec 7, 2008 at 1:54 PM 3 replies 600+ views
Original Post
icecubeflower
icecubeflower
Anyone got a link to a good place to learn about makefiles, the make command, macros, and all that? Tutorials? Something that assumes you've only used g++ blah.cpp -o blah -lSDL -lSDL_image from the command line all your life and you've never used a makefile ever.
gfxnomad
gfxnomad
I would strongly recommend that you forgo traditional *nix style makefiles. Once you start writing makefiles, you'll want to start writing configuration scripts, and before you know it you'll be in autotools hell. Instead I suggest you learn something like CMake (actually I recommend CMake itself). I find that this greatly simplifies the task of configuring and making my code across a variety of different platforms (both *nix and not). CMake is a makefile generator. You basically write a file from which the CMake tool will generate the appropriate makefile for the underlying platform. I've also heard good things about SCons (a Python based make system), but I've never used it myself. Anyway, I suggest you try one of these other tools instead, and save yourself from the headache of a autoconf/make system.

Cheers,
Rob
Wolfdog
Wolfdog
Not off the top of my head, but google.
rip-off
rip-off
Scons is very nice, and the samples are relatively easy to follow.
Scourage
Scourage
Bjam and it's cousins (jam, jam++, etc) are alternatives.

Cheers,

Bob

[size="3"]Halfway down the trail to Hell...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.