# # 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 = alphabet.o countalpha.o mergecounts.o all: $(executables) countalpha: countalpha.o alphabet.o mergecounts: mergecounts.o alphabet.o alphabet.o: alphabet.h alphabet.c countalpha.o: alphabet.h countalpha.c mergecounts.o: alphabet.h mergecounts.c PHONY: clean clean: rm -v $(executables) $(objs)