Makefile - The main linking rule $(EXEC $(OFILES g-o $(EXEC...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
# The user needs to assign these for their project EXEC=poker # The included dependency file contains all the incremental compilation info, # however we use the implicit rule for making each one which is (simplified): # g++ $(CXXFLAGS) -c -o Foo.o # Thus we place our compiler flags into this default variable CXXFLAGS=-Wall # Create all the needed .o file names from the .cc files OFILES=$(
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: # The main linking rule $(EXEC): $(OFILES) g++ -o $(EXEC) $(OFILES) # Clean not only cleans up object files, but also recreates the dependency file clean: rm -f *~ rm -f *.o rm -f $(EXEC) g++ $(CCFILES) -MM > $(EXEC).d # Always include the dependency file unless we run the clean command, # which will make it even if it does not exist ifneq ($(MAKECMDGOALS), clean) include $(EXEC).d endif...
View Full Document

This note was uploaded on 04/19/2008 for the course CS 265 taught by Professor Daniele.stevenson during the Spring '08 term at Wisc Eau Claire.

Ask a homework question - tutors are online