in an sh file feels and seems sloppy, so i would really like to be able to find out how it is placed in a makefile. Thanks for your help so far jimparis ^^
The makefile shown IS the proper way to do it. You just need to figure out what the error is... probably a whitespace problem. Make doesn't like leading spaces - only leading tabs are allowed. Look for any lines that start with one or more spaces and replace them with tabs.
Came back to it later and and solved it after reading more about creating makefiles and playing around. I think that the problem was that the makefiles suggested were in reverse. Here is the working copy which includes am extra spe program. Thanks for the help :)
The rule order doesn't actually if the Makefile expresses all of the dependencies correctly. Yours is almost correct, but you forgot to list spu_example.c as a dependency of spu_example. Similarly for spu_example2.
Ah, yeah should have wrote the dependancies. It still compiled without them though. Is including the source files as dependencies just to make it easier for the human programmer?
Including all dependencies is done so that "make" works correctly. As you noticed, without proper dependencies, it can fail if (for example) the rules are in a different order.