GP32 Compiling Multiple .c & .h From Different Folders


solarice

Member
Joined
Jan 29, 2004
Messages
120
Location
UK
Website
Visit site
Ok i posted yesterday that i was gonna have a shot at porting a sdl ported game, well after closer inspection it turns out, it isnt completly converted i.e bugs n stuff. So i thought what the hell i'll have a shot at converting the c code (probably a stupid idea, but we shall see).

My problem is here, the code is split into multiple folders and inside each folder is a .c & .h file with the .c referencing to the .h as youd expect. Outside these folders is a single .h file with a load of defines. But no reference to the other folders containg the .c files, so how do make devkitadv link everything together so i get a final complete compiled .fxe is it just a case of editing the makefile/build.bat or somthing completely different all together.

Hopefully you get what i mean. :)

Thanks in advance.
 
ok just letting you lot know....if you care that is :)

ive found the file that contains all info needed to make a make file, all the .c's used. Turns out it was an old turbo c++ file.

anyways im still i need of that answer tho, do i take all the .c files and just add them into the make file where you would normally only have the gpmain.c

e.g.

Normal Make File has this: gpmain.o: gpmain.c

So to include other .c files do i just do this: gpmain.o: gpmain.c gfx.c fx.c ....etc

or is it done differently.


Cheers in advance.
 
Back
Top