Once you have the Makefile created with names of your own source file(s) (eg. drawLine.c), simply type 'make' in your shell prompt, it should do the compilation (eg. call gcc, CC, cc, etc.) for you.
Saying 'make clean' will remove (rm) the executables so you can start a clean 'make' the next time around.
The 'make' system essentially automates the compilation process so that you don't have to manually create .o files (intermediates) and link them together into a binary.
In 'real' CG production (and in a variety of other industries, including telecom etc.) makefiles are still widely used, so it is good for you to know how to create and use them.. We're not forcing you to use makefiles just to torture you :)
# makefile to compile your program CC = <name of your compiler - e.g. g++> # note that in the following, the $(CC) is preceded by a TAB, **not** spaces all: $(CC) <name of .cc or .cpp file> -o <name of executable - e.g. drawline> $(CC) <name of second file> -lm -o <name of executable> # again, the 'rm' needs to have a TAB before it, not spaces clean: rm -rf *o *~ <name of executables separated by space>
Here is a simple tutorial on makefiles, if you want more details.