You are on page 1of 1

Operating System Lab

Week 1 Assignment

Part 1: 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

Note: You have to submit Makefile for each question separately.

Part 2: xv6 installation


1. Write your xv-6 installation experience.
2. Write about the xv6 operating system.
3. Write about the ‘qemu’.

You might also like