Makefile 372 B

12345678910111213141516171819
  1. # super simple makefile
  2. # call it using 'make NAME=name_of_code_file_without_extension'
  3. # (assumes a .cpp extension)
  4. NAME = snake
  5. #
  6. # Add $(MAC_OPT) to the compile line for Mac OSX.
  7. MAC_OPT = "-I/opt/X11/include"
  8. all:
  9. @echo "Compiling..."
  10. g++ -o $(NAME) $(NAME).cc -L/opt/X11/lib -lX11 -lstdc++ $(MAC_OPT)
  11. run: all
  12. @echo "Running..."
  13. ./$(NAME)
  14. clean:
  15. rm ./snake