Guest User

Untitled

a guest
Jan 20th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. CC = gcc
  2. FILES = workfile.c insert.c
  3. TARGETS = exe
  4. CFLAGS = -o
  5. DBUG =
  6. RM = rm -f
  7. OBJS = *.o
  8.  
  9. #Master Rule
  10.  
  11. all: $(TARGETS)
  12.  
  13. #Build
  14.  
  15. exe: workfile.o insert.o
  16. $(CC) $(CFLAGS) $(DBUG) workfile.o insert.o exe
  17.  
  18. #workfile
  19.  
  20. workfile.o: workfile.c
  21. $(CC) $(DBUG) -c *.c
  22.  
  23. insert.o: insert.c
  24. $(CC) $(DBUG) -c *.c
  25.  
  26. clean:
  27. $(RM) $(TARGETS) $(OBJS)
  28.  
  29. $make all
  30. gcc -c *.c
  31. gcc -o workfile.o insert.o exe
  32. gcc: error: exe: No such file or directory
  33. make: *** [exe] Error 1
  34.  
  35. exe: workfile.o insert.o
  36. $(CC) $(CFLAGS) $(DBUG) workfile.o insert.o exe
  37.  
  38. exe: workfile.o insert.o
  39. $(CC) $(CFLAGS) $(DBUG) -o exe workfile.o insert.o
  40.  
  41. CC = gcc
  42. FILES = workfile.c insert.c
  43. TARGETS = exe
  44. CFLAGS =
  45. DBUG =
  46. RM = rm -f
  47. OBJS = *.o
  48.  
  49. #Master Rule
  50.  
  51. all: $(TARGETS)
  52.  
  53. #Build
  54.  
  55. exe: workfile.o insert.o
  56. $(CC) $(CFLAGS) $(DBUG) -o exe workfile.o insert.o
  57.  
  58. #workfile
  59.  
  60. workfile.o: workfile.c
  61. $(CC) $(DBUG) -o workfile.o -c workfile.c
  62.  
  63. insert.o: insert.c
  64. $(CC) $(DBUG) -o insert.o -c insert.c
  65.  
  66. clean:
  67. $(RM) $(TARGETS) $(OBJS)
  68.  
  69. CFLAGS = -Wall -Wextra -Werror
  70.  
  71. exe: workfile.o insert.o
  72. $(CC) $(CFLAGS) $(DBUG) workfile.o insert.o -o exe
  73.  
  74. CFLAGS =
  75. OUTFILE = fancy_exe
  76. [...]
  77. $(CC) $(CFLAGS) $(DBUG) workfile.o insert.o -o $(OUTFILE)
Add Comment
Please, Sign In to add comment