lab1 done
This commit is contained in:
parent
8b87ead3b9
commit
4eedfb85f5
56 changed files with 316 additions and 71 deletions
|
|
@ -21,20 +21,30 @@ PROGS=ub leak bounds bounds-heap dangling sum
|
|||
ALL: $(PROGS)
|
||||
|
||||
leak: leak.cc
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $<
|
||||
|
||||
dangling: dangling.cc
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $<
|
||||
|
||||
bounds: bounds.cc
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $<
|
||||
|
||||
ub: ub.cc
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $<
|
||||
|
||||
sum: sum.cc
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $<
|
||||
|
||||
# Targets
|
||||
# Phony targets
|
||||
.PHONY: all clean test
|
||||
|
||||
# Standard clean
|
||||
clean:
|
||||
-rm $(PROGS)
|
||||
-rm -r $(addsuffix .dSYM, $(PROGS))
|
||||
-rm -f $(PROGS)
|
||||
-rm -rf $(addsuffix .dSYM, $(PROGS))
|
||||
|
||||
test: $(PROGS)
|
||||
@echo "Running tests with Valgrind..."
|
||||
@for prog in $(PROGS); do \
|
||||
echo "Testing $$prog with Valgrind:"; \
|
||||
valgrind ./$$prog; \
|
||||
echo ""; \
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue