Advanced - Make: Build Systems Fall 2026
- Submission Instructions
- Preface
- A more featured Makefile (7)
- Using another build system (3)
- Conclusion
Submission Instructions
This homework will be submitted as a repository on the EECS GitLab
server. The repository you submit will be a private Project with
the name/path eecs201-adv-make with akamil added as a Reporter. The branch build
will be the one that is checked.
To finish the submission process and get your submission score, you will need to run the autograder. You will need to SSH into the course server (see Basic - Intro):
local$ ssh uniqname@peritia.eecs.umich.edu
(the local$
referring to a shell prompt on your system)
and then run eecs201-test:
peritia$ eecs201-test adv-make
(the peritia$
referring to a shell prompt on the server)
The repository should have the following directory structure, starting from the repository’s root:
/
|-- report.txt
|-- Makefile
|-- CMakeLists.txt
Presentation/Checkoff
In addition to submitting this assignment, you will need to attend a lab session after the deadline to discuss your work with the course staff. Refer to the course schedule for the window for doing so for this assignment.
As part of the discussion, be prepared to do the following:
-
Explain your approach for the assignment. What documentation did you read, and how did you find it? What did you try that didn’t work, and what was your process for figuring out how to fix it?
-
Summarize what you learned from the assignment.
-
Discuss how you plan on implementing the tools in this assignment and what you learned in your future projects.
-
Apply your approach for solving the problems in this assignment to a new problem that you have not seen before.
I suggest keeping these in mind while doing the assignment, and writing down your thoughts so that you can review them before the checkoff.
Your overall score for the assignment will be a combination of your submission score and the presentation/checkoff score. Refer to the syllabus for the details.
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.
https://www.eecs.umich.edu/courses/eecs201/fa2026/files/assignments/adv-make.tar.gz
These starter files are not to be submitted in your repository. They just serve as baseline data for you to work with.
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.
-
This Makefile is meant to sit inside of
example-projectwhen run. Keep in mind the repo is mainly for gathering files for submission, and how you test the Makefile can be independent from how you submit it. -
All source code files will be in the
src/directory -
Additional header files for the include path will be in the
inc/directory. You will need to figure out how to add this directory to the include path for your compilation steps. -
example-projectis only an example provided to you. When graded, there may be different source code files and subdirectories within theinc/andsrc/directories. -
This Makefile should produce object code under a
obj/directory and mimic the source code’s directory structure. For example,src/sourcelib/coolthing.cppwould have its corresponding object code file atobj/sourcelib/coolthing.o. This Makefile should handle creation of this directory.mkdir -pcan help out with this (check out the manpage!). There’s also a neat Makefile function to get the directory part of a path ;) Note that when you do some pattern matching or substitution reference, that we can change the text e.g.%.cand%.o: note that we specify.con one side and.oon the other. What if you added more non-matching text, such as say, a directory? -
This Makefile should have and use a
CXXvariable set tog++for the compiler. -
This Makefile should have and use a
BINvariable set toappfor the output executable. -
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.
-
This Makefile should have an
apptarget that builds the output executable. This target should have any necessary dependencies. -
This Makefile should have a phony
alltarget that builds the output executable. This target should have any necessary dependencies. -
This Makefile should have a phony
runtarget that runs the output executable. This target should have any necessary dependencies i.e.make runfrom a clean state should not error out and should build the output executable before running it. -
This Makefile should have a phony
cleantarget that deletes theobj/directory and the output executable.
When you’re done, add and commit your Makefile to the submission repo.
Using another build system (3)
In the material 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 single
CMakeLists.txt file
that can handle the
example-project. The
requirements will be much more lax for this part: this
CMakeLists.txt file
just needs to build an output application called
app. (In reality,
multiple
CMakeLists.txt is a
common way of handling more complicated directory structures like this.)
-
Make sure not to require an extremely new version of CMake: 3.0 should suffice. You probably aren’t using the latest and greatest features of the latest version of CMake. The course server’s (and many build servers’ you might encounter) version probably isn’t going to be the absolute latest release.
-
Like in part 1, the
CMakeLists.txtis meant to sit inside ofexample-projectwhen run. -
Don’t run
cmake .inside the same directory as theCMakeLists.txtfile: instead, create abuilddirectory,cdinto it, then runcmake ..: this will keep all the build files in a nice, tidy space, and won’t overwrite yourMakefilefrom the previous section.
Add and commit your
CMakeLists.txt to the
submission repo.
Conclusion
-
Commit your Makefile and/or your
CMakeLists.txtfile(s) to your submission repo. -
Create a file called
report.txt. -
On the first line provide an integer time in minutes of how long it took for you to complete this assignment.
-
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”.
-
Add and commit this
report.txtfile. Push your commits to a branch calledbuild. -
As this is a GitLab assignment, remember the autograder is available!