SimpleCheesyMakeFile

From StoneHome

Sorry - in that SlashDot article, I flubbed the address. I can't embed the makefile in the webpage: in makefiles, a tab is different than other whitespace, so cutting and pasting from a browser destroys them. The correct address is sc.tri-bit.com/outgoing/SimpleCheesyMakefile .

On the other hand, this gives me the chance to write out a few instructions.

To use this makefile, change the objects list to reflect the source files you want built, set the ProjectName to the desired output filename. If you need libraries, add them to the list; otherwise, empty the list, but do not remove it. Same for ASFLAGS, which is the list of flags passed to the assembler, and for LDFLAGS, which is the list of flags passed to the linker. However, for the -I argument where one lists include directories, if you don't want any, remove the flag. If you don't use GCC, change cc to the name of your compiler; your flags will be different than these. If you don't have sh, change SHELL to the name of your unix-style shell (cygwin and mingw provide this for windows, as do some C toolchains such as Borland's.)

When writing out the object list, make sure that dependencies are listed first (so, Dependencies.o may rely on TranslationUnit.o, but not the other way around.) A special command is set up for GCC which allows you to have this list generated for you automatically (make depend.) To remove all traces of a compile, make clean (with compilers other than GCC, the make clean list may need to be changed to reflect different extensions.)

Otherwise, to use this makefile, just type make.