TEXT   71

makefile

Guest on 10th July 2022 05:59:11 AM

  1. SUBDIRS = 0-mono 1-fgetc 2-read 3-inline 4-class 5-virtualFn
  2.  
  3. .SILENT:
  4.  
  5.  
  6. subdirs: clean
  7.         for dir in $(SUBDIRS); do \
  8.            $(MAKE) -C $$dir; \
  9.         done
  10.  
  11. run:
  12.         echo 'built-in wc'
  13.         bash -c 'time wc long.txt; echo'
  14.         bash -c 'echo 0-mono; time 0-mono/wc long.txt; echo'
  15.         bash -c 'echo 1-fgetc; time 1-fgetc/wc long.txt; echo'
  16.         bash -c 'echo 2-read; time 2-read/wc long.txt; echo'
  17.         bash -c 'echo 3-inline; time 3-inline/wc long.txt; echo'
  18.         bash -c 'echo 4-class; time 4-class/wc long.txt; echo'
  19.         bash -c 'echo 5-virtualFn; time 5-virtualFn/wc long.txt; echo'
  20.  
  21. clean:
  22.         /bin/rm -f *.o  *~
  23.         for dir in $(SUBDIRS); do \
  24.            $(MAKE) -C $$dir clean; \
  25.         done

Raw Paste


Login or Register to edit or fork this paste. It's free.