CXXFLAGS= -Wall -g -std=c++0x OBJECTS=main.o node.o polylist.o polyman.o EXE=main all: $(EXE) $(EXE): main.o $(CXX) $(CXXFLAGS) $(OBJECTS) -o $@ main.o: main.cpp node.o polylist.o polyman.o polylist.o: polylist.cpp polylist.h polyman.o: polyman.cpp polyman.h node.o: node.cpp node.h run: $(EXE) @./$(EXE) clean: @rm -vf *.o @rm -vf $(EXE) drun: $(EXE) gdb ./$(EXE) valgrind: $(EXE) valgrind --tool=memcheck --leak-check=yes ./$(EXE)