For the earlier psets, no makefile is present yet make runs without problems. How?
If there's no Makefile in the same directory as the program that you're trying to compile, make uses its default configuration. In the appliance, make uses some environment variables to run the compilation command that you see on .c files. For more information about these variables, see Variables Used by Implicit Rules!
When run without a makefile, Make takes its cues from environment variables set in your shell (specifically, those loaded in (specifically, those loaded in
To get the same behavior from Make as it has in the CS50 Appliance, you can add the following to your
.zshrc, etc, if you're using a different shell):
export CC=clang export CFLAGS="-ggdb3 -O0 -std=c99 -Wall -Werror" export LDLIBS="-lcs50 -lm"
(Note that we're using
gcc, in CS50.)
See here for a description of what these flags mean.