# Makefile for cbook/15-Text-Files/programs # Created by the ExportAll facility # *************************************************************** PROGRAMS = \ showfile \ copyfile \ ucfile \ xcomment \ linecopy \ elements # *************************************************************** # Parameters to control Makefile operation CSINCDIR = $$HOME/cslib/standard CSLIBDIR = $$HOME/cslib/standard CC = gcc CFLAGS = -g -I. -I$(CSINCDIR) LIBRARIES = $(CSLIBDIR)/cslib.a -lm # *************************************************************** # Entry to bring the package up to date all: $(PROGRAMS) # *************************************************************** # Standard entries to remove files from the directories # tidy -- eliminate unwanted files # scratch -- delete derived files in preparation for rebuild tidy: rm -f ,* .,* *~ core a.out graphics.ps scratch: tidy rm -f *.o *.a $(PROGRAMS) # *************************************************************** # C compilations showfile.o: showfile.c $(CC) $(CFLAGS) -c showfile.c copyfile.o: copyfile.c $(CC) $(CFLAGS) -c copyfile.c ucfile.o: ucfile.c $(CC) $(CFLAGS) -c ucfile.c xcomment.o: xcomment.c $(CC) $(CFLAGS) -c xcomment.c linecopy.o: linecopy.c $(CC) $(CFLAGS) -c linecopy.c elements.o: elements.c $(CC) $(CFLAGS) -c elements.c showfile: showfile.o $(CC) $(CFLAGS) -o showfile showfile.o $(LIBRARIES) copyfile: copyfile.o $(CC) $(CFLAGS) -o copyfile copyfile.o $(LIBRARIES) ucfile: ucfile.o $(CC) $(CFLAGS) -o ucfile ucfile.o $(LIBRARIES) xcomment: xcomment.o $(CC) $(CFLAGS) -o xcomment xcomment.o $(LIBRARIES) linecopy: linecopy.o $(CC) $(CFLAGS) -o linecopy linecopy.o $(LIBRARIES) elements: elements.o $(CC) $(CFLAGS) -o elements elements.o $(LIBRARIES)