school/cs235/lab04/Makefile
2016-04-06 20:46:10 -07:00

36 lines
575 B
Makefile

CXXFLAGS= -Wall -g -std=c++0x
OBJECTS=Factory.o expman.o pwnd.o ignoreme.a
EXE=main
all: pwnd.o $(EXE) test
$(EXE): $(OBJECTS)
$(CXX) $(CXXFLAGS) $(OBJECTS) -o $@
main.o: main.cpp Factory.o expman.o pwnd.o ignoreme.a
Factory.o: Factory.cpp Factory.h
expman.o: expman.cpp expman.h
pwnd.o: pwnd.c
test: test.cc expman.o
run: main
./main
rtest: test
./test
clean:
@rm -vf *.o
@rm -vf $(EXE)
@rm -vf *.1
@rm -vf *.0
@rm -vf test
@rm -rvf *.dSYM
drun: main
gdb ./main
debug: test
gdb ./test
valgrind: $(EXE)
valgrind --tool=memcheck --leak-check=yes ./$(EXE)