Makefile 405 B

1234567891011121314151617181920212223242526
  1. CC = gcc
  2. CFLAGS = -p -Wall
  3. COPT = -O0
  4. SRCS = main.c
  5. all: main
  6. LOG_DIR=./logs
  7. LOG_PLT=$(LOG_DIR)/*.plot
  8. LOG_CMP=$(LOG_DIR)/*.ps
  9. main: $(SRCS) Makefile
  10. $(CC) $(CFLAGS) $(COPT) -o $@ $<
  11. cmp:
  12. gnuplot $(LOG_DIR)/*.plot
  13. find $(LOG_DIR) -name *.ps -exec ps2pdf {} {}.pdf \;
  14. cmpl:
  15. find $(LOG_DIR) -name *.pdf -exec evince {} \;
  16. cmpc:
  17. rm -rf $(LOG_DIR)
  18. clean: cmpc
  19. rm -f *~ *.o *.exe *.s *.out main