OBJECTS = point.o main.o rect.o

all: defaultconstruct

point.cpp: point.h
rect.cpp: rect.h point.h

%.o: %.cpp
	g++ -Wall -c $<

defaultconstruct: $(OBJECTS) 
	g++ $(OBJECTS) -o defaultconstruct

clean:
	rm -f defaultconstruct *.o

rebuild: clean defaultconstruct
