Change BINFORMAT to KERNFORMAT and add -aout or -elf to the tool

arguments as appropriate. This is necessary because setting OBJFORMAT=aout
in the makefile doesn't get exported to the environment. I wish our
make could do that!
This commit is contained in:
John Birrell 1998-09-01 00:11:02 +00:00
parent 04df7eaa71
commit c155091cc8
3 changed files with 75 additions and 51 deletions

View File

@ -1,7 +1,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.118 1998/08/24 06:42:26 bde Exp $
# $Id: Makefile.i386,v 1.119 1998/08/31 11:43:26 jb Exp $
#
# Makefile for FreeBSD
#
@ -19,10 +19,7 @@
# Which version of config(8) is required.
%VERSREQ= 300005
OBJFORMAT= aout
BINFORMAT?= aout
#BINFORMAT?= aoutkld
#BINFORMAT?= elf
KERNFORMAT?= aout
STD8X16FONT?= iso
@ -43,6 +40,17 @@ INCLUDES+= -I/usr/include
.endif
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
# Select the correct set of tools. Can't set OBJFORMAT here because it
# doesn't get exported into the environment.
.if ${KERNFORMAT} == "elf"
CFLAGS+= -elf
AFLAGS= -elf
.else
CFLAGS+= -aout
AFLAGS= -aout
.endif
LOAD_ADDRESS?= F0100000
DEFINED_PROF= ${PROF}
.if defined(PROF)
@ -56,10 +64,10 @@ PROF+= -mprofiler-epilogue
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
NORMAL_S= ${CC} -c -x assembler-with-cpp -DLOCORE ${COPTS} $<
NORMAL_S= ${CC} -c ${AFLAGS} -x assembler-with-cpp -DLOCORE ${COPTS} $<
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_S= ${CC} -c -x assembler-with-cpp -DLOCORE ${COPTS} $<
DRIVER_S= ${CC} -c ${AFLAGS} -x assembler-with-cpp -DLOCORE ${COPTS} $<
PROFILE_C= ${CC} -c ${CFLAGS} $<
# ${I386}/i386/setdef0.c and ${I386}/i386/setdef1.c are intentionally
@ -73,26 +81,26 @@ SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${SYSTEM_OBJS}
SYMORDER_EXCLUDE=-x symbols.exclude
.endif
SYSTEM_LD_HEAD= @echo loading ${.TARGET}; rm -f ${.TARGET}
.if ${BINFORMAT} == aout
.if ${KERNFORMAT} == aout
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o
SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD= @${LD} -aout -Bstatic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @echo rearranging symbols; \
symorder -m ${SYMORDER_EXCLUDE} symbols.sort ${.TARGET}; \
size ${.TARGET} ; chmod 755 ${.TARGET}
size -aout ${.TARGET} ; chmod 755 ${.TARGET}
.endif
.if ${BINFORMAT} == aoutkld
.if ${KERNFORMAT} == aoutkld
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o
SYSTEM_LD= @${LD} -Bforcedynamic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD= @${LD} -aout -Bforcedynamic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @echo rearranging symbols; \
symorder -m ${SYMORDER_EXCLUDE} symbols.sort ${.TARGET}; \
size ${.TARGET} ; chmod 755 ${.TARGET}
size -aout ${.TARGET} ; chmod 755 ${.TARGET}
.endif
.if ${BINFORMAT} == elf
.if ${KERNFORMAT} == elf
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
setdef1.o
SYSTEM_LD= @${LD} -Bstatic -Ttext ${LOAD_ADDRESS} -e btext -defsym _DYNAMIC=0 \
SYSTEM_LD= @${LD} -elf -Bstatic -Ttext ${LOAD_ADDRESS} -e btext -defsym _DYNAMIC=0 \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @size ${.TARGET} ; chmod 755 ${.TARGET}
SYSTEM_LD_TAIL= @size -elf ${.TARGET} ; chmod 755 ${.TARGET}
.endif
%BEFORE_DEPEND
@ -163,7 +171,7 @@ depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND}
rm -f .newdep
mkdep -a -f .newdep ${COPTS} ${CFILES} ${SYSTEM_CFILES}
mkdep -a -f .newdep ${COPTS} -UKERNEL ${I386}/i386/genassym.c
MKDEP_CPP="${CC} -E -x assembler-with-cpp" ; export MKDEP_CPP ; \
MKDEP_CPP="${CC} -E ${AFLAGS} -x assembler-with-cpp" ; export MKDEP_CPP ; \
mkdep -a -f .newdep -DLOCORE ${COPTS} ${SFILES} ${SYSTEM_SFILES}
rm -f .depend
mv -f .newdep .depend

