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
8 # Copyright (C) 1994 by Linus Torvalds
11 LINKFLAGS
= -static
-T bootloader.lds
#-N -relax
14 $(CPP
) $(AFLAGS
) -traditional
-o
$*.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
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
41 cat
$(INITRD
) >> bootpfile
44 srmboot
: bootdevice bootimage
45 dd if
=bootimage of
=$(BOOTDEV
) bs
=512 seek
=1 skip
=1
46 tools
/mkbb
$(BOOTDEV
) tools
/lxboot
49 @
test "$(BOOTDEV)" != "" ||
(echo You must specify BOOTDEV
; exit
-1)
58 ksize.h
: vmlinux.nh dummy
59 echo
"#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@T
61 [ -f
$(INITRD
) ] || exit
1
62 echo
"#define INITRD_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T
64 cmp
-s
$@T
$@ || mv
-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
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