Fall 2007 CSci 553 Lab 3

Exercise 3.1



Exercise 3.2

Your job is to write the makefile for this “project”. Note that you could compile this project with one line:


$ g++ main.cpp hello.cpp factorial.cpp –o hello


However, you are to create a Makefile that will avoid updating and recompiling up to date files. Here are specifications for the Makefile you are to write:


$ g++ -c main.cpp

$ g++ -c hello.cpp

$ g++ -c factorial.cpp

$ g++ -o hello main.o hello.o factorial.o