[SDL] General Organizational and Makefile Resource
j_post at pacbell.net
Tue Sep 16 19:17:00 PDT 2003
On Tuesday 16 September 2003 03:17 pm, Arlo J wrote:
> Anyways, there's tons of great SDL info out there, but after downloading
> some of the more advanced demos and games I've noticed how quickly it's
> gotten complicated with the makefile and multiple sources, etc...
> Does anybody know a good site that teaches about this kind of topic? I
> guess it's more of a C/C++ style/function type of thing.. how to organize
> and break up code, link it all together with a makefile, etc.
Dunno about sites, but some books you might want to take a look at:
1) Mastering Make
Clovis Tondo, Andrew Nathanson, Eden Yount
Prentice Hall ISBN 0-13-121906-5
2) GNU Autoconf, Automake, and Libtool
Vaughn, Elliston, Tromey, and Taylor
New Riders ISBN 1-57870-190-2
As for organizing code, that's largely a matter of taste. There are some who
believe that each function or class should have its own file, and at the
other extreme some put everything in one large file. IMHO, a file should
contain *logically related* functions, and modules should consist of
logically related files. For example, all your code that interfaces with SDL
should be in a module separate from your application or game code, and the
SDL interface module should consist of one or more files containing code
grouped by functionality.
Think of the way you would organize subdirectories into logically related
groups, each of which would also contain subdirectories, and so on.
But that's just my opinion, I could be wrong ;-)
More information about the SDL