Merge with Linux 2.3.40.
[linux-2.6/linux-mips.git] / arch / ppc / treeboot / Makefile
blobf84810e1ef161776cd3b892536c8ed99d8fdeb7b
2 # Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
4 # Module name: Makefile
6 # Description:
7 # Makefile for the IBM "tree" evaluation board Linux kernel
8 # boot loaders.
11 HOSTCFLAGS = -O -I$(TOPDIR)/include
13 CC = $(CROSS_COMPILE)gcc
14 LD = $(CROSS_COMPILE)ld
15 OBJCOPY = $(CROSS_COMPILE)objcopy
16 OBJDUMP = $(CROSS_COMPILE)objdump
18 GZIP = gzip -vf9
19 RM = rm -f
20 MKEVIMG = mkevimg -l
21 MKIRIMG = mkirimg
23 CFLAGS = -O -fno-builtin -I$(TOPDIR)/include
24 LD_ARGS = -e _start -T ld.script -Ttext 0x00200000 -Bstatic
26 OBJS = crt0.o main.o misc.o irSect.o ../coffboot/string.o ../coffboot/zlib.o
27 LIBS =
29 treeboot: $(OBJS) ld.script
30 $(LD) -o $@ $(LD_ARGS) $(OBJS) $(LIBS)
32 zImage: vmlinux.img
34 zImage.initrd: vmlinux.initrd.img
36 treeboot.image: treeboot vmlinux.gz
37 $(OBJCOPY) --add-section=image=vmlinux.gz treeboot $@
39 treeboot.initrd: treeboot.image ramdisk.image.gz
40 $(OBJCOPY) --add-section=initrd=ramdisk.image.gz treeboot.image $@
42 vmlinux.img: treeboot.image
43 $(OBJDUMP) --syms treeboot.image | grep irSectStart > irSectStart.txt
44 $(MKIRIMG) treeboot.image treeboot.image.out irSectStart.txt
45 $(MKEVIMG) treeboot.image.out $@
46 $(RM) treeboot.image treeboot.image.out irSectStart.txt
48 vmlinux.initrd.img: treeboot.initrd
49 $(OBJDUMP) --all-headers treeboot.initrd | grep irSectStart > irSectStart.txt
50 $(MKIRIMG) treeboot.initrd treeboot.initrd.out irSectStart.txt
51 $(MKEVIMG) treeboot.initrd.out $@
52 $(RM) treeboot.initrd treeboot.initrd.out irSectStart.txt
54 vmlinux.gz: $(TOPDIR)/vmlinux
55 $(OBJCOPY) -S -O binary $(TOPDIR)/vmlinux vmlinux
56 $(GZIP) vmlinux
58 clean:
59 rm -f treeboot treeboot.image treeboot.initrd irSectStart.txt vmlinux.* *.o
61 fastdep: