diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-03-01 16:33:27 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-03-01 16:33:27 +0100 |
commit | 9f663d6560dece699bcc18a7d9b1d2143a0acc9a (patch) | |
tree | 666677ff1cc9426e3c030737325de47d1dd85fc5 /Makefile | |
download | exercises-9f663d6560dece699bcc18a7d9b1d2143a0acc9a.tar.gz |
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1f31cb7 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ + +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'" $< |