# first name a variable objects for all object files

objects = BinaryTree.o BinaryTreeTest.o

# name a variable sources for all source files

sources = BinaryTree.cpp BinaryTreeTest.cpp

# now give target with objects as variable dependencies + command line

BinaryTreeTest: $(objects) 
	g++ -o BinaryTreeTest.exe $(objects)

# list the dependencies for object files - those header files which help build objects

BinaryTree.o: Collection.h BinaryTree.h 
BinaryTreeTest.o: BinaryTree.h 

# how to build all object files from all dependent source files


$(objects): $(sources)
	g++ -c $(sources)

clean:
	rm $(objects)
