# Makefile for lab04b, Fall 2005, CISC181, P. Conrad # # @@@ Add cantGetThrough and farnsworthCISC181 in stages 2 and 6 # BINARIES = morseCISC181 dtmf123 morseSOS mary # next line could be changed to CCC = CC CCC = CC # all: is the first "target" in this makefile # the rule says to make all of the binaries # # @@@ Add cantGetThrough.wav to this list in Stage 2, and add a rule # for cantGetThrough.wav similar to that for dtmf123.wav WAVFILES = CISC181.wav DTMF123.wav \ SOSrepeat_1_5.wav SOSrepeat_3_10.wav SOSrepeat_7_20.wav \ mary.wav \ CISC181_5wpm.wav CISC181_10wpm.wav CISC181_20wpm.wav TARGETDIR = ${HOME}/public_html/cisc181/proj1 all: ${BINARIES} install: ${WAVFILES} mkdir -p ${TARGETDIR} cp ${WAVFILES} ${TARGETDIR} chmod -R a+rx ${TARGETDIR} CISC181.wav: morseCISC181 ./morseCISC181 0.1 CISC181.wav # Change to ./morseCISC181 SOSrepeat_1_5.wav 1 5 after you add # the extra command line argument (argv[3]) SOSrepeat_1_5.wav: morseSOS ./morseSOS SOSrepeat_1_5.wav 5 SOSrepeat_3_10.wav: morseSOS ./morseSOS SOSrepeat_3_10.wav 10 SOSrepeat_7_20.wav: morseSOS ./morseSOS SOSrepeat_7_20.wav 20 # The value 0.2 is just arbitrary; it can be any reasonable value # It means each tone will last 1/5 of a second (0.2 seconds) DTMF123.wav: dtmf123 ./dtmf123 0.2 DTMF123.wav mary.wav: mary ./mary mary.wav morseCISC181: endian.o endian.h wavLibrary.o wavLibrary.h morseCISC181.o $(CCC) endian.o wavLibrary.o morseCISC181.o -o $@ dtmf123: endian.o endian.h wavLibrary.o wavLibrary.h dtmf123.o $(CCC) endian.o wavLibrary.o dtmf123.o -o $@ # # @@@ add a rule here for cantGetThrough (the binary) # morseSOS: endian.o endian.h wavLibrary.o wavLibrary.h morseSOS.o $(CCC) endian.o wavLibrary.o morseSOS.o -o $@ mary: endian.o endian.h wavLibrary.o wavLibrary.h mary.o $(CCC) endian.o wavLibrary.o mary.o -o $@ # Farnsworth timing (stage 6) # # Change the command lines to # ./farnsworthCISC181 5 $@ # ./farnsworthCISC181 10 $@ # ./farnsworthCISC181 20 $@ CISC181_5wpm.wav: morseCISC181 ./morseCISC181 0.1 $@ CISC181_10wpm.wav: morseCISC181 ./morseCISC181 0.1 $@ CISC181_20wpm.wav: morseCISC181 ./morseCISC181 0.1 $@ clean: /bin/rm -f ${BINARIES} a.out core *.exe *.o /bin/rm -f ${WAVFILES}