From 54375bff529801c1bee6f1330cea39e18a32e298 Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Sun, 10 Nov 2024 21:46:06 -0700 Subject: [PATCH] vault backup: 2024-11-10 21:46:06 --- .../software development/ECE1400/Chapter 15 Exercises.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/education/software development/ECE1400/Chapter 15 Exercises.md b/education/software development/ECE1400/Chapter 15 Exercises.md index 0d56933..90c787c 100644 --- a/education/software development/ECE1400/Chapter 15 Exercises.md +++ b/education/software development/ECE1400/Chapter 15 Exercises.md @@ -59,7 +59,8 @@ main.o: main.c f1.h f1.o: f1.c f1.h gcc -c f1.c -f2.o +f2.o: f1.o f2.c f2.h + gcc -c f2.c f1.o ``` --- @@ -67,8 +68,12 @@ f2.o > **6.** The following questions refer to the program described in Exercise 5. > (a). Which files need to be compiled when the program is built for the first time? +`f1.c`, `f1.h`, `f2.c`, `f2.h`, `main.c`, `main.h` + > (b). If `f1.c` is changed after the program has been built, which files need to be recompiled? +All dependents of `f1.c` and `f1.c`, in this case `f1.c`, `main.c`, and `f2.c` (including header files). + > (c). If `f1.h` is changed after the program has been built, which files need to be recompiled? > (d). If `f2.h` is changed after the program has been built, which files need to be recompiled?