Question: Write a Makefile that builds the program tee from a C file tee.c . Your Makefile should use the compiler flags discussed in class, and
Write a Makefile that builds the program tee from a C file tee.c Your Makefile should
use the compiler flags discussed in class, and have the all and clean targets as shown
previously. You should also include the flag Wextra as discussed in the lab. Note that
running tee our program is different from tee the one you used previously
Fixing tee points
An implementation of the program tee.c is available at
studentcmptsummerstarterleteec This program resembles the pro
gram tee that you have used in Lab exercise except that this program has a particular
liking to the letters cmp and t The program likes to capitalize those letters when
ever it finds them. Do not change this. Moreover, there is a number of logical and syntactic
errors in this program using the appropriate compiler options in your Makefile will reveal
some of the syntactic errors Your task is to find and fix all errors. There are errors in
total. Some errors will be easy to fix gcc will point you to the errors and some will require
you to read the comments in the code, consult the man pages regarding the C functions you
are not familiar with, and use gdb
Do not get overwhelmed by the code. The errors are all related to things you have already
used and have been discussed in class. The man pages might talk about things you dont
understand yet. Ignore those parts. Just make sure that the logic of the program is consistent
with what it is trying to do according to the comments and your knowledge of the real tee
Once all errors are fixed, make sure to properly test the program. The following tests must
pass:
echo all of stdin back onto stdout after EOF ctrl D is encountered on stdin,
echo all of stdin to zero or more files given as commandline arguments,
work correctly for inputs greater than characters do not change the values of
MIN ALLOC SIZE and MIN READ SIZE and
capitalize the letters cmp and t
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
