# This is a Makefile. Make sure it has that name. # The first rule in a Makefile is the default. So, by default, # this Makefile builds both prime and count_xs. You can write # `make prime` or `make count_xs` on the command line to make # just one all: ttest # This line says that `ttest` depends on `ttest.o` and `basestats.o`, # and then how to build the target (ttest) from the dependencies ttest: ttest.o basestats.o gcc -lm -o ttest ttest.o basestats.o # Other rules are similar. # Note that the name of this rule is used in a dependency above and that it is also the name of a file. # Match is important ttest.o: ttest.c ttest.h basestats.h gcc -lm -c ttest.c basestats.o: basestats.c basestats.h gcc -lm -c basestats.c # Very common in Makefiles, gets rid of intermediate files (and emacs temp files) clean: rm *.o *~