Import 2.3.99pre4-2
[davej-history.git] / arch / alpha / boot / Makefile
blob6bd6cb03f3481c3b506e3fdde455c95d8779c08a
2 # arch/alpha/boot/Makefile
4 # This file is subject to the terms and conditions of the GNU General Public
5 # License. See the file "COPYING" in the main directory of this archive
6 # for more details.
8 # Copyright (C) 1994 by Linus Torvalds
11 LINKFLAGS = -static -T bootloader.lds #-N -relax
13 .S.s:
14 $(CPP) $(AFLAGS) -traditional -o $*.o $<
15 .S.o:
16 $(CC) $(AFLAGS) -traditional -c -o $*.o $<
18 OBJECTS = head.o main.o
19 BPOBJECTS = head.o bootp.o
20 TARGETS = vmlinux.gz tools/objstrip # also needed by aboot & milo
21 VMLINUX = $(TOPDIR)/vmlinux
22 OBJSTRIP = tools/objstrip
24 all: $(TARGETS)
25 @echo Ready to install kernel in $(shell pwd)/vmlinux.gz
27 # normally no need to build these:
28 rawboot: vmlinux.nh tools/lxboot tools/bootlx
30 msb: tools/lxboot tools/bootlx vmlinux.nh
31 ( cat tools/lxboot tools/bootlx vmlinux.nh ) > /dev/rz0a
32 disklabel -rw rz0 'linux' tools/lxboot tools/bootlx
34 bootimage: tools/mkbb tools/lxboot tools/bootlx vmlinux.nh
35 ( cat tools/lxboot tools/bootlx vmlinux.nh ) > bootimage
36 tools/mkbb bootimage tools/lxboot
38 bootpfile: tools/bootph vmlinux.nh
39 cat tools/bootph vmlinux.nh > bootpfile
40 ifdef INITRD
41 cat $(INITRD) >> bootpfile
42 endif
44 srmboot: bootdevice bootimage
45 dd if=bootimage of=$(BOOTDEV) bs=512 seek=1 skip=1
46 tools/mkbb $(BOOTDEV) tools/lxboot
48 bootdevice:
49 @test "$(BOOTDEV)" != "" || (echo You must specify BOOTDEV ; exit -1)
51 vmlinux.gz: vmlinux
52 gzip -fv9 vmlinux
54 main.o: ksize.h
56 bootp.o: ksize.h
58 ksize.h: vmlinux.nh dummy
59 echo "#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@T
60 ifdef INITRD
61 [ -f $(INITRD) ] || exit 1
62 echo "#define INITRD_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T
63 endif
64 cmp -s $@T $@ || mv -f $@T $@
65 rm -f $@T
67 vmlinux.nh: $(VMLINUX) $(OBJSTRIP)
68 $(OBJSTRIP) -v $(VMLINUX) vmlinux.nh
70 vmlinux: $(TOPDIR)/vmlinux
71 strip -o vmlinux $(VMLINUX)
73 tools/lxboot: $(OBJSTRIP) bootloader
74 $(OBJSTRIP) -p bootloader tools/lxboot
76 tools/bootlx: bootloader $(OBJSTRIP)
77 $(OBJSTRIP) -vb bootloader tools/bootlx
79 tools/bootph: bootpheader $(OBJSTRIP)
80 $(OBJSTRIP) -vb bootpheader tools/bootph
82 $(OBJSTRIP): $(OBJSTRIP).c
83 $(HOSTCC) $(OBJSTRIP).c -o $(OBJSTRIP)
85 tools/mkbb: tools/mkbb.c
86 $(HOSTCC) tools/mkbb.c -o tools/mkbb
88 bootloader: $(OBJECTS)
89 $(LD) $(LINKFLAGS) $(OBJECTS) $(LIBS) -o bootloader
91 bootpheader: $(BPOBJECTS)
92 $(LD) $(LINKFLAGS) $(BPOBJECTS) $(LIBS) -o bootpheader
94 clean:
95 rm -f $(TARGETS) bootloader bootimage bootpfile bootpheader
96 rm -f tools/mkbb tools/bootlx tools/lxboot tools/bootph
97 rm -f vmlinux.nh ksize.h
99 dep:
101 dummy: