1995-12-28 18:27:21 +03:00
|
|
|
# $NetBSD: Makefile,v 1.6 1995/12/28 15:27:21 ragge Exp $
|
1995-02-13 03:41:04 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
INCPATH=-I. -I../../.. -I../.. -I../../../lib/libsa
|
1995-12-28 18:27:21 +03:00
|
|
|
.PATH: ${.CURDIR}/../../../lib/libkern
|
1995-02-13 03:41:04 +03:00
|
|
|
|
|
|
|
CC= cc
|
|
|
|
AS= as
|
|
|
|
|
1995-09-16 17:18:27 +04:00
|
|
|
S= ../../..
|
1995-02-13 03:41:04 +03:00
|
|
|
RELOC= 100000
|
1995-09-16 17:18:27 +04:00
|
|
|
CFLAGS+=-O ${INCPATH} -DSTANDALONE -DRELOC=0x${RELOC} -D_VAX_INLINE_
|
1995-02-13 03:41:04 +03:00
|
|
|
|
1995-09-16 17:18:27 +04:00
|
|
|
DEVS= autoconf.o hp.o ra.o tmscp.o
|
1995-02-13 03:41:04 +03:00
|
|
|
|
1995-12-28 18:27:21 +03:00
|
|
|
LIBKERN=libkern.a
|
|
|
|
KERNOBJ=__main.o strlen.o strcmp.o strncmp.o strncpy.o min.o strcpy.o
|
1995-04-25 18:14:19 +04:00
|
|
|
|
1995-09-16 17:18:27 +04:00
|
|
|
.include "$S/lib/libsa/Makefile.inc"
|
1995-10-20 16:35:41 +03:00
|
|
|
LIBSA= ${SALIB}
|
1995-02-13 03:41:04 +03:00
|
|
|
|
1995-09-16 17:18:27 +04:00
|
|
|
all: xxboot boot copy edlabel
|
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
|
|
|
|
|
1995-09-16 17:18:27 +04:00
|
|
|
start.o: start.s
|
|
|
|
${CC} -x assembler-with-cpp -E start.s | as -o start.o
|
|
|
|
|
1995-02-13 03:41:04 +03:00
|
|
|
srt0.o: srt0.s
|
1995-09-16 17:18:27 +04:00
|
|
|
${CC} -x assembler-with-cpp -E srt0.s | as -o srt0.o
|
1995-02-13 03:41:04 +03:00
|
|
|
|
1995-09-16 17:18:27 +04:00
|
|
|
#
|
1995-02-13 03:41:04 +03:00
|
|
|
|
1995-09-16 17:18:27 +04:00
|
|
|
xxboot: start.o bootxx.o romread.o ${LIBSA} ${LIBKERN} libsvax.a
|
|
|
|
ld -N -Ttext ${RELOC} -o a.out start.o bootxx.o romread.o \
|
|
|
|
${LIBSA} ${LIBKERN} libsvax.a
|
|
|
|
@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} ${LIBKERN} ${LIBSA} libsvax.a
|
|
|
|
ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o boot.o \
|
|
|
|
conf.o ${DEVS} ${LIBSA} ${LIBKERN} libsvax.a
|
1995-02-13 03:41:04 +03:00
|
|
|
@strip boot
|
|
|
|
@size boot
|
|
|
|
|
1995-09-16 17:18:27 +04:00
|
|
|
edlabel: edlabel.o srt0.o devopen.o conf.o ${DEVS} ${LIBKERN} ${LIBSA} libsvax.a
|
|
|
|
ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o edlabel.o\
|
|
|
|
conf.o ${DEVS} ${LIBSA} ${LIBKERN} libsvax.a
|
|
|
|
@strip edlabel
|
|
|
|
@size edlabel
|
|
|
|
|
|
|
|
copy: copy.o srt0.o devopen.o conf.o ${DEVS} ${LIBKERN} ${LIBSA} libsvax.a
|
|
|
|
ld -N -Ttext ${RELOC} -e nisse -o $@ srt0.o devopen.o copy.o \
|
|
|
|
conf.o ${DEVS} ${LIBSA} ${LIBKERN} libsvax.a
|
|
|
|
@strip copy
|
|
|
|
@size copy
|
|
|
|
|
|
|
|
#
|
|
|
|
|
1995-02-13 03:41:04 +03:00
|
|
|
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-09-16 17:18:27 +04:00
|
|
|
copy.o: copy.c
|
|
|
|
${CC} -c ${CFLAGS} $*.c
|
1995-03-30 01:23:59 +04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
1995-12-28 18:27:21 +03:00
|
|
|
#
|
|
|
|
libkern.a: ${KERNOBJ}
|
|
|
|
@echo Creating standalone kern library
|
|
|
|
@ar rv libkern.a `lorder ${KERNOBJ} | tsort`
|
|
|
|
|
|
|
|
#
|
1995-09-16 17:18:27 +04:00
|
|
|
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
|
|
|
|
|