Unix Systems Programming: Lab 3 - stat, file I/O, libraries & make



Due:           Wednesday, April 25, 2012 @ 5:00 pm

Purpose and Rationale

The purpose of this lab is to allow students to become comfortable with Unix file I/O operations, make and makefiles, and building libraries.

Resources

FAQ (submission instructions and other useful stuff)

If you are not in our course email list, please subscribe to the cspp51081 email list here:
        http://mailman.cs.uchicago.edu/mailman/listinfo/cspp51081

Lecture 3 is the primary source for this lab.

All work should be done on a machine in the department's Linux cluster. You can refer to ssh for more information on how to log into a remote machine.

Marks Distribution

Exercise 1 13 points
Exercise 2 13 points
Exercise 3 14 points
TOTAL 40 points

LAB 3

Deliverables

Carefully follow the steps below.

    1. Use svn update to bring your svn repository to the latest version and navigate to the lab3 directory.

    2. Please create subdirectories ex1, ex2, and ex3, and place each exercise's materials in its respective directory as described below:

      • Directory ex1 will include at least three files.
        • Source code files: You may organize your files anyway you like.
        • Makefile: it must build your executable named mystat when we type make on the command line.
        • README : This file must include the correct command line syntax (including the available option in you do the bonus), a brief explanation of your command (including the extra functionality if you do the bonus) and the transcript of one example of your command in the default mode (if you are doing the bonus option, submit a second example showing your option at work.)

      • Directory ex2 will include at least three files.
        • Source code files: You may organize your files anyway you like.
        • Makefile: it must build your executable name filecopy when we type make on the command line.
        • README : This file must include the correct command line syntax of filecopy and a brief explanation of what it does. There is no need to send a transcript of it in action.

      • Directory ex3 will include eight files.
        • Source code files : main.c, hello.c, bye.c, here.c, mylib.h
        • Two Make files, which will build an executable called : main
             Makefile1 : for building static library
             Makefile2 : for building shared library
        • README : it will contain two lines, the exact command line argument to build an executable called main
             make -f Makefile1 target
             make -f Makefile2 target

    3. When you are finished with your assignment, you should commit it to the repository using the following commands:
             svn add *
             svn commit -m "Submitting Lab 3"
    4. Your submissions will be collected from the repository on Wednesday, April 25th at 5 PM

    Tatiana Orlova