How do i create a makefile? The instructions are: 1) Build readline.o by compili
ID: 3818894 • Letter: H
Question
How do i create a makefile? The instructions are:
1) Build readline.o by compiling readline.c
2) Build dogs.o by compiling dogs.c
3) Build records.o by compiling records.c
4) Build records by linking readline.o, dogs.o, and records.o
Each rule should include the name of the target file, dependencies among files, and the command to be executed. The makefile should name the executable file for the program records.
How do I do this in the mac terminal application?
Best regards, will make sure to thumbs up answer.
Explanation / Answer
gcc -g -O -c readline.c
gcc -g -O -c dogs.c
gcc -g -O -c records.c
gcc -o records readline.o dogs.o records.o
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.