############### Name of top level file. ################# PRJ=p2 ############## c Files. ############################### SRCSc=$(PRJ).c ############## s Files. ############################### SRCSs= OBJSc=$(SRCSc:.c=.o) OBJSs=$(SRCSs:.s=.o) path=$(shell PWD) all : $(PRJ).s19 #Create .s19, .dump files $(PRJ).s19 : $(PRJ).elf m6811-elf-objcopy -O srec $(PRJ).elf $(PRJ).s19 m6811-elf-objdump -xdC -S $(PRJ).elf >$(PRJ).dump #Linking $(PRJ).elf : $(OBJSc) $(OBJSs) m6811-elf-gcc -m68hc12 -mshort \ -Wl,-mm68hc12elfb \ -o $(PRJ).elf $(OBJSc) $(OBJSs) #Compiling %.o : %.c m6811-elf-gcc -Wa,-als=$(<).lst \ -m68hc12 -mshort -c -fomit-frame-pointer -g -Wall -o $@ $< # -m68hc12 -mshort -c -g -Wall -o $@ $< ******* OK # -m68hc12 -mshort -c -fomit-frame-pointer -g -Wall -o $@ $< ******* NOT OK # Assembly %.o : %.s m6811-elf-gcc -Wa,-als=$(<).lst \ -m68hc12 -mshort -c -o $@ $< clean : rm *.elf *.o *.s19 *.dump *.lst download: $(PRJ).s19 cscript c:\perl\DwnLd6812.wsf $(path) $(PRJ)