Guide to the CS107E Directory Structure

In this course, we will be using multiple git repositories to manage the required files for the labs and assignments. Our build system expects these repositories to be laid out in a specific directory structure. Failure to follow this structure will lead to headaches when trying to compile your code.

Top level directory

You should create a directory to hold all the files used during this course. We will call this cs107e_home. Note that the examples in this guide will have the prefix /Users/student, this prefix will be different depending on where you decide to create the cs107e_home directory.

$ pwd
$ mkdir cs107e_home
$ cd cs107e_home

Courseware Repository

The repository contains many important files, particularly the cs107e directory which includes the header files and compiled binaries that we will be using in course assignments and labs. It is crucial that this repository (and the cs107e subdirectory) be in the right location relative to your lab and assignment repositories, so that our build system can find the files it needs.

$ pwd
$ git clone
Cloning into ''...
$ ls

A particularly important subdirectory of the repository is cs107e. It contains the following subdirectories:

$ ls
etc    include    lib    src

Lab and Assignment Repositories

Cloning lab and assignment repositories should be done in the cs107e_home directory.

$ git clone
Cloning into 'lab1'...
$ ls lab1
$ git clone -b assign1[YOUR-GITHUB-USERNAME]-assignments assign1
$ ls
assign1    lab1


You should have a top-level directory called cs107e_home that contains all the files used in this course. This directory should contain a clone of the repository, as well as your lab and assignment repositories. Here is an overview of what your directory structure should look like:

├── assign1
├── assign2
├── ...
│   ├── ...
│   ├── cs107e
│   │   ├── etc
│   │   ├── include
│   │   ├── lib
│   │   └── src
│   └── ...
├── lab1
├── lab2
└── ...