The source files for flip are available in the tar file assign4.tar on ei.cs.vt.edu. The source files are:
flip.1 flip.c flip.h getopt.cCreate a directory of your own and copy all of these files there. Then create your makefile (name it ``Makefile'') in that directory.
The basic steps in compiling flip are:
gcc -DBSD -DNDEBUG -O -c flip.c gcc -DBSD -DNDEBUG -O -c getopt.c gcc -s -o flip flip.o getopt.oYour makefile should be written so that ``make flip'' carries out these commands. Each command above generates a separate derived file, and so should be placed in a separate directive.
In addition, your makefile should be written so that ``make man'' carries out the following commands:
nroff -man flip.1 > flip.manThe "flip.1" file is the source file for the command's man page. Nroff is a program that formats the text of the man page. The command shown above formats the man page into a human-readable form and places the output in the file "flip.man".
Finally, your makefile should be written so that when make is invoked with no target specified on the command line, it carries out both sets of commands listed above, bringing everything (both the program and its formatted man page) up to date.
In your makefile, use descriptive comments to clarify your intentions whereever necessary.
Also, remember that no late assignments are accepted.