# first name a variable objects for all object files

objects = LinkedList.o PostfixEvaluator.o

# name a variable sources for all source files

sources = LinkedList.cpp PostfixEvaluator.cpp

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

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

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

LinkedList.o: Collection.h LinkedList.h Stack.h
PostfixEvaluator.o: LinkedList.h 

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


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

clean:
	rm $(objects)
