\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[a4paper, margin=0.75in]{geometry}

% set up hyperlink coloring
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,
    urlcolor=cyan
}

\setlength{\parindent}{0pt} % no indentation

% checkbox list: https://tex.stackexchange.com/questions/247681/how-to-create-checkbox-todo-list
\usepackage{enumitem,amssymb}
\newlist{boxlist}{itemize}{2}
\setlist[boxlist]{label=$\square$}

% code support: listings and fancy verbatim
\usepackage{listings}
\lstset{basicstyle=\ttfamily\footnotesize}
\usepackage{fancyvrb}

\renewcommand{\familydefault}{\sfdefault} % default to sans serif

\usepackage{xcolor}
\newcommand{\code}[1]{\colorbox{lightgray}{\texttt{#1}}}
\newcommand{\sh}[1]{\code{\$ #1}}

\usepackage{graphicx}

%%%%%%%%%%%%%%%%

\begin{document}

\title{Advanced 7\\Build systems}
\author{EECS 201 Fall 2020}
\date{}
\maketitle

\section*{Submission Instructions}
This assignment will be submitted as a repository on the \href{https://gitlab.umich.edu}{UMich GitLab server}.
Create a Project on it with the name/path \code{eecs201-adv7} and add \code{brng} as a Reporter.
The repository should have the following directory structure, starting from the repository's root:
\begin{lstlisting}
/
|-- report.txt
|-- Makefile
|-- CMakeLists.txt
\end{lstlisting}

\section*{Preface}
First, initialize a new Git repository and set up its remote appropriately.
This repository will simply be used as a mechanism to submit a few files for this assignment.

In this assignment you'll be provided yet another zipped archive containing some starter files.
\begin{lstlisting}[language=bash]
$ wget https://www.eecs.umich.edu/courses/eecs201/files/assignments/adv7.tar.gz
\end{lstlisting}

\texttt{These starter files are not to be submitted in your repository.
They just serve as baseline data for you to work with.}


\section{A more featured Makefile (7)}
In this part you'll be writing a more featured Makefile that extends some behavior
of Makefiles written in the basic assignment, now with the addition of an object
code and a linking step.
\begin{itemize}
  \item This Makefile is meant to sit inside of \code{example-project}.
  \item All source code files will be in the \code{src/} directory
  \item Additional header files for the include path will be in the
        \code{inc/} directory.
        You will need to figure out how to add this directory to the include path
        for your compilation steps.
  \item \code{example-project} is only an example provided to you. When graded, there
        may be different source code files and subdirectories within the
        \code{inc/} and \code{src/} directories.
  \item This Makefile should produce object code under a \code{obj/} directory and mimic
        the source code's directory structure. For example, \code{src/sourcelib/coolthing.cpp}
        would have its corresponding object code file at \code{obj/sourcelib/coolthing.o}.
        This Makefile should handle creation of this directory. \code{mkdir -p} can help out with this
        (check out the manpage!).
  \item This Makefile should have and use a \code{CXX} variable set to \code{g++} for the compiler.
  \item This Makefile should have and use a \code{BIN} variable set to \code{app} for the output executable.
  \item This Makefile should have target dependencies set up so that individual object code targets
        can be run and the output executable target can be run to trigger the building of all dependencies.
  \item This Makefile should have a \textbf{phony} \code{all} target that builds the output executable.
        This target should have any necessary dependencies.
  \item This Makefile should have a \textbf{phony} \code{run} target that runs the output executable.
        This target should have any necessary dependencies i.e. \code{make run} from a clean
        state should not error out and should build the output executable before running it.
  \item This Makefile should have a \textbf{phony} \code{clean} target that deletes the \code{obj/} directory and
        the output executable.
\end{itemize}
When you're done, add and commit your Makefile to the submission repo.


\section{Using another build system (3)}
In lecture we alluded to the existence of other build systems.
CMake is another tool that helps generate data needed for other build systems Make.
Look up how to work with CMake and create a \code{CMakeLists.txt} file that
can handle projects with the directory structure of \code{example-project}.
The requirements will be much more lax for this part: this \code{CMakeLists.txt}
file just needs to build an output application called \code{app}.

Add and commit your Makefile to the submission repo.


\section{Conclusion}
\begin{enumerate}
  \item Commit your Makefile and/or your \code{CMakeLists.txt} file(s) to your submission repo.
  \item Create a file called \code{report.txt}.
  \item On the first line provide an integer time in minutes of how long it took
        for you to complete this assignment.
  \item On the second line and beyond, write down what you learned while doing this assignment.
        If you already knew how to do all of this, put down ``N/A''.
  \item Add and commit this \code{report.txt} file. Push your repo.
\end{enumerate}

\end{document}
