Skip to content

Commit 918107d

Browse files
committed
Add description to simple Makefile
1 parent 9acbc0a commit 918107d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ We can automate the step to compile and link above using `Makefile`.
7171
First we need to create new `Makefile` in the root directory
7272
with the following content:
7373

74+
# Add definition to generate math.o object file
7475
math.o: src/math.cc src/math.h
7576
c++ -c src/math.cc -o math.o
7677

78+
# Add definition to generate cmake-tutorial binary
7779
cmake-tutorial: math.o
7880
c++ src/main.cc math.o -o cmake-tutorial
7981

80-
build: cmake-tutorial
81-
8282
Now we can run:
8383

84-
make build
84+
make cmake-tutorial
8585

8686
to build `cmake-tutorial` binary. If there are no changes in
8787
`src/{main,math}.cc` and `src/math.h`, the subsequent command

0 commit comments

Comments
 (0)