adding cs142 code
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user