# Makefile for sort.02, Test Driven Development for selection sort
# P.Conrad for CISC220, 06J

CCC = g++

BINARIES = sortTdd makeRandomFile librarySortTest librarySortFile

all: ${BINARIES}

sortTdd: runTests.o sortTdd.o selectionSort.o
	${CCC} runTests.o sortTdd.o selectionSort.o -o $@

librarySortTest: runTests.o librarySortTest.o librarySort.o
	${CCC} runTests.o librarySortTest.o librarySort.o -o $@

librarySortFile:  librarySortFile.o librarySort.o
	${CCC} librarySortFile.o librarySort.o -o $@

selectionSort.o: selectionSort.h selectionSort.cc

sortTdd.o: sortTdd.cc runTests.h selectionSort.h 

runTests.o: runTests.h runTests.cc

makeRandomFile.o: makeRandomFile.cc


librarySort.o: librarySort.cc 

librarySortTest.o: librarySortTest.cc runTests.h librarySort.h

clean: backupTildeFiles
	/bin/rm -f *.o ${BINARIES} a.out core 

backupTildeFiles: 
	mkdir -p backup
	/bin/mv -f *~ backup

spotless: clean
	/bin/rm -f *~

