all: ex1.elf sol-ex18.elf sol-call.elf ex27-v8.elf ex17.elf

%.elf: %.s
	msp430-elf-gcc -mmcu=msp430f2274 -o $@ $<

ex1.elf: ex1.s
	msp430-elf-gcc -mmcu=msp430f2274 -o ex1.elf ex1.s

ex1: ex1.elf
	msp430-elf-objdump -d ex1.elf
	mspdebug rf2500 "prog ex1.elf"

sol-ex18.elf: sol-ex18.s
	msp430-elf-gcc -mmcu=msp430f2274 -o sol-ex18.elf sol-ex18.s

sol-ex18: sol-ex18.elf
	msp430-elf-objdump -d sol-ex18.elf
	mspdebug rf2500 "prog sol-ex18.elf"

sol-call.elf: sol-call.s
	msp430-elf-gcc -mmcu=msp430f2274 -o sol-call.elf sol-call.s

sol-call: sol-call.elf
	msp430-elf-objdump -d sol-call.elf
	mspdebug rf2500 "prog sol-call.elf"

ex27-v8.elf: ex27-v8.s
	msp430-elf-gcc -mmcu=msp430f2274 -o ex27-v8.elf ex27-v8.s

ex27: ex27.elf
	mspdebug rf2500 "prog ex27.elf"

watch.s: watch.cl
	msp430-gcc -mmcu=msp430f2274 -S $< -o $@
clean:
	\rm -rf *~ *.elf watch.s
