diff options
Diffstat (limited to 'sys/pc98/conf/Makefile.pc98')
-rw-r--r-- | sys/pc98/conf/Makefile.pc98 | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/sys/pc98/conf/Makefile.pc98 b/sys/pc98/conf/Makefile.pc98 index 2af7819343922..f6ba1b258a01d 100644 --- a/sys/pc98/conf/Makefile.pc98 +++ b/sys/pc98/conf/Makefile.pc98 @@ -3,7 +3,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.pc98,v 1.51 1999/01/18 11:00:29 kato Exp $ +# $Id: Makefile.pc98,v 1.41 1998/10/05 08:57:17 kato Exp $ # # Makefile for FreeBSD # @@ -19,9 +19,9 @@ # # Which version of config(8) is required. -%VERSREQ= 300009 +%VERSREQ= 300007 -KERNFORMAT?= elf +KERNFORMAT?= aout #STD8X16FONT?= iso @@ -77,8 +77,8 @@ DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} $< DRIVER_S= ${CC} -c -x ${ASM_CFLAGS} $< PROFILE_C= ${CC} -c ${CFLAGS} $< -GEN_CFILES= ${I386}/i386/genassym.c -# setdef0.c and setdef1.c are intentionally +GEN_CFILES= ${I386}/i386/genassym.c ${I386}/i386/gensetdefs.c +# ${I386}/i386/setdef0.c and ${I386}/i386/setdef1.c are intentionally # omitted from SYSTEM_CFILES. They include setdefs.h, a header which # is generated from all of ${OBJS}. We don't want to have to compile # everything just to do a make depend. @@ -89,7 +89,14 @@ 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 ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld +.if ${KERNFORMAT} == aout +SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.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 -aout ${.TARGET} ; chmod 755 ${.TARGET} +.endif +.if ${KERNFORMAT} == aoutkld SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} ioconf.o param.o config.o SYSTEM_LD= @${LD} -aout -Bforcedynamic -Z -T ${LOAD_ADDRESS} -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o SYSTEM_LD_TAIL= @echo rearranging symbols; \ @@ -97,8 +104,9 @@ SYSTEM_LD_TAIL= @echo rearranging symbols; \ size -aout ${.TARGET} ; chmod 755 ${.TARGET} .endif .if ${KERNFORMAT} == elf +# kld compatable export of symbols. SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \ - setdef1.o hack.So + setdef1.o hack.so SYSTEM_LD= @${LD} -elf -Bdynamic -T $S/i386/conf/kernel.script \ -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o @@ -120,14 +128,9 @@ SYSTEM_DEP+= $S/i386/conf/kernel.script %CLEAN -.if !exists(.depend) -${SYSTEM_OBJS}: ${BEFORE_DEPEND:M*.h} -.endif - clean: - rm -f *.o *.so *.So *.ko *.s eddep errs genassym gensetdefs \ - kernel linterrs makelinks param.c setdef[01].c setdefs.h \ - symbols.exclude symbols.sort tags \ + rm -f *.o *.so *.ko *.s eddep errs genassym gensetdefs kernel linterrs \ + makelinks param.c setdefs.h symbols.exclude symbols.sort tags \ vers.c vnode_if.c vnode_if.h ${CLEAN} #lint: /tmp param.c @@ -151,21 +154,26 @@ locore.o: ${I386}/i386/locore.s assym.s # This is a hack. BFD "optimizes" away dynamic mode if there are no # dynamic references. We could probably do a '-Bforcedynamic' mode like # in the a.out ld. For now, this works. -hack.So: Makefile +hack.so: Makefile touch hack.c - ${CC} -elf -shared -nostdlib hack.c -o hack.So + ${CC} -elf -shared -nostdlib hack.c -o hack.so rm -f hack.c .endif -setdef0.o: setdef0.c setdefs.h +setdef0.o: ${I386}/i386/setdef0.c setdefs.h ${NORMAL_C} -setdef1.o: setdef1.c setdefs.h +setdef1.o: ${I386}/i386/setdef1.c setdefs.h ${NORMAL_C} -setdef0.c setdef1.c setdefs.h: ${OBJS} - @echo generating linker set emulation glue for ELF - @gensetdefs ${OBJS} +setdefs.h: gensetdefs ${OBJS} + ./gensetdefs ${OBJS} >setdefs.h + +gensetdefs: gensetdefs.o + ${CC} ${GEN_CFLAGS} gensetdefs.o -o ${.TARGET} + +gensetdefs.o: ${I386}/i386/gensetdefs.c + ${CC} -c ${GEN_CFLAGS} ${I386}/i386/gensetdefs.c # this rule stops ./assym.s in .depend from causing problems ./assym.s: assym.s @@ -180,7 +188,7 @@ genassym.o: ${I386}/i386/genassym.c genassym: genassym.o ${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET} -${SYSTEM_OBJS} genassym.o vers.o: opt_global.h +${SYSTEM_OBJS} genassym.o gensetdefs.o vers.o: opt_global.h # XXX this assumes that the options for NORMAL_C* and DRIVER_C* are identical. depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} @@ -211,16 +219,6 @@ install: echo "You must first build your kernel before trying to install." ; \ exit 1 ; \ fi -.if ${KERNFORMAT} == "elf" && !defined(FORCE) - @if [ -f /kernel -a "`file /kernel 2>/dev/null | grep ELF`" = "" ]; then \ - echo "WARNING: You are about to install an ELF kernel for the first time!" ; \ - echo "Please be sure you have upgraded your bootblocks and/or /boot/loader so" ; \ - echo "that you can boot it. Old bootblocks WILL NOT WORK! Please read:" ; \ - echo "http://www.freebsd.org/~peter/elfday.html for information." ; \ - echo "If you are satisfied you can boot an ELF kernel, type: make -DFORCE install" ; \ - exit 1 ; \ - fi -.endif .if exists(${DESTDIR}/kernel) chflags noschg ${DESTDIR}/kernel mv ${DESTDIR}/kernel ${DESTDIR}/kernel.old |