NetBSD/sys/arch/vax/boot/Makefile

96 lines
2.0 KiB
Makefile
Raw Normal View History

1995-03-30 01:23:59 +04:00
# $NetBSD: Makefile,v 1.2 1995/03/29 21:24:01 ragge Exp $
1995-02-13 03:41:04 +03:00
#
INCPATH=-I. -I../../.. -I../.. -I../../../lib/libsa
CC= cc
AS= as
RELOC= 100000
1995-03-30 01:23:59 +04:00
CFLAGS= -O ${INCPATH} -DSTANDALONE -DRELOC=0x${RELOC}
1995-02-13 03:41:04 +03:00
MACH= -DVAX750
1995-03-30 01:23:59 +04:00
DEVS= autoconf.o hp.o ra.o
LIBS= libsa.a libsvax.a libkern.a
1995-02-13 03:41:04 +03:00
1995-03-30 01:23:59 +04:00
all: boot xxboot bootxx
1995-02-13 03:41:04 +03:00
libsa.a: ../../../lib/libsa/libsa.a
1995-03-30 01:23:59 +04:00
@rm -f libsa.a
1995-02-13 03:41:04 +03:00
cd ../../../lib/libsa; rm -f machine; \
ln -s ../../arch/vax/include machine;make
1995-03-30 01:23:59 +04:00
@ln -s ../../../lib/libsa/libsa.a .
1995-02-13 03:41:04 +03:00
libkern.a: ../../../lib/libkern/libkern.a
1995-03-30 01:23:59 +04:00
@rm -f libkern.a
1995-02-13 03:41:04 +03:00
cd ../../../lib/libkern; make
1995-03-30 01:23:59 +04:00
@ln -s ../../../lib/libkern/libkern.a .
1995-02-13 03:41:04 +03:00
libsvax.a: consio.o urem.o udiv.o
ar crv $@ $?
ranlib $@
urem.o: ../vax/urem.s
${CC} -x assembler-with-cpp -E ../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
# startups
srt0.o: srt0.s
${CC} -x assembler-with-cpp -E -DREL srt0.s | as -o srt0.o
boot: boot.o srt0.o devopen.o conf.o ${DEVS} ${LIBS}
ld -N -T ${RELOC} -e nisse -o $@ srt0.o devopen.o boot.o \
conf.o ${DEVS} ${LIBS}
@strip boot
@size boot
hp.o: hp.c
${CC} -c ${CFLAGS} $*.c
1995-03-30 01:23:59 +04:00
ra.o: ra.c
${CC} -c ${CFLAGS} $*.c
1995-02-13 03:41:04 +03:00
autoconf.o: autoconf.c
${CC} -c ${CFLAGS} $*.c
conf.o: conf.c
${CC} -c ${CFLAGS} $*.c
boot.o: boot.c
${CC} -c ${CFLAGS} $*.c
1995-03-30 01:23:59 +04:00
bootblocks: start.o bootxx.o init.o romread.o ${LIBS}
ld -N -T ${RELOC} -o a.out start.o bootxx.o init.o romread.o ${LIBS}
@strip a.out
@size a.out
@dd if=a.out of=bootblocks bs=32 skip=1
@rm -f a.out
xxboot: bootblocks
dd if=bootblocks of=xxboot bs=512 count=1
bootxx: bootblocks
dd if=bootblocks of=bootxx bs=512 skip=1
start.o: start.s
${CC} -x assembler-with-cpp -E start.s | as -o start.o
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
clean:
rm -f start.o romread.o bootxx.o init.o xxboot bootxx bootblocks \
libsvax.a libsa.a libkern.a udiv.o urem.o consio.o
rm -f autoconf.o conf.o boot.o hp.o boot srt0.o devopen.o