View File

@ -1,7 +1,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.118 1998/08/24 06:42:26 bde Exp $
# $Id: Makefile.i386,v 1.119 1998/08/31 11:43:26 jb Exp $
#
# Makefile for FreeBSD
#
@ -19,10 +19,7 @@
# Which version of config(8) is required.
%VERSREQ= 300005
OBJFORMAT= aout
BINFORMAT?= aout
#BINFORMAT?= aoutkld
#BINFORMAT?= elf
KERNFORMAT?= aout
STD8X16FONT?= iso
@ -43,6 +40,17 @@ INCLUDES+= -I/usr/include
.endif
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
# Select the correct set of tools. Can't set OBJFORMAT here because it
# doesn't get exported into the environment.
.if ${KERNFORMAT} == "elf"
CFLAGS+= -elf
AFLAGS= -elf
.else
CFLAGS+= -aout
AFLAGS= -aout
.endif
LOAD_ADDRESS?= F0100000
DEFINED_PROF= ${PROF}
.if defined(PROF)
@ -56,10 +64,10 @@ PROF+= -mprofiler-epilogue
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
NORMAL_S= ${CC} -c -x assembler-with-cpp -DLOCORE ${COPTS} $<
NORMAL_S= ${CC} -c ${AFLAGS} -x assembler-with-cpp -DLOCORE ${COPTS} $<
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_S= ${CC} -c -x assembler-with-cpp -DLOCORE ${COPTS} $<
DRIVER_S= ${CC} -c ${AFLAGS} -x assembler-with-cpp -DLOCORE ${COPTS} $<
PROFILE_C= ${CC} -c ${CFLAGS} $<
# ${I386}/i386/setdef0.c and ${I386}/i386/setdef1.c are intentionally
@ -73,26 +81,26 @@ SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${SYSTEM_OBJS}
SYMORDER_EXCLUDE=-x symbols.exclude
.endif
SYSTEM_LD_HEAD= @echo loading ${.TARGET}; rm -f ${.TARGET}
.if ${BINFORMAT} == aout
.if ${KERNFORMAT} == aout
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o
SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD= @${LD} -aout -Bstatic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @echo rearranging symbols; \
symorder -m ${SYMORDER_EXCLUDE} symbols.sort ${.TARGET}; \
size ${.TARGET} ; chmod 755 ${.TARGET}
size -aout ${.TARGET} ; chmod 755 ${.TARGET}
.endif
.if ${BINFORMAT} == aoutkld
.if ${KERNFORMAT} == aoutkld
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o
SYSTEM_LD= @${LD} -Bforcedynamic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD= @${LD} -aout -Bforcedynamic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @echo rearranging symbols; \
symorder -m ${SYMORDER_EXCLUDE} symbols.sort ${.TARGET}; \
size ${.TARGET} ; chmod 755 ${.TARGET}
size -aout ${.TARGET} ; chmod 755 ${.TARGET}
.endif
.if ${BINFORMAT} == elf
.if ${KERNFORMAT} == elf
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
setdef1.o
SYSTEM_LD= @${LD} -Bstatic -Ttext ${LOAD_ADDRESS} -e btext -defsym _DYNAMIC=0 \
SYSTEM_LD= @${LD} -elf -Bstatic -Ttext ${LOAD_ADDRESS} -e btext -defsym _DYNAMIC=0 \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @size ${.TARGET} ; chmod 755 ${.TARGET}
SYSTEM_LD_TAIL= @size -elf ${.TARGET} ; chmod 755 ${.TARGET}
.endif
%BEFORE_DEPEND
@ -163,7 +171,7 @@ depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND}
rm -f .newdep
mkdep -a -f .newdep ${COPTS} ${CFILES} ${SYSTEM_CFILES}
mkdep -a -f .newdep ${COPTS} -UKERNEL ${I386}/i386/genassym.c
MKDEP_CPP="${CC} -E -x assembler-with-cpp" ; export MKDEP_CPP ; \
MKDEP_CPP="${CC} -E ${AFLAGS} -x assembler-with-cpp" ; export MKDEP_CPP ; \
mkdep -a -f .newdep -DLOCORE ${COPTS} ${SFILES} ${SYSTEM_SFILES}
rm -f .depend
mv -f .newdep .depend

