From a44e2cf079bf4f54068f25a0f1526c510582703c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lindi?= Date: Fri, 27 Sep 2024 13:35:46 +0200 Subject: [PATCH] Correct errors in exercise.md --- doc/exercise.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/exercise.md b/doc/exercise.md index 98ea0c8..dc5300a 100644 --- a/doc/exercise.md +++ b/doc/exercise.md @@ -77,7 +77,21 @@ the .PHONY statement, like this: .PHONY: clean all install CFLAGS=-I include ``` -- **Step 4**: Rerun `make` and observe how the build of the executable completes: + +- **Step 4**: Rerun `make` and observe how the build of `calculation.c` completes, but the build +of the executable fails due to missing of `module.o`: +`make: *** No rule to make target module.o, needed by calculation.exe. Stop.` +```sh +make +``` + +- **Step 5**: Edit the `makefile` again and replace `module.o` with `sin.o cos.o` as +dependencies for `calculatione.exe`. +```makefile +# The calculation.exe target in the Makefile +calculation.exe: calculation.o sin.o cos.o + $(CC) $(CFLAGS) $^ -o $@ +``` ```sh make ls