Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.51 KB | None | 0 0
  1. ################################
  2. #
  3. #     Makefile Assegnamento 1 AA 2016/17
  4. #    
  5. ################################
  6.  
  7.  
  8. # file da consegnare
  9. FILE_DA_CONSEGNARE=drop.c myrand.c
  10.  
  11. # preferenze compilatore e flag di compilazione
  12. CC=gcc
  13. # compilazione senza attesa
  14. #CFLAGS= -Wall -pedantic -g
  15. # compilazione con attesa
  16. CFLAGS= -Wall -pedantic -g -DWAIT
  17.  
  18. obj = drop.o myrand.o
  19.  
  20. # phony targets
  21. .PHONY: cleanall test1 test2 test3 consegna docu
  22.  
  23.  
  24. drop1 : test_one.o $(obj)
  25.     gcc $(obj) test_one.o -o drop1 -lm
  26.  
  27. drop2 : test_two.o $(obj)
  28.     gcc $(obj) test_two.o -o drop2 -lm
  29.  
  30. drop3 : test_three.o $(obj)
  31.     gcc $(obj) test_three.o -o drop3 -lm
  32.  
  33.  
  34. myrand.o: myrand.c
  35. drop.o: drop.c
  36. test_one.o: test_one.c drop.h myrand.h
  37. test_two.o: test_two.c drop.h myrand.h
  38. test_three.o: test_three.c drop.h myrand.h
  39.  
  40.  
  41. cleanall:
  42.     -rm -f *.o *~ ./core drop1 drop2 drop3
  43.  
  44.  
  45. test1:
  46.     cp DATA/drop1.h drop.h
  47.     make cleanall
  48.     make drop1
  49.     ./drop1
  50.     @echo "********** Test1 superato!"
  51.  
  52. test2:
  53.     cp DATA/drop2.h drop.h
  54.     make cleanall
  55.     make drop2
  56.     ./drop2
  57.     @echo "********** Test2 superato!"
  58.  
  59. test3:
  60.     cp DATA/drop3.h drop.h
  61.     make cleanall
  62.     make drop3
  63.     ./drop3
  64.     @echo "********** Test3 superato!"
  65.  
  66.  
  67. consegna:
  68.     make cleanall
  69.     make test1
  70.     make test2
  71.     make test3
  72.     ./gruppo-check.pl < gruppo.txt
  73.     tar -cvf $(USER)-a1.tar ./gruppo.txt  $(FILE_DA_CONSEGNARE)
  74.     @echo "********** TAR creato inviare in allegato a una mail a \nsusanna.pelagatti@unipi.it insieme a nome, cognome,  numero di matricola dei componenti del gruppo"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement