Sample makefile for the Employee Class Example

# define some aliases

progs=program main.o employee.o
CC=xlC
LIBS=


# There are 5 things we can 'make'

all: $(progs)

main: main.C employee.h 
	$(CC) -c -o main.o main.cpp $(LIBS)

employee: employee.cpp employee.h 
	$(CC) -c -o employee.o employee.cpp $(LIBS)

program: main.o employee.o
	$(CC) -o program main.o employee.o $(LIBS)

clean:
	rm $(progs)



Back to Outline