0% found this document useful (0 votes)
175 views1 page

Make Assignment

The document provides instructions for 4 assignments involving the make utility in an operating system course. Students are asked to: 1) Create a makefile that stores output files in a subdirectory and defines a clean macro; 2) Pass a variable to make and conditionally use C or Java compilers; 3) Design a makefile to recursively call makefiles in subdirectories; and 4) Enhance #2 by adding #1's template in a subdirectory and using macros to select compilers.

Uploaded by

yogesh gond
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
175 views1 page

Make Assignment

The document provides instructions for 4 assignments involving the make utility in an operating system course. Students are asked to: 1) Create a makefile that stores output files in a subdirectory and defines a clean macro; 2) Pass a variable to make and conditionally use C or Java compilers; 3) Design a makefile to recursively call makefiles in subdirectories; and 4) Enhance #2 by adding #1's template in a subdirectory and using macros to select compilers.

Uploaded by

yogesh gond
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment #1

Operating System: make utility

1. Generate make file for template-example-1. Its output (*.o) files must be stored in subdirectory.
Define clean macro to clean the output file and directory.
2. While calling make, pass an argument USE_C with value 1 (“make USE_C=1”)
Test this variable using ifeq in your makefile.
Use c compiler or java compiler accordingly, to build the targets, depending on the condition
being true or false respectively.
Hint: Use template-example-1
3. The process in which a makefile calls other makefiles is called a recursive make. You are given
a parent folder with subdirectort, each containing base source C files You have to design a
makefile in the parent directory that recursively calls the individual makefiles of the
subdirectory. The makefiles in the subdirectories compile their respective code files and store
the output there only.
Hint: Use temple-example-2
4. Enhance the Q.No. 2 by adding Q.No.1 template-example-1 in subdirectory. You have to
design a makefile in the parent directory that recursively calls the individual makefiles of the
subdirectory. Use macros to decide C and C++ compiler.
Hint: Use temple-example-1 and temple-example-2

You might also like