CC=g++
CFLAGS=-g -Wall
OBJS=Car.o Dealer.o Customer.o


# rule for building the executable
default: $(OBJS)
	$(CC) -o Customer $(OBJS)

# list of file dependencies
Customer.o: Car.h Dealer.h
Dealer.o:   Car.h Dealer.h
Car.o:      Car.h


# the following rule is used to compile .cpp files to .o
.cpp.o:
	$(CC) $(CFLAGS) -c $<


# the following removes all .o files, but leaves the executable
clean:
	rm -f *.o
