adding cs142 code

This commit is contained in:
dm
2016-04-06 20:45:34 -07:00
parent 552d456d53
commit 8e52ce1982
174 changed files with 14064 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
CXXFLAGS= -Wall -g
OBJECTS=main.o arena.o Factory.o archer.o fighter.o util.o cleric.o robot.o
EXE=main
all: $(EXE)
$(EXE): main.o
$(CXX) $(CXXFLAGS) $(OBJECTS) -o $@
main.o: main.cpp Factory.o arena.o fighter.o archer.o util.o cleric.o robot.o
Factory.o: Factory.cpp Factory.h
arena.o: arena.cpp arena.h
fighter.o: fighter.cpp fighter.h
archer.o: archer.cpp archer.h fighter.h
cleric.o: cleric.cpp cleric.h fighter.h
robot.o: robot.cpp robot.h fighter.h
util.o: util.cpp util.h
run: $(EXE)
@./$(EXE)
clean:
@rm -vf *.o
@rm -vf $(EXE)
debug: $(EXE)
gdb ./$(EXE)
valgrind: $(EXE)
valgrind --tool=memcheck --leak-check=yes ./$(EXE)