Remove exception.o, swtch.o, support.o, conf.o and machdep.o from

SYSTEM_OBS.  They are now normal objects.

Remove stale dependencies for the above now-normal objects and for
locore.o and generate dependencies using mkdep.  Config doesn't
generate lists of assembler source files so the lists to be mkdep'ed
have to be given explictly.  Only the standard *.s files are given,
so the dependencies for gnu/fpemul/*.s are incomplete.  *.S files
would be handled right if config put them in CFILES.

Don't define NPX.  It was replaced by NNPX > 0 years ago.

Define LOAD_ADDRESS in COPTS so that compiling machdep.c isn't a special
case.

Moving around the dependencies exposed a bug in make.  It doesn't
know that assym.s and ./assym.s are the same.  Add a rule tell it.
This commit is contained in:
bde 1994-08-30 17:17:49 +00:00
parent 2c77870951
commit 1d57c5b21c
3 changed files with 81 additions and 114 deletions

View File

@ -1,6 +1,6 @@
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.30 1994/08/23 04:21:21 jkh Exp $
# $Id: Makefile.i386,v 1.31 1994/08/23 09:54:22 jkh Exp $
#
# Makefile for FreeBSD
#
@ -35,26 +35,32 @@ I386= ${S}/i386
CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
#
# The following flags are next up for working on:
# -Wredundant-decls -Wnested-externs
# The following flag is next up for working on:
# -Wnested-externs
#
# When working on removing warnings from code, the `-Werror' flag should be
# of material assistance.
#
COPTFLAGS=-O
INCLUDES= -I. -I$S -I$S/sys
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS}
ASFLAGS=
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
LOAD_ADDRESS?= F0100000
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
# XXX errors leak out of all the pipes. Should use cc *.S.
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
SYSTEM_OBJS=locore.o exception.o swtch.o support.o ${OBJS} param.o \
ioconf.o conf.o machdep.o vnode_if.o
SFILES= ${I386}/i386/exception.s ${I386}/i386/microtime.s \
${I386}/i386/support.s ${I386}/i386/swtch.s
SYSTEM_CFILES= ioconf.c param.c vnode_if.c
SYSTEM_SFILES= ${I386}/i386/locore.s
SYSTEM_OBJS=locore.o ${OBJS} ioconf.o param.o vnode_if.o
SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} libkern.a
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o $@ -X ${SYSTEM_OBJS} vers.o libkern.a
@ -112,33 +118,13 @@ symbols.sort: ${I386}/i386/symbols.raw
grep -v '^#' ${I386}/i386/symbols.raw \
| sed 's/^ //' | sort -u > symbols.sort
locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \
$S/sys/errno.h machine/specialreg.h \
${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h \
machine/asmacros.h
${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
${AS} ${ASFLAGS} -o locore.o
locore.o:
${NORMAL_S}
exception.o: assym.s ${I386}/i386/exception.s machine/trap.h \
${I386}/isa/vector.s ${I386}/isa/icu.s \
$S/sys/errno.h ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h \
$S/net/netisr.h machine/asmacros.h
${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/exception.s | \
${AS} ${ASFLAGS} -o exception.o
swtch.o: assym.s ${I386}/i386/swtch.s \
$S/sys/errno.h machine/asmacros.h
${CPP} -I. ${COPTS} ${I386}/i386/swtch.s | \
${AS} ${ASFLAGS} -o swtch.o
support.o: assym.s ${I386}/i386/support.s \
$S/sys/errno.h machine/asmacros.h
${CPP} -I. ${COPTS} ${I386}/i386/support.s | \
${AS} ${ASFLAGS} -o support.o
machdep.o: ${I386}/i386/machdep.c Makefile
${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $<
# everything potentially depends on the Makefile since everything potentially
# depends on the options. Some things are more dependent on the Makefile for
# historical reasons.
machdep.o: Makefile
# the following is necessary because autoconf.o depends on #if GENERIC
autoconf.o: Makefile
@ -149,6 +135,9 @@ af.o uipc_proto.o locore.o: Makefile
# depends on KDB (cons.o also depends on GENERIC)
trap.o cons.o: Makefile
# this rule stops ./assym.s in .depend from causing problems
./assym.s: assym.s
assym.s: genassym
./genassym >,assym.s
if cmp -s assym.s ,assym.s; then \
@ -164,9 +153,13 @@ genassym: Makefile
${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
${I386}/i386/genassym.c -static -o genassym
# XXX this assumes that the options for NORMAL_C* and DRIVER_C* are identical.
depend: assym.s param.c vnode_if.h
sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c
sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
mkdep ${COPTS} ${CFILES} ${SYSTEM_CFILES}
mkdep -a -p ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
${I386}/i386/genassym.c
MKDEP_CPP=${CPP} ; export MKDEP_CPP ; \
mkdep -a -I. -DLOCORE ${COPTS} ${SFILES} ${SYSTEM_SFILES}
links:
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
@ -183,9 +176,6 @@ ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \
${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h
${CC} -c ${CFLAGS} ioconf.c
conf.o: ${I386}/i386/conf.c $S/sys/conf.h
${CC} -c ${CFLAGS} ${I386}/i386/conf.c
param.c: $S/conf/param.c
-rm -f param.c
cp $S/conf/param.c .
@ -205,4 +195,3 @@ vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
%RULES
# DO NOT DELETE THIS LINE -- make depend uses it

View File

@ -1,6 +1,6 @@
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.30 1994/08/23 04:21:21 jkh Exp $
# $Id: Makefile.i386,v 1.31 1994/08/23 09:54:22 jkh Exp $
#
# Makefile for FreeBSD
#
@ -35,26 +35,32 @@ I386= ${S}/i386
CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
#
# The following flags are next up for working on:
# -Wredundant-decls -Wnested-externs
# The following flag is next up for working on:
# -Wnested-externs
#
# When working on removing warnings from code, the `-Werror' flag should be
# of material assistance.
#
COPTFLAGS=-O
INCLUDES= -I. -I$S -I$S/sys
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS}
ASFLAGS=
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
LOAD_ADDRESS?= F0100000
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
# XXX errors leak out of all the pipes. Should use cc *.S.
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
SYSTEM_OBJS=locore.o exception.o swtch.o support.o ${OBJS} param.o \
ioconf.o conf.o machdep.o vnode_if.o
SFILES= ${I386}/i386/exception.s ${I386}/i386/microtime.s \
${I386}/i386/support.s ${I386}/i386/swtch.s
SYSTEM_CFILES= ioconf.c param.c vnode_if.c
SYSTEM_SFILES= ${I386}/i386/locore.s
SYSTEM_OBJS=locore.o ${OBJS} ioconf.o param.o vnode_if.o
SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} libkern.a
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o $@ -X ${SYSTEM_OBJS} vers.o libkern.a
@ -112,33 +118,13 @@ symbols.sort: ${I386}/i386/symbols.raw
grep -v '^#' ${I386}/i386/symbols.raw \
| sed 's/^ //' | sort -u > symbols.sort
locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \
$S/sys/errno.h machine/specialreg.h \
${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h \
machine/asmacros.h
${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
${AS} ${ASFLAGS} -o locore.o
locore.o:
${NORMAL_S}
exception.o: assym.s ${I386}/i386/exception.s machine/trap.h \
${I386}/isa/vector.s ${I386}/isa/icu.s \
$S/sys/errno.h ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h \
$S/net/netisr.h machine/asmacros.h
${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/exception.s | \
${AS} ${ASFLAGS} -o exception.o
swtch.o: assym.s ${I386}/i386/swtch.s \
$S/sys/errno.h machine/asmacros.h
${CPP} -I. ${COPTS} ${I386}/i386/swtch.s | \
${AS} ${ASFLAGS} -o swtch.o
support.o: assym.s ${I386}/i386/support.s \
$S/sys/errno.h machine/asmacros.h
${CPP} -I. ${COPTS} ${I386}/i386/support.s | \
${AS} ${ASFLAGS} -o support.o
machdep.o: ${I386}/i386/machdep.c Makefile
${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $<
# everything potentially depends on the Makefile since everything potentially
# depends on the options. Some things are more dependent on the Makefile for
# historical reasons.
machdep.o: Makefile
# the following is necessary because autoconf.o depends on #if GENERIC
autoconf.o: Makefile
@ -149,6 +135,9 @@ af.o uipc_proto.o locore.o: Makefile
# depends on KDB (cons.o also depends on GENERIC)
trap.o cons.o: Makefile
# this rule stops ./assym.s in .depend from causing problems
./assym.s: assym.s
assym.s: genassym
./genassym >,assym.s
if cmp -s assym.s ,assym.s; then \
@ -164,9 +153,13 @@ genassym: Makefile
${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
${I386}/i386/genassym.c -static -o genassym
# XXX this assumes that the options for NORMAL_C* and DRIVER_C* are identical.
depend: assym.s param.c vnode_if.h
sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c
sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
mkdep ${COPTS} ${CFILES} ${SYSTEM_CFILES}
mkdep -a -p ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
${I386}/i386/genassym.c
MKDEP_CPP=${CPP} ; export MKDEP_CPP ; \
mkdep -a -I. -DLOCORE ${COPTS} ${SFILES} ${SYSTEM_SFILES}
links:
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
@ -183,9 +176,6 @@ ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \
${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h
${CC} -c ${CFLAGS} ioconf.c
conf.o: ${I386}/i386/conf.c $S/sys/conf.h
${CC} -c ${CFLAGS} ${I386}/i386/conf.c
param.c: $S/conf/param.c
-rm -f param.c
cp $S/conf/param.c .
@ -205,4 +195,3 @@ vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
%RULES
# DO NOT DELETE THIS LINE -- make depend uses it

View File

@ -1,6 +1,6 @@
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.30 1994/08/23 04:21:21 jkh Exp $
# $Id: Makefile.i386,v 1.31 1994/08/23 09:54:22 jkh Exp $
#
# Makefile for FreeBSD
#
@ -35,26 +35,32 @@ I386= ${S}/i386
CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls
#
# The following flags are next up for working on:
# -Wredundant-decls -Wnested-externs
# The following flag is next up for working on:
# -Wnested-externs
#
# When working on removing warnings from code, the `-Werror' flag should be
# of material assistance.
#
COPTFLAGS=-O
INCLUDES= -I. -I$S -I$S/sys
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS}
ASFLAGS=
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
LOAD_ADDRESS?= F0100000
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
# XXX errors leak out of all the pipes. Should use cc *.S.
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
SYSTEM_OBJS=locore.o exception.o swtch.o support.o ${OBJS} param.o \
ioconf.o conf.o machdep.o vnode_if.o
SFILES= ${I386}/i386/exception.s ${I386}/i386/microtime.s \
${I386}/i386/support.s ${I386}/i386/swtch.s
SYSTEM_CFILES= ioconf.c param.c vnode_if.c
SYSTEM_SFILES= ${I386}/i386/locore.s
SYSTEM_OBJS=locore.o ${OBJS} ioconf.o param.o vnode_if.o
SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} libkern.a
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o $@ -X ${SYSTEM_OBJS} vers.o libkern.a
@ -112,33 +118,13 @@ symbols.sort: ${I386}/i386/symbols.raw
grep -v '^#' ${I386}/i386/symbols.raw \
| sed 's/^ //' | sort -u > symbols.sort
locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \
$S/sys/errno.h machine/specialreg.h \
${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h \
machine/asmacros.h
${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
${AS} ${ASFLAGS} -o locore.o
locore.o:
${NORMAL_S}
exception.o: assym.s ${I386}/i386/exception.s machine/trap.h \
${I386}/isa/vector.s ${I386}/isa/icu.s \
$S/sys/errno.h ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h \
$S/net/netisr.h machine/asmacros.h
${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/exception.s | \
${AS} ${ASFLAGS} -o exception.o
swtch.o: assym.s ${I386}/i386/swtch.s \
$S/sys/errno.h machine/asmacros.h
${CPP} -I. ${COPTS} ${I386}/i386/swtch.s | \
${AS} ${ASFLAGS} -o swtch.o
support.o: assym.s ${I386}/i386/support.s \
$S/sys/errno.h machine/asmacros.h
${CPP} -I. ${COPTS} ${I386}/i386/support.s | \
${AS} ${ASFLAGS} -o support.o
machdep.o: ${I386}/i386/machdep.c Makefile
${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $<
# everything potentially depends on the Makefile since everything potentially
# depends on the options. Some things are more dependent on the Makefile for
# historical reasons.
machdep.o: Makefile
# the following is necessary because autoconf.o depends on #if GENERIC
autoconf.o: Makefile
@ -149,6 +135,9 @@ af.o uipc_proto.o locore.o: Makefile
# depends on KDB (cons.o also depends on GENERIC)
trap.o cons.o: Makefile
# this rule stops ./assym.s in .depend from causing problems
./assym.s: assym.s
assym.s: genassym
./genassym >,assym.s
if cmp -s assym.s ,assym.s; then \
@ -164,9 +153,13 @@ genassym: Makefile
${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
${I386}/i386/genassym.c -static -o genassym
# XXX this assumes that the options for NORMAL_C* and DRIVER_C* are identical.
depend: assym.s param.c vnode_if.h
sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c
sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
mkdep ${COPTS} ${CFILES} ${SYSTEM_CFILES}
mkdep -a -p ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
${I386}/i386/genassym.c
MKDEP_CPP=${CPP} ; export MKDEP_CPP ; \
mkdep -a -I. -DLOCORE ${COPTS} ${SFILES} ${SYSTEM_SFILES}
links:
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
@ -183,9 +176,6 @@ ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \
${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h
${CC} -c ${CFLAGS} ioconf.c
conf.o: ${I386}/i386/conf.c $S/sys/conf.h
${CC} -c ${CFLAGS} ${I386}/i386/conf.c
param.c: $S/conf/param.c
-rm -f param.c
cp $S/conf/param.c .
@ -205,4 +195,3 @@ vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
%RULES
# DO NOT DELETE THIS LINE -- make depend uses it