# # Simple(?) makefile for homework 8. # # Copy to the directory with your files for the assignment. # (CAUTION: use your browser's "save to file" or "download" feature # for this; if you just copy-and-paste the tab characters -- which for # this file matter -- will likely be turned in spaces, with bad results.) # # Produces executables called "countalpha" and "mergecounts" rather than # the default "a.out". # # Type "make" to make both executables. # # Type "make countalpha" or "make mergecounts" to make one or the other. # # Type "make clean" to remove all object and executable files created. # CFLAGS = -Wall -std=c99 CC = gcc executables = countalpha mergecounts objs = alphacounters.o countalpha.o mergecounts.o all: $(executables) countalpha: countalpha.o alphacounters.o mergecounts: mergecounts.o alphacounters.o countalpha.o: alphacounters.h countalpha.c mergecounts.o: alphacounters.h mergecounts.c alphacounters.o: alphacounters.h alphacounters.c PHONY: clean clean: rm -v $(executables) $(objs)