source: tt-loader/Makefile @ 11

Last change on this file since 11 was 11, checked in by guillaume, 14 years ago

Publication tt-loader v0.1

File size: 782 bytes
Line 
1CC = gcc
2INCLUDES =
3CFLAGS = -Wall -O2 -g $(INCLUDES)
4LIBS = -lusb
5LDFLAGS = -g $(LIBS)
6APP_NAME = tt-loader
7APP_VERSION = 0.1
8
9# Adapt this to your system
10CROSS ?= armv5tel-redhat-linux-gnueabi
11DIS_ADDR ?= 0
12
13OBJS = main.o
14
15all: $(APP_NAME)
16
17$(APP_NAME): $(OBJS)
18        $(CC) $(LDFLAGS) -o $@ $^
19
20clean:
21        rm -rf $(APP_NAME) *.o *~
22        $(MAKE) -C 2nd clean
23
242nd:
25        $(MAKE) -C 2nd all
26
27pkg: 2nd
28        rm -f $(APP_NAME)-$(APP_VERSION).tar.gz
29        tar czf $(APP_NAME)-$(APP_VERSION).tar.gz Makefile *.c COPYING README commands.txt \
30                tt-loader.sh 2nd/arm.ld 2nd/*.h 2nd/*.c 2nd/Makefile 2nd/start.S 2nd/2nd.bin
31
32%.dis: %.bin
33        rm -f $@
34        $(CROSS)-objcopy -I binary -O elf32-littlearm -B arm $< $(@F).elf
35        $(CROSS)-objdump -D --adjust-vma=$(DIS_ADDR) $(@F).elf > $@
36        rm -f $(@F).elf
37
38.PHONY: all clean 2nd
Note: See TracBrowser for help on using the repository browser.