~charles/cdaniels.net

bc2d2c53e00a6b93ecfb9e12d58fe8ed08aa1b02 — Charles Daniels 7 months ago 3bcec3c
Explicitly generate output files with gcc -o

Thanks James!
1 files changed, 3 insertions(+), 2 deletions(-)

M src/2017-07-15-guide-to-make.md
M src/2017-07-15-guide-to-make.md => src/2017-07-15-guide-to-make.md +3 -2
@@ 189,10 189,10 @@ helloprog: main.o module.o
	gcc -o helloprog main.o module.o

main.o: module.o main.c main.h
	gcc -c main.c main.h
	gcc -o main.o -c main.c main.h

module.o: module.c module.h
	gcc -c module.c module.h
	gcc -o module.o -c module.c module.h

clean:
	-rm module.o


@@ 544,3 544,4 @@ features and benefits of Make, with a few key differences:
* 2018-03-06 - Added "Further Reading" Section.
* 2019-11-25 - Update section headers to new style.
* 2020-01-18 - Fix some minor formatting errors.
* 2020-02-25 - Use `gcc -o` to set output file names explicitly (thanks James!)