From: Kenn H. <ke...@us...> - 2003-01-29 00:10:59
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax In directory sc8-pr-cvs1:/tmp/cvs-serv11148/arch/vax Modified Files: Makefile Log Message: kbuild wants LDFLAGS and LDFLAGS_vmlinux defined this way. Also pull some code duplication out into separate targets (vmlinux.bin and header.bin generation). Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Makefile 27 Jan 2003 00:21:04 -0000 1.10 +++ Makefile 29 Jan 2003 00:10:55 -0000 1.11 @@ -13,8 +13,8 @@ # Copyright (C) 1994 by Linus Torvalds # -LD=$(CROSS_COMPILE)ld -m elf_vax -OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S +LDFLAGS=-m elf_vax +OBJCOPYFLAGS=-O binary -R .note -R .comment -S # Note that this CFLAGS definition will override the definition @@ -24,7 +24,7 @@ # These flags are used by the top-level makefile when linking # the kernel -LINKFLAGS=-T arch/vax/vmlinux.lds \ +LDFLAGS_vmlinux=-T arch/vax/vmlinux.lds \ -N -nostartfiles -nostdlib \ -noinhibit-exec -warn-once \ -Map vmlinux.map -cref @@ -54,13 +54,16 @@ all: mopboot archonly: mopbootx diskbootx -# This target should re-compile anything that's changed -mopboot: vmlinux - $(OBJCOPY) vmlinux -O binary vmlinux.bin +vmlinux.bin: vmlinux FORCE + $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ + +header.bin: dd if=/dev/zero of=header.bin bs=512 count=1 - mv -f header.bin vmlinux.SYS - cat vmlinux.bin >> vmlinux.SYS - $(SETCMDLINE) vmlinux.SYS $(DEFAULT_CMDLINE) + +# This target should re-compile anything that's changed +mopboot: vmlinux.bin header.bin + cat header.bin vmlinux.bin > vmlinux.SYS + $(SETCMDLINE) vmlinux.SYS $(DEFAULT_CMDLINE) # this is helpful for low level debuggery listfile: @@ -68,11 +71,8 @@ $(OBJDUMP) -D vmlinux > vmlinux.lst # This target will only re-compile stuff that's changed in arch/vax -mopbootx: linkonly - $(OBJCOPY) vmlinux -O binary vmlinux.bin - dd if=/dev/zero of=header.bin bs=512 count=1 - mv -f header.bin vmlinux.SYS - cat vmlinux.bin >> vmlinux.SYS +mopbootx: linkonly vmlinux.bin header.bin + cat header.bin vmlinux.bin > vmlinux.SYS $(SETCMDLINE) vmlinux.SYS $(DEFAULT_CMDLINE) # This will make a disk-bootable image. dd this directly to a @@ -84,8 +84,7 @@ # use the vmlinux.SYS and something like asbl. Dont forget to # set the command line to something useful like "root=/dev/sda1" # -diskboot: vmlinux - $(OBJCOPY) vmlinux -O binary vmlinux.bin +diskboot: vmlinux.bin $(MKBOOTBLK) vmlinux.bin > vmlinux.dsk cat vmlinux.bin >> vmlinux.dsk @echo " " @@ -95,8 +94,7 @@ # ... and this one only rebuilds stuff in arch/vax -diskbootx: linkonly - $(OBJCOPY) vmlinux -O binary vmlinux.bin +diskbootx: linkonly vmlinux.bin $(MKBOOTBLK) vmlinux.bin > vmlinux.dsk cat vmlinux.bin >> vmlinux.dsk @echo " " |