source: tt-loader/Makefile @ 15

Last change on this file since 15 was 15, checked in by guillaume, 16 years ago

Publication tt-loader v0.2.1

File size: 1.0 KB
Line 
1CC = gcc
2INCLUDES =
3CFLAGS = -Wall -O2 -g $(INCLUDES)
4LIBS = -lusb
5LDFLAGS = -g $(LIBS)
6APP_NAME = tt-loader
7APP_VERSION = 0.2.1
8
9# Adapt this to your system
10CROSS ?= armv5tel-redhat-linux-gnueabi
11DIS_ADDR ?= 0
12
13# You can overide the name of the extracted MTD partition to get the kernel
14KERNEL_MTD ?= mtd4
15
16OBJS = main.o crc32.o
17
18all: $(APP_NAME)
19
20$(APP_NAME): $(OBJS)
21        $(CC) $(LDFLAGS) -o $@ $^
22
23clean:
24        rm -rf $(APP_NAME) *.o *~
25        $(MAKE) -C 2nd clean
26
272nd:
28        $(MAKE) -C 2nd all
29
30pkg: 2nd
31        rm -f $(APP_NAME)-$(APP_VERSION).tar.gz
32        tar czf $(APP_NAME)-$(APP_VERSION).tar.gz Makefile *.c COPYING README \
33                CMD-SYNTAX commands.txt write-splash.txt FlashWriteNAND.txt \
34                tt-loader.sh 2nd/arm.ld 2nd/*.h 2nd/*.c 2nd/Makefile 2nd/start.S 2nd/2nd.bin
35
36%.dis: %.bin
37        rm -f $@
38        $(CROSS)-objcopy -I binary -O elf32-littlearm -B arm $< $(@F).elf
39        $(CROSS)-objdump -D --adjust-vma=$(DIS_ADDR) $(@F).elf > $@
40        rm -f $(@F).elf
41
42# Extract kernel from mtd4 nand partition extraction
43kernel.bin: $(KERNEL_MTD)
44        ./kernel-extract.sh $^ $@
45
46.PHONY: all clean 2nd
Note: See TracBrowser for help on using the repository browser.