From 08e4ebbf797bd37f19c30822d3e6c4ebc452a8c1 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Mon, 11 May 1998 07:39:14 +0000 Subject: Lots of changes to make obj dirs and cross-compilation work --- sys/arch/vax/boot/Makefile | 104 ++++++++++++++++++++------------------------ sys/arch/vax/stand/Makefile | 104 ++++++++++++++++++++------------------------ 2 files changed, 92 insertions(+), 116 deletions(-) (limited to 'sys/arch/vax') diff --git a/sys/arch/vax/boot/Makefile b/sys/arch/vax/boot/Makefile index 7ca18d3c5d0..7f05f806240 100644 --- a/sys/arch/vax/boot/Makefile +++ b/sys/arch/vax/boot/Makefile @@ -1,22 +1,30 @@ -# $OpenBSD: Makefile,v 1.8 1998/02/03 11:48:23 maja Exp $ +# $OpenBSD: Makefile,v 1.9 1998/05/11 07:39:13 niklas Exp $ # $NetBSD: Makefile,v 1.14 1997/06/29 21:30:09 ragge Exp $ # -INCPATH=-I. -I../../../../.. -I../../../.. -I../../.. -I../.. -I../../../lib/libsa +S!= cd ${.CURDIR}/../../..; pwd +OBJ!= pwd -CC= cc -AS= as +AR?= ar +AS?= as +CC?= cc +LD?= ld +RANLIB?=ranlib +SIZE?= size +STRIP?= strip BINOWN= bin BINGRP= bin -S= ../../.. + +INCPATH=-nostdinc -I${OBJ} -I${.CURDIR} -I${.CURDIR}/.. -I${S} -I${S}/lib/libsa RELOC= 100000 XXRPB= 0F4240 -CFLAGS+=-O ${INCPATH} -DSTANDALONE -DRELOC=0x${RELOC} -DXXRPB=0x$(XXRPB) +CFLAGS+=-O ${INCPATH} -D_STANDALONE -DRELOC=0x${RELOC} -DXXRPB=0x$(XXRPB) DEVS= autoconf.o hp.o ra.o tmscp.o ctu.o mfm.o rom.o romread.o \ scsi_low.o scsi_hi.o sd.o netio.o if_le.o +SAREL= .include "$S/lib/libsa/Makefile.inc" LIBS= -L. -Llib/sa -lsvax -lsa -lsvax @@ -28,84 +36,64 @@ all: ${LIBSA} xxboot boot copy edlabel includes: libsvax.a: ${SVAX} - ar crv $@ $? - ranlib $@ + ${AR} crv $@ $? + ${RANLIB} $@ urem.o: ../vax/urem.s - ${CC} -x assembler-with-cpp -E ../vax/urem.s | as -o urem.o + ${CC} -x assembler-with-cpp -E ${.CURDIR}/../vax/urem.s | \ + ${AS} -o urem.o udiv.o: ../vax/udiv.s - ${CC} -x assembler-with-cpp -E ../vax/udiv.s | as -o udiv.o + ${CC} -x assembler-with-cpp -E ${.CURDIR}/../vax/udiv.s | \ + ${AS} -o udiv.o str.o: str.s - ${CC} -x assembler-with-cpp -E str.s | as -o str.o + ${CC} -x assembler-with-cpp -E ${.CURDIR}/str.s | ${AS} -o str.o # startups start.o: start.s - ${CC} -x assembler-with-cpp -E start.s | as -o start.o + ${CC} ${CFLAGS} -x assembler-with-cpp -E ${.CURDIR}/start.s | \ + ${AS} -o start.o srt0.o: srt0.s - ${CC} -x assembler-with-cpp -E srt0.s | as -o srt0.o + ${CC} -x assembler-with-cpp -E ${.CURDIR}/srt0.s | ${AS} -o srt0.o # xxboot: start.o bootxx.o romread.o libsvax.a ${SALIB} - ld -N -Ttext ${RELOC} -o a.out start.o bootxx.o romread.o ${LIBS} - @strip a.out - @size a.out + ${LD} -N -Ttext ${RELOC} -o a.out start.o bootxx.o romread.o ${LIBS} + @${STRIP} a.out + @${SIZE} a.out @dd if=a.out of=xxboot bs=32 skip=1 @rm -f a.out -boot: boot.o srt0.o devopen.o conf.o ${DEVS} libsvax.a ${SALIB} vers.o - @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o - ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o boot.o \ +boot: boot.o srt0.o devopen.o conf.o ${DEVS} libsvax.a ${SALIB} + @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | ${AS} -o vers.o + ${LD} -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o boot.o \ conf.o ${DEVS} ${LIBS} vers.o - @strip boot - @size boot + @${STRIP} boot + @${SIZE} boot -edlabel: edlabel.o srt0.o devopen.o conf.o ${DEVS} libsvax.a vers.o - @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o - ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o edlabel.o\ +edlabel: edlabel.o srt0.o devopen.o conf.o ${DEVS} libsvax.a + @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | ${AS} -o vers.o + ${LD} -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o edlabel.o\ conf.o ${DEVS} ${LIBS} vers.o - @strip edlabel - @size edlabel + @${STRIP} edlabel + @${SIZE} edlabel -copy: copy.o srt0.o devopen.o conf.o ${DEVS} libsvax.a vers.o - @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o - ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o copy.o \ +copy: copy.o srt0.o devopen.o conf.o ${DEVS} libsvax.a + @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | ${AS} -o vers.o + ${LD} -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o copy.o \ conf.o ${DEVS} ${LIBS} vers.o - @strip copy - @size copy + @${STRIP} copy + @${SIZE} copy # -hp.o: hp.c - ${CC} -c ${CFLAGS} $*.c - -ra.o: ra.c - ${CC} -c ${CFLAGS} $*.c - -autoconf.o: autoconf.c - ${CC} -c ${CFLAGS} $*.c - -conf.o: conf.c - ${CC} -c ${CFLAGS} $*.c - -boot.o: boot.c - ${CC} -c ${CFLAGS} $*.c - -copy.o: copy.c - ${CC} -c ${CFLAGS} $*.c - romread.o: romread.s - ${CC} -x assembler-with-cpp -E romread.s | as -o romread.o - -init.o: init.c - ${CC} -c ${CFLAGS} $*.c - -bootxx.o: bootxx.c - ${CC} -c ${CFLAGS} $*.c + ${CC} -x assembler-with-cpp -E ${.CURDIR}/romread.s | \ + ${AS} -o romread.o # install: boot xxboot @@ -117,11 +105,11 @@ install: boot xxboot rm -f ${DESTDIR}/usr/mdec/hpboot ln ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/hpboot -clean: +clean:: rm -f start.o romread.o bootxx.o init.o xxboot boot racopy \ libsvax.a udiv.o urem.o consio.o ${DEVS} edlabel edlabel.o rm -f conf.o boot.o rom.o racopy.o srt0.o devopen.o rootcopy.o \ - copy copy.o init.o str.o + copy copy.o init.o str.o vers.o .include diff --git a/sys/arch/vax/stand/Makefile b/sys/arch/vax/stand/Makefile index 7ca18d3c5d0..7f05f806240 100644 --- a/sys/arch/vax/stand/Makefile +++ b/sys/arch/vax/stand/Makefile @@ -1,22 +1,30 @@ -# $OpenBSD: Makefile,v 1.8 1998/02/03 11:48:23 maja Exp $ +# $OpenBSD: Makefile,v 1.9 1998/05/11 07:39:13 niklas Exp $ # $NetBSD: Makefile,v 1.14 1997/06/29 21:30:09 ragge Exp $ # -INCPATH=-I. -I../../../../.. -I../../../.. -I../../.. -I../.. -I../../../lib/libsa +S!= cd ${.CURDIR}/../../..; pwd +OBJ!= pwd -CC= cc -AS= as +AR?= ar +AS?= as +CC?= cc +LD?= ld +RANLIB?=ranlib +SIZE?= size +STRIP?= strip BINOWN= bin BINGRP= bin -S= ../../.. + +INCPATH=-nostdinc -I${OBJ} -I${.CURDIR} -I${.CURDIR}/.. -I${S} -I${S}/lib/libsa RELOC= 100000 XXRPB= 0F4240 -CFLAGS+=-O ${INCPATH} -DSTANDALONE -DRELOC=0x${RELOC} -DXXRPB=0x$(XXRPB) +CFLAGS+=-O ${INCPATH} -D_STANDALONE -DRELOC=0x${RELOC} -DXXRPB=0x$(XXRPB) DEVS= autoconf.o hp.o ra.o tmscp.o ctu.o mfm.o rom.o romread.o \ scsi_low.o scsi_hi.o sd.o netio.o if_le.o +SAREL= .include "$S/lib/libsa/Makefile.inc" LIBS= -L. -Llib/sa -lsvax -lsa -lsvax @@ -28,84 +36,64 @@ all: ${LIBSA} xxboot boot copy edlabel includes: libsvax.a: ${SVAX} - ar crv $@ $? - ranlib $@ + ${AR} crv $@ $? + ${RANLIB} $@ urem.o: ../vax/urem.s - ${CC} -x assembler-with-cpp -E ../vax/urem.s | as -o urem.o + ${CC} -x assembler-with-cpp -E ${.CURDIR}/../vax/urem.s | \ + ${AS} -o urem.o udiv.o: ../vax/udiv.s - ${CC} -x assembler-with-cpp -E ../vax/udiv.s | as -o udiv.o + ${CC} -x assembler-with-cpp -E ${.CURDIR}/../vax/udiv.s | \ + ${AS} -o udiv.o str.o: str.s - ${CC} -x assembler-with-cpp -E str.s | as -o str.o + ${CC} -x assembler-with-cpp -E ${.CURDIR}/str.s | ${AS} -o str.o # startups start.o: start.s - ${CC} -x assembler-with-cpp -E start.s | as -o start.o + ${CC} ${CFLAGS} -x assembler-with-cpp -E ${.CURDIR}/start.s | \ + ${AS} -o start.o srt0.o: srt0.s - ${CC} -x assembler-with-cpp -E srt0.s | as -o srt0.o + ${CC} -x assembler-with-cpp -E ${.CURDIR}/srt0.s | ${AS} -o srt0.o # xxboot: start.o bootxx.o romread.o libsvax.a ${SALIB} - ld -N -Ttext ${RELOC} -o a.out start.o bootxx.o romread.o ${LIBS} - @strip a.out - @size a.out + ${LD} -N -Ttext ${RELOC} -o a.out start.o bootxx.o romread.o ${LIBS} + @${STRIP} a.out + @${SIZE} a.out @dd if=a.out of=xxboot bs=32 skip=1 @rm -f a.out -boot: boot.o srt0.o devopen.o conf.o ${DEVS} libsvax.a ${SALIB} vers.o - @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o - ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o boot.o \ +boot: boot.o srt0.o devopen.o conf.o ${DEVS} libsvax.a ${SALIB} + @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | ${AS} -o vers.o + ${LD} -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o boot.o \ conf.o ${DEVS} ${LIBS} vers.o - @strip boot - @size boot + @${STRIP} boot + @${SIZE} boot -edlabel: edlabel.o srt0.o devopen.o conf.o ${DEVS} libsvax.a vers.o - @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o - ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o edlabel.o\ +edlabel: edlabel.o srt0.o devopen.o conf.o ${DEVS} libsvax.a + @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | ${AS} -o vers.o + ${LD} -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o edlabel.o\ conf.o ${DEVS} ${LIBS} vers.o - @strip edlabel - @size edlabel + @${STRIP} edlabel + @${SIZE} edlabel -copy: copy.o srt0.o devopen.o conf.o ${DEVS} libsvax.a vers.o - @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | as -o vers.o - ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o copy.o \ +copy: copy.o srt0.o devopen.o conf.o ${DEVS} libsvax.a + @date '+_vers: .globl _vers; .asciz ">> NetBSD/vax boot [%y%m%d %H:%M] <<"' | ${AS} -o vers.o + ${LD} -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o copy.o \ conf.o ${DEVS} ${LIBS} vers.o - @strip copy - @size copy + @${STRIP} copy + @${SIZE} copy # -hp.o: hp.c - ${CC} -c ${CFLAGS} $*.c - -ra.o: ra.c - ${CC} -c ${CFLAGS} $*.c - -autoconf.o: autoconf.c - ${CC} -c ${CFLAGS} $*.c - -conf.o: conf.c - ${CC} -c ${CFLAGS} $*.c - -boot.o: boot.c - ${CC} -c ${CFLAGS} $*.c - -copy.o: copy.c - ${CC} -c ${CFLAGS} $*.c - romread.o: romread.s - ${CC} -x assembler-with-cpp -E romread.s | as -o romread.o - -init.o: init.c - ${CC} -c ${CFLAGS} $*.c - -bootxx.o: bootxx.c - ${CC} -c ${CFLAGS} $*.c + ${CC} -x assembler-with-cpp -E ${.CURDIR}/romread.s | \ + ${AS} -o romread.o # install: boot xxboot @@ -117,11 +105,11 @@ install: boot xxboot rm -f ${DESTDIR}/usr/mdec/hpboot ln ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/hpboot -clean: +clean:: rm -f start.o romread.o bootxx.o init.o xxboot boot racopy \ libsvax.a udiv.o urem.o consio.o ${DEVS} edlabel edlabel.o rm -f conf.o boot.o rom.o racopy.o srt0.o devopen.o rootcopy.o \ - copy copy.o init.o str.o + copy copy.o init.o str.o vers.o .include -- cgit v1.2.3