Skip to content

Commit

Permalink
Merge pull request #4 from coderefinery/blindij/exercise
Browse files Browse the repository at this point in the history
Correct errors in exercise.md
  • Loading branch information
blindij authored Sep 27, 2024
2 parents 331225a + a44e2cf commit 8165741
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion doc/exercise.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8165741

Please sign in to comment.