Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is the LINUX question 1. Three students are working on the same project, and each of them contributes a C file with the name

This is the LINUX question

1. Three students are working on the same project, and each of them contributes a C file with the name foo*.c (foo1.c, foo2.c, foo3.c). The main function is included in the file prod.c, which uses functions defined in all the foo*.c files. The goal here is to build an object for each of the foo*.c files, with the name obtained by replacing the extension c by o, and to build the final executable called prod.out. Write a simple Makefile such that one just need to type make in the terminal to build the objects and the executable.

Here are sample examples.

image text in transcribed

image text in transcribed

compile gcc -c filel.c lib: gcc -c file2.c mv file2.o libfile2.a link: gcc filel.o -L. -lfile2 clean: make compile make lib make link ./a.out make clean link: 1ib compile gcc filel.c -L. -lfile2 lib: gcc -c file2.c mv file2.o libfile2.a compile: gcc -c filel.c clean: make . /a.out make clean

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 Tsukuba Japan April 2010 Proceedings Part 1 Lncs 5981

Authors: Hiroyuki Kitagawa ,Yoshiharu Ishikawa ,Wenjie Li ,Chiemi Watanabe

2010th Edition

3642120253, 978-3642120251

More Books

Students also viewed these Databases questions

Question

1. What are the peculiarities of viruses ?

Answered: 1 week ago

Question

Describe the menstrual cycle in a woman.

Answered: 1 week ago