# Configure compiler settings
CXX=clang++
CXXFLAGS=-g
# The object files for the crypto program.
OFILES = 
# UnitTest++ keeps its object files in this directory.
UNITTEST_DIR = "/home/zpalmer/software/cs35-unittest-cpp"
UNITTEST_OFILES = "unittest-cpp/CMakeFiles/UnitTest++.dir/UnitTest++/"

# This prevents Make from deleting our object files after they are built.  This
# isn't necessary, but it helps to avoid rebuilding code that didn't change.
.PRECIOUS: %.o

# This target builds your tests.
tests: unittest-cpp tests.o $(OFILES)
	$(CXX) $(CXXFLAGS) -o $@ tests.o $(OFILES) $(UNITTEST_OFILES)/*.o $(UNITTEST_OFILES)/Posix/*.o

# This target describes how to compile a .o file from a .cpp file.
%.o: %.cpp
	$(CXX) $(CXXFLAGS) -c -o $@ $<

# Ensures the creation of a symlink to point to the unit test tools.
unittest-cpp:
	ln -s "$(UNITTEST_DIR)" unittest-cpp

# This target deletes the temporary files we have built.
.PHONY: clean
clean:
	rm -f *.o
	rm -f ./tests
	rm -f unittest-cpp
