Update of /cvsroot/linux-vax/kernel-2.5/arch/vax
In directory sc8-pr-cvs1:/tmp/cvs-serv2365/arch/vax
Modified Files:
Makefile
Log Message:
Boot tools now have their own Makefile and boot/tools is added to
SUBDIRS. Better way of tweaking CFLAGS. Remove dead code. Don't
need CPP definition
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile 12 Jan 2003 22:40:34 -0000 1.7
+++ Makefile 23 Jan 2003 23:30:35 -0000 1.8
@@ -14,18 +14,15 @@
#
LD=$(CROSS_COMPILE)ld -m elf_vax
-CPP=$(CC) -E
OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
# Note that this CFLAGS definition will override the definition
-# in the top-level Makefile
-# need cppflags to get -I$(HPATH) includes right
-CFLAGS= $(CPPFLAGS) -nostartfiles -nostdlib -Wall
-CFLAGS_OPT=-O1
-CFLAGS_PIPE := -pipe
-CFLAGS_NSR := -fno-strength-reduce
-CFLAGS := $(CFLAGS) $(CFLAGS_OPT) $(CFLAGS_NSR)
+# in the top-level Makefile. We want -O1, not -O2
+CFLAGS := $(subst -O2,-O1,$(CFLAGS) )
+
+# And for some reason, init/init.o won't link with -fno-common set
+CFLAGS := $(subst -fno-common,,$(CFLAGS) )
# These flags are used by the top-level makefile when linking
@@ -42,15 +39,17 @@
ARCHLIBS := $(TOPDIR)/arch/vax/lib/libio.a $(TOPDIR)/arch/vax/boot/libboot.a
LIBS := $(ARCHLIBS) $(LIBS)
-MKBOOTBLK := $(TOPDIR)/arch/vax/boot/tools/mkbootblk
+TOOLSDIR := $(TOPDIR)/arch/vax/boot/tools
+MKBOOTBLK := $(TOOLSDIR)/mkbootblk
DEFAULT_CMDLINE := "root=/dev/nfs nfsroot=/home/disk_vax/vaxroot ip=bootp rw debug"
-SETCMDLINE := $(TOPDIR)/arch/vax/boot/tools/setcmdline
-SHOWCMDLINE := $(TOPDIR)/arch/vax/boot/tools/showcmdline
+SETCMDLINE := $(TOOLSDIR)/setcmdline
+SHOWCMDLINE := $(TOOLSDIR)/showcmdline
# And these are some extra dependencies for vmlinux
vmlinux: $(HEAD) $(ARCHLIBS)
-SUBDIRS := $(SUBDIRS) arch/vax/kernel arch/vax/mm arch/vax/lib arch/vax/boot
+ARCHDIRS := arch/vax/kernel arch/vax/mm arch/vax/lib arch/vax/boot
+SUBDIRS := $(SUBDIRS) $(ARCHDIRS) $(TOOLSDIR)
CORE_FILES := arch/vax/kernel/kernel.o arch/vax/mm/mm.o $(CORE_FILES)
@@ -59,7 +58,7 @@
archonly: mopbootx diskbootx
# This target should re-compile anything that's changed
-mopboot: vmlinux $(SETCMDLINE)
+mopboot: vmlinux
$(OBJCOPY) vmlinux -O binary vmlinux.bin
dd if=/dev/zero of=header.bin bs=512 count=1
mv -f header.bin vmlinux.SYS
@@ -72,7 +71,7 @@
$(OBJDUMP) -D vmlinux > vmlinux.lst
# This target will only re-compile stuff that's changed in arch/vax
-mopbootx: linkonly $(SETCMDLINE)
+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
@@ -88,7 +87,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 $(MKBOOTBLK) $(SETCMDLINE)
+diskboot: vmlinux
$(OBJCOPY) vmlinux -O binary vmlinux.bin
$(MKBOOTBLK) vmlinux.bin > vmlinux.dsk
cat vmlinux.bin >> vmlinux.dsk
@@ -99,7 +98,7 @@
# ... and this one only rebuilds stuff in arch/vax
-diskbootx: linkonly $(MKBOOTBLK) $(SETCMDLINE)
+diskbootx: linkonly
$(OBJCOPY) vmlinux -O binary vmlinux.bin
$(MKBOOTBLK) vmlinux.bin > vmlinux.dsk
cat vmlinux.bin >> vmlinux.dsk
@@ -108,30 +107,9 @@
@echo " " $(SETCMDLINE)
@echo " "
-linkonly: FORCE
- $(MAKE) -C arch/vax/lib
- $(MAKE) -C arch/vax/mm
- $(MAKE) -C arch/vax/kernel
- $(MAKE) -C arch/vax/boot
+linkonly: FORCE $(ARCHDIRS) $(TOOLSDIR)
@$(call rule_link_vmlinux)
-#$(HEAD): libboot
-
-$(MKBOOTBLK): $(MKBOOTBLK).c
- gcc -o $@ $<
-
-$(SHOWCMDLINE): $(SETCMDLINE)
-
-$(SETCMDLINE): $(SETCMDLINE).c
- gcc -o $@ $<
- ln -f $(SETCMDLINE) $(SHOWCMDLINE)
-
-#libboot:
-# (cd ${TOPDIR}/arch/vax/boot; make all )
-#
-#libio:
-# (cd ${TOPDIR}/arch/vax/lib ; make )
-
dep:
fastdep:
@@ -139,11 +117,10 @@
archclean:
rm -f vmlinux.* vmlinux
cd $(TOPDIR)/arch/vax ; rm -f *.out TEST.BIN TEST.SYS header.bin
- cd $(TOPDIR)/arch/vax/boot/tools ; rm -f setcmdline showcmdline
+ cd $(TOOLSDIR) ; rm -f setcmdline showcmdline mkbootblk
archmrproper:
archdep:
-# @$(MAKEBOOT) dep
clean: archclean
|