Guest User

Untitled

a guest
Jan 11th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. desktop:~/eg_make_creation$ ls
  2. factorial.c functions.h hello hello.c main.c Makefile
  3.  
  4. # I am a comment, and I want to say that the variable CC will be
  5. # the compiler to use.
  6. CC=gcc
  7. # Hwy!, I am comment no.2. I want to say that CFLAGS will be the
  8. #options I'll pass to the compiler
  9. CFLAGS=-c -Wall
  10.  
  11. all:hello
  12.  
  13. hello:main.o factorial.o hello.o
  14. $(CC) main.o factorial.o hello.o -o hello
  15.  
  16. main.o:main.c
  17. $(CC) $(CFLAGS) main.c
  18.  
  19. factorial.o:factorial.c
  20. $(CC) $(CFLAGS) factorial.c
  21.  
  22. hello.o:hello.c
  23. $(CC) $(CFLAGS) hello.c
  24.  
  25. clean:
  26. rm -rf *o hello
  27.  
  28. desktop:~/eg_make_creation$ make all
  29. make: Nothing to be done for `all'.
  30.  
  31. all:
  32. <t>$(CC) $(CFLAGS) ...
  33.  
  34. all:
  35. $(CC) $(CFLAGS) ...
Add Comment
Please, Sign In to add comment