# Makefile
# CSE 333 Lecture 11 complex_example code

CXX = g++
CPPFLAGS = -Wall -g -std=c++11
PROGS = testcomplex

# default target attempts to build all executables
all: $(PROGS)

testcomplex: testcomplex.o Complex.o
	$(CXX) $(CPPFLAGS) -o $@ $^

testcomplex.o: testcomplex.cc Complex.h
	$(CXX) $(CPPFLAGS) -c $<

Complex.o: Complex.cc Complex.h
	$(CXX) $(CPPFLAGS) -c $<

# phony target - remove generated files and backups
clean:
	rm -rf *.o *~ *.dSYM $(PROGS)