General Organizational and Makefile Resource

Yuck, what an ugly title…! :slight_smile:

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.

Just FYI, I’m actually compiling for the GP32 handheld as somebody ported the SDL sources to the GCC that was ported to compile GP32 (ARM) code…

Thanks!

Arlo

— Arlo J wrote:

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.

I would love to see some educational resources on this topic, too.
Technical code organization is about as far from my strong point as is
possible.

                                                         NBarnes__________________________________

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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 :wink:

JeffOn 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

     Another good place to look for documentation on those tools is at 

the GNU site - http://www.gnu.org/manual/manual.html . There are manuals
for make, autoconf, automake and libtool there. Best of all, they’re free.

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.

     I agree, it's mostly a question of style in the end (just like 

writing), but generally most people choose some kind of logical grouping.
Point is, something that’s logical to them at least ^_-.

     Paulo

Nice. Except their website appears to be broken. Some manuals won’t download
:-(On Tuesday 16 September 2003 08:19 pm, Paulo V W Radtke wrote:

     Another good place to look for documentation on those tools is at

the GNU site - http://www.gnu.org/manual/manual.html . There are manuals
for make, autoconf, automake and libtool there. Best of all, they’re free.

     Another good place to look for documentation on those tools is at

the GNU site - http://www.gnu.org/manual/manual.html . There are manuals
for make, autoconf, automake and libtool there. Best of all, they’re free.

Nice. Except their website appears to be broken. Some manuals won’t download
:frowning:

I had some problems when I tried to open the files directly on Windows. On Linux, I saved the file on disk so that I could later extrct it myself, and it worked (the make document). They also mention that on the main documentation page (yep, just before the docs). Anyway, the documentation is also available online for reading, formatted as HTML.

Paulo

I am using Linux. Some files just won’t begin the download. The
binutils.html.gz file I did save to disk was corrupted (gunzip says it’s not
a valid format).

JeffOn Wednesday 17 September 2003 08:38 am, pvwr at sympatico.ca wrote:

I had some problems when I tried to open the files directly on Windows.
On Linux, I saved the file on disk

El mar, 16-09-2003 a las 23:16, j_post escribi?:> 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

The (2) is available online in
http://sources.redhat.com/autobook/
or in PDF
http://wisirc.tuxfamily.org/pub/docs/outils/autobook/autobook.pdf

Cool, thanks guys!

Arlo

?Another good place to look for documentation on those tools is at
the GNU site - http://www.gnu.org/manual/manual.html . There are manuals
for make, autoconf, automake and libtool there. Best of all, they’re free.

I had some problems when I tried to open the files directly on
Windows. On Linux, I saved the file on disk

I am using Linux. Some files just won’t begin the download. The
binutils.html.gz file I did save to disk was corrupted (gunzip says it’s
not a valid format).

For others who’ve had similar problems, I thought I’d pass along this info.
The html.gz files on the GNU site aren’t really gzipped files (at least
Konqueror doesn’t think they are). They’re html files. When saving, I changed
the extension from .html.gz to .html, and then I can view them just fine. But
there is something goofy about these files, because Konqueror’s progress bar
shows no progress until the entire file has been downloaded (hence I
thought it hadn’t begun). Maybe this is a “feature” of Konqueror.

JeffOn Wednesday 17 September 2003 09:04 am, j_post wrote:

On Wednesday 17 September 2003 08:38 am, pvwr at sympatico.ca wrote:

Another good place to look for documentation on those tools is at
the GNU site - http://www.gnu.org/manual/manual.html . There are manuals
for make, autoconf, automake and libtool there. Best of all, they’re
free.

I had some problems when I tried to open the files directly on
Windows. On Linux, I saved the file on disk

I am using Linux. Some files just won’t begin the download. The
binutils.html.gz file I did save to disk was corrupted (gunzip says it’s
not a valid format).

For others who’ve had similar problems, I thought I’d pass along this info.
The html.gz files on the GNU site aren’t really gzipped files (at least
Konqueror doesn’t think they are). They’re html files. When saving, I
changed the extension from .html.gz to .html, and then I can view them just
fine. But there is something goofy about these files, because Konqueror’s
progress bar shows no progress until the entire file has been downloaded
(hence I thought it hadn’t begun). Maybe this is a “feature” of Konqueror.

Jeff

It says right at the top of http://www.gnu.org/manual/manual.html
"Certain browsers are known to automatically decompress .gz files, such as
those provided here, without properly renaming them. If you try to decompress
a .gz file, and receive an error that the file is not in GZip format, try
viewing the file as if it were already decompressed."

:slight_smile:

-Sean RidenourOn Wednesday 17 September 2003 12:16 pm, j_post wrote:

On Wednesday 17 September 2003 09:04 am, j_post wrote:

On Wednesday 17 September 2003 08:38 am, pvwr at sympatico.ca wrote:

— j_post <j_post at pacbell.net> wrote:> On Wednesday 17 September 2003 09:04 am, j_post wrote:

?Another good place to look for documentation on
those tools is at

the GNU site -
http://www.gnu.org/manual/manual.html . There are
manuals

for make, autoconf, automake and libtool there.
Best of all, they’re free.

On Wednesday 17 September 2003 08:38 am, pvwr at sympatico.ca wrote:

I had some problems when I tried to open the
files directly on

Windows. On Linux, I saved the file on disk

I am using Linux. Some files just won’t begin the
download. The
binutils.html.gz file I did save to disk was
corrupted (gunzip says it’s
not a valid format).

For others who’ve had similar problems, I thought
I’d pass along this info.
The html.gz files on the GNU site aren’t really
gzipped files (at least
Konqueror doesn’t think they are). They’re html
files. When saving, I changed
the extension from .html.gz to .html, and then I can
view them just fine. But
there is something goofy about these files, because
Konqueror’s progress bar
shows no progress until the entire file has been
downloaded (hence I
thought it hadn’t begun). Maybe this is a "feature"
of Konqueror.

Jeff

The other guy mentioned the gz
auto-unziping-without-rename feature, I’ll tackle the
progress bar:

It could be that the server isn’t sending a
Content-Length header, and hence Konqueror dosn’t know
how big the file is, and hence dosn’t know what
percentage of the file it’s downloaded.

This would occur if the server is compressing the
file(s) on the fly, and hence dosn’t know beforehand
what the size of the file is, and hence can’t return
the filesize itself!


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Thanks very much for the explanation. It was a mystery to me :slight_smile:
JeffOn Wednesday 17 September 2003 03:35 pm, Michael Rickert wrote:

It could be that the server isn’t sending a
Content-Length header, and hence Konqueror dosn’t know
how big the file is, and hence dosn’t know what
percentage of the file it’s downloaded.

It could be that the server isn’t sending a
Content-Length header, and hence Konqueror dosn’t
know
how big the file is, and hence dosn’t know what
percentage of the file it’s downloaded.

Thanks very much for the explanation. It was a
mystery to me :slight_smile:
Jeff

No problem :). I learned a lot about HTTP when I was
going to create my own server for it :).__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software