View File

@ -1,7 +1,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.118 1998/08/24 06:42:26 bde Exp $
# $Id: Makefile.i386,v 1.119 1998/08/31 11:43:26 jb Exp $
#
# Makefile for FreeBSD
#
@ -19,10 +19,7 @@
# Which version of config(8) is required.
%VERSREQ= 300005
OBJFORMAT= aout
BINFORMAT?= aout
#BINFORMAT?= aoutkld
#BINFORMAT?= elf
KERNFORMAT?= aout
STD8X16FONT?= iso
@ -43,6 +40,17 @@ INCLUDES+= -I/usr/include
.endif
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
# Select the correct set of tools. Can't set OBJFORMAT here because it
# doesn't get exported into the environment.
.if ${KERNFORMAT} == "elf"
CFLAGS+= -elf
AFLAGS= -elf
.else
CFLAGS+= -aout
AFLAGS= -aout
.endif
LOAD_ADDRESS?= F0100000
DEFINED_PROF= ${PROF}
.if defined(PROF)
@ -56,10 +64,10 @@ PROF+= -mprofiler-epilogue
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
NORMAL_S= ${CC} -c -x assembler-with-cpp -DLOCORE ${COPTS} $<
NORMAL_S= ${CC} -c ${AFLAGS} -x assembler-with-cpp -DLOCORE ${COPTS} $<
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_S= ${CC} -c -x assembler-with-cpp -DLOCORE ${COPTS} $<
DRIVER_S= ${CC} -c ${AFLAGS} -x assembler-with-cpp -DLOCORE ${COPTS} $<
PROFILE_C= ${CC} -c ${CFLAGS} $<
# ${I386}/i386/setdef0.c and ${I386}/i386/setdef1.c are intentionally
@ -73,26 +81,26 @@ SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${SYSTEM_OBJS}
SYMORDER_EXCLUDE=-x symbols.exclude
.endif
SYSTEM_LD_HEAD= @echo loading ${.TARGET}; rm -f ${.TARGET}
.if ${BINFORMAT} == aout
.if ${KERNFORMAT} == aout
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o
SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD= @${LD} -aout -Bstatic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @echo rearranging symbols; \
symorder -m ${SYMORDER_EXCLUDE} symbols.sort ${.TARGET}; \
size ${.TARGET} ; chmod 755 ${.TARGET}
size -aout ${.TARGET} ; chmod 755 ${.TARGET}
.endif
.if ${BINFORMAT} == aoutkld
.if ${KERNFORMAT} == aoutkld
SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o
SYSTEM_LD= @${LD} -Bforcedynamic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD= @${LD} -aout -Bforcedynamic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @echo rearranging symbols; \
symorder -m ${SYMORDER_EXCLUDE} symbols.sort ${.TARGET}; \
size ${.TARGET} ; chmod 755 ${.TARGET}
size -aout ${.TARGET} ; chmod 755 ${.TARGET}
.endif
.if ${BINFORMAT} == elf
.if ${KERNFORMAT} == elf
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
setdef1.o
SYSTEM_LD= @${LD} -Bstatic -Ttext ${LOAD_ADDRESS} -e btext -defsym _DYNAMIC=0 \
SYSTEM_LD= @${LD} -elf -Bstatic -Ttext ${LOAD_ADDRESS} -e btext -defsym _DYNAMIC=0 \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
SYSTEM_LD_TAIL= @size ${.TARGET} ; chmod 755 ${.TARGET}
SYSTEM_LD_TAIL= @size -elf ${.TARGET} ; chmod 755 ${.TARGET}
.endif
%BEFORE_DEPEND
@ -163,7 +171,7 @@ depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND}
rm -f .newdep
mkdep -a -f .newdep ${COPTS} ${CFILES} ${SYSTEM_CFILES}
mkdep -a -f .newdep ${COPTS} -UKERNEL ${I386}/i386/genassym.c
MKDEP_CPP="${CC} -E -x assembler-with-cpp" ; export MKDEP_CPP ; \
MKDEP_CPP="${CC} -E ${AFLAGS} -x assembler-with-cpp" ; export MKDEP_CPP ; \
mkdep -a -f .newdep -DLOCORE ${COPTS} ${SFILES} ${SYSTEM_SFILES}
rm -f .depend
mv -f .newdep .depend