obj = present PORT = 1337 WFLAGS = -Wall -Wextra LDFLAGS = -Wl,--section-start=.text=0x1000 LDFLAGS += -Wl,--section-start=.data=0x2000 $(obj): $(obj).S arm-none-eabi-gcc -g $(WFLAGS) -nostdlib $< -o $@ $(LDFLAGS) run-$(obj): $(obj) qemu-arm -g $(PORT) $(obj) & arm-none-eabi-gdb -q -ex 'tar rem localhost:$(PORT)' $(obj) edit-$(obj).S: $(obj).S @vim +"let g:syntastic_asm_compiler='arm-none-eabi-gcc'" $<