# Makefile : generic # CS210 - S'04 # 1/15/04, Ray S. Babcock # # This Makefile is usable with a single .cpp file (not multiple files) # 1. Build a source file with a text editor (e.g. test.cpp) # 2. Run the make command on the file (e.g. $ make test) # (note you don't add the .cpp extension when you do the make) # 3. The test.cpp will be compiled and linked into a run image called test. # (if you did this with fred.cpp, you would do $ make fred and the # fred.cpp would be compiled into a run image called fred.) # To execute the run image, just type its name. (e.g. $ fred) # CC = g++ # Uncomment the next line to compile with debugging enabled. # CFLAGS = -g LDFLAGS = -lm .cpp: $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@