summaryrefslogtreecommitdiff
path: root/Host/libnxt-0.3/flash_write/Makefile
diff options
context:
space:
mode:
authorTC Wan2010-12-22 17:30:29 +0800
committerTC Wan2010-12-22 17:30:29 +0800
commit58494668ef864db0ad6cd35eca62106cbbed0543 (patch)
tree161f7874dcd133e43b83f83847e1cf6b9f5d5155 /Host/libnxt-0.3/flash_write/Makefile
parent29149e9487715209da4c574b4d3b1cfb7ea17b78 (diff)
added libnxt as a dependent library
Added libnxt as a dependent library instead of using system provided package. This is mainly due to the difficulty in getting libnxt installed using MacPorts.
Diffstat (limited to 'Host/libnxt-0.3/flash_write/Makefile')
-rw-r--r--Host/libnxt-0.3/flash_write/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Host/libnxt-0.3/flash_write/Makefile b/Host/libnxt-0.3/flash_write/Makefile
new file mode 100644
index 0000000..93bb888
--- /dev/null
+++ b/Host/libnxt-0.3/flash_write/Makefile
@@ -0,0 +1,19 @@
+#all:
+# gcc -Wall -O0 -mcpu=arm7tdmi-s -mapcs -mthumb-interwork -o flash.o flash.c -nostartfiles -nodefaultlibs -nostdlib -Wl,-e,main
+# objcopy -Obinary -j.text flash.o flash.bin
+# objdump --disassemble-all -bbinary -marm7tdmi flash.bin > flash.asm
+#
+
+CC=`which arm-elf-gcc`
+AS=`which arm-elf-as`
+LD=`which arm-elf-ld`
+OBJCOPY=`which arm-elf-objcopy`
+
+all:
+ $(CC) -W -Wall -O3 -msoft-float -mcpu=arm7tdmi -mapcs -c -o flash.o flash.c
+ $(AS) --warn -mfpu=softfpa -mcpu=arm7tdmi -mapcs-32 -o crt0.o crt0.s
+ $(LD) -O3 --gc-sections crt0.o flash.o -o flash.elf
+ $(OBJCOPY) -O binary flash.elf flash.bin
+
+clean:
+ rm -f flash.o crt0.o flash.elf flash.bin