I want to have my unit test built along with my project every time I run make. I tried to do this with the following code in my Makefile:
DEPS = Parallel.cpp Resistor.cpp Series.cpp Source.cpp
TEST = Parallel.cpp Resistor.cpp Series.cpp Test.cpp
resistor: $(DEPS)
g++ -std=c++11 -o resistor $(DEPS) -I. -g
test: $(TEST)
g++ -std=c++11 -o test $(TEST) -I. -g
Yet when I look at the directory I only see ./resistor and not ./test.... BTW any advice for improving my makefile in other ways is welcome.
Aucun commentaire:
Enregistrer un commentaire