- add missing svn props and fix incorrect line endings from last commit
[fw/openocd] / testing / examples / ledtest-imx31pdk / Makefile
1 # $Header: $
2 # This will make the test program for ARM.
3
4 PROC=arm
5 TYPE=none-linux-gnueabi
6 LDSCRIPT=ldscript
7
8 PATH:=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/:$(PATH)
9 CC=$(PROC)-$(TYPE)-gcc
10 AS=$(PROC)-$(TYPE)-as
11 AR=$(PROC)-$(TYPE)-ar
12 LD=$(PROC)-$(TYPE)-ld
13 NM=$(PROC)-$(TYPE)-nm
14 OBJDUMP=$(PROC)-$(TYPE)-objdump
15 CFLAGS= -g -c -mcpu=arm1136j-s
16
17 all: test.elf
18
19 # Make a little endian image:
20 # In Eclipse, add the line :
21 #    source gdbinit 
22 # to : Run -> Debug... (menu) -> Commands (tab): Commands (listbox)
23 # To start gdb from a window use : arm-elf-gdb --command=gdbinit
24 test.elf: test.c Makefile ldscript crt0.S
25         $(CC) $(CFLAGS) -o crt0.o crt0.S
26         $(CC) $(CFLAGS) -o test.o test.c
27         $(LD) -g -v -T$(LDSCRIPT) -o test.elf crt0.o test.o 
28         $(NM) test.elf
29
30         
31 dump:
32         $(OBJDUMP) --all-headers test.elf
33
34 dump_test:
35         $(OBJDUMP) --disassemble test.elf
36
37 dump_full:
38         $(OBJDUMP) --full-contents test.elf
39
40 clean:
41         -/bin/rm -f *.o *~ test.elf
42