3d0a58586d030e1a6ae1bcff5692d15069316fe1
[openwrt.git] / openwrt / target / linux / image / aruba / lzma-loader / src / Makefile
1 LOADADDR = 0x81000000
2 RAMSIZE = 0x00100000 # 1MB
3
4 CROSS_COMPILE = mips-linux-
5
6 .S.s:
7 $(CPP) $(CFLAGS) $< -o $*.s
8 .S.o:
9 $(CC) $(CFLAGS) -c $< -o $*.o
10 .c.o:
11 $(CC) $(CFLAGS) -c $< -o $*.o
12
13 CC = $(CROSS_COMPILE)gcc
14 LD = $(CROSS_COMPILE)ld
15 OBJCOPY = $(CROSS_COMPILE)objcopy
16 OBJDUMP = $(CROSS_COMPILE)objdump
17
18 CFLAGS = -fno-builtin -Os -G 0 -mno-abicalls -fno-pic -Wall -DRAMSIZE=${RAMSIZE} -D_LZMA_IN_CB
19 # CFLAGS = -fno-builtin -Os -G 0 -mno-abicalls -fno-pic -Wall -DRAMSIZE=${RAMSIZE}
20
21 O_FORMAT = $(shell $(OBJDUMP) -i | head -2 | grep elf32)
22
23 # Drop some uninteresting sections in the kernel.
24 # This is only relevant for ELF kernels but doesn't hurt a.out
25 drop-sections = .reginfo .mdebug .comment
26 strip-flags = $(addprefix --remove-section=,$(drop-sections))
27
28
29 all : lzma.elf
30
31 kernel.o: vmlinux.lzma
32 $(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
33
34 lzma.elf: start.o decompress.o LzmaDecode.o kernel.o
35 $(LD) -s -Tlzma.lds -o $@ $^
36
37 clean:
38 rm -f *.o lzma.elf
This page took 0.045933 seconds and 3 git commands to generate.