makefile 304 B

1234567891011121314151617181920
  1. ifeq ($(GPP),)
  2. GPP=g++
  3. endif
  4. ifneq ($(c11),off)
  5. CXXFLAG=-std=c++11
  6. endif
  7. SRC=$(wildcard *.cpp)
  8. TAR=$(basename $(SRC))
  9. %:%.cpp
  10. $(GPP) -o $@ -g $< -Wall -Wextra -I ../.. ${CXXFLAG}
  11. @echo ============ run $@ ================
  12. @./$@
  13. @-rm $@
  14. @-rm -rf $@.dSYM
  15. tar:$(TAR)
  16. @echo -------test done-------