Last change
on this file since 11 was
11,
checked in by guillaume, 17 years ago
|
Publication tt-loader v0.1
|
File size:
1019 bytes
|
Rev | Line | |
---|
[11] | 1 | CROSS = armv5tel-redhat-linux-gnueabi |
---|
| 2 | CC = $(CROSS)-gcc |
---|
| 3 | INCLUDES = |
---|
| 4 | CFLAGS = -g -Wall -fverbose-asm -march=armv5t -mtune=arm926ej-s \ |
---|
| 5 | -msoft-float $(INCLUDES) |
---|
| 6 | LIBS = |
---|
| 7 | LDFILE = arm.ld |
---|
| 8 | LDFLAGS = $(LIBS) -T $(LDFILE) |
---|
| 9 | APP_NAME = 2nd |
---|
| 10 | OBJ_ADDR ?= 0x10000000 |
---|
| 11 | |
---|
| 12 | S_SRCS = start.S |
---|
| 13 | C_SRCS = main.c usb.c |
---|
| 14 | SRCS = $(S_SRCS) $(C_SRCS) |
---|
| 15 | |
---|
| 16 | OBJS = $(S_SRCS:.S=.o) $(C_SRCS:.c=.o) |
---|
| 17 | ALL = $(APP_NAME).bin $(APP_NAME).asm |
---|
| 18 | |
---|
| 19 | all: |
---|
| 20 | $(MAKE) $(ALL) DEPEND=.depend |
---|
| 21 | |
---|
| 22 | clean: |
---|
| 23 | rm -f *.o *.elf *.bin *.map *.asm *.dis .depend *~ |
---|
| 24 | |
---|
| 25 | $(APP_NAME).elf: $(LDFILE) $(OBJS) |
---|
| 26 | $(CROSS)-ld $(LDFLAGS) -Map $(APP_NAME).map -o $@ $(OBJS) |
---|
| 27 | |
---|
| 28 | $(APP_NAME).asm: $(APP_NAME).elf |
---|
| 29 | $(CROSS)-objdump -d -S $(APP_NAME).elf >$(APP_NAME).asm |
---|
| 30 | |
---|
| 31 | %.dis: %.mtd |
---|
| 32 | $(CROSS)-objcopy -I binary -O elf32-littlearm -B arm $< $(@F).elf |
---|
| 33 | $(CROSS)-objdump -D --adjust-vma=$(OBJ_ADDR) $(@F).elf > $@ |
---|
| 34 | |
---|
| 35 | %.bin: %.elf |
---|
| 36 | $(CROSS)-objcopy -O binary $< $@ |
---|
| 37 | |
---|
| 38 | dep: .depend |
---|
| 39 | |
---|
| 40 | .depend: $(SRCS) |
---|
| 41 | $(CC) -M -MG $(INCLUDES) $^ > .depend |
---|
| 42 | |
---|
| 43 | ifdef DEPEND |
---|
| 44 | include $(DEPEND) |
---|
| 45 | endif |
---|
| 46 | |
---|
| 47 | .depend: $(SRCS) |
---|
| 48 | |
---|
| 49 | .PHONY: dep all clean |
---|
Note: See
TracBrowser
for help on using the repository browser.