Home | History | Annotate | Line # | Download | only in boot
Makefile revision 1.3
      1 #	$NetBSD: Makefile,v 1.3 1995/04/25 14:14:19 ragge Exp $
      2 #
      3 
      4 INCPATH=-I. -I../../.. -I../.. -I../../../lib/libsa
      5 
      6 CC=	cc
      7 AS=	as
      8 
      9 RELOC=	100000
     10 VAXTYP=	-DVAX750 -DVAX630
     11 CFLAGS=	-O ${INCPATH} -DSTANDALONE -DRELOC=0x${RELOC}
     12 MACH=	-DVAX750
     13 
     14 DEVS=	autoconf.o hp.o ra.o
     15 LIBS=	libsa.a libsvax.a libkern.a
     16 
     17 all:	boot xxboot
     18 
     19 machine:
     20 	ln -s ../include machine
     21 
     22 libsa.a: ../../../lib/libsa/libsa.a
     23 	@rm -f libsa.a
     24 	cd ../../../lib/libsa; rm -f machine; \
     25 	ln -s ../../arch/vax/include machine;make
     26 	@ln -s ../../../lib/libsa/libsa.a .
     27 
     28 libkern.a: ../../../lib/libkern/libkern.a
     29 	@rm -f libkern.a
     30 	cd ../../../lib/libkern; make
     31 	@ln -s ../../../lib/libkern/libkern.a .
     32 
     33 libsvax.a: consio.o urem.o udiv.o
     34 	ar crv $@ $?
     35 	ranlib $@
     36 
     37 urem.o:	../vax/urem.s
     38 	${CC} -x assembler-with-cpp -E ../vax/urem.s | as -o urem.o
     39 
     40 udiv.o:	../vax/udiv.s
     41 	${CC} -x assembler-with-cpp -E ../vax/udiv.s | as -o udiv.o
     42 
     43 # startups
     44 
     45 srt0.o:	srt0.s
     46 	${CC} -x assembler-with-cpp -E -DREL srt0.s | as -o srt0.o
     47 
     48 
     49 boot:	boot.o srt0.o devopen.o conf.o ${DEVS} ${LIBS} machine
     50 	ld -N -T ${RELOC} -e nisse -o $@ srt0.o devopen.o boot.o \
     51 	conf.o ${DEVS} ${LIBS}
     52 	@strip boot
     53 	@size boot
     54 
     55 hp.o:	hp.c
     56 	${CC} -c ${CFLAGS} $*.c
     57 
     58 ra.o:	ra.c
     59 	${CC} -c ${CFLAGS} $*.c
     60 
     61 autoconf.o:	autoconf.c
     62 	${CC} -c ${CFLAGS} $*.c
     63 
     64 conf.o:	conf.c
     65 	${CC} -c ${CFLAGS} $*.c
     66 
     67 boot.o:	boot.c
     68 	${CC} -c ${CFLAGS} $*.c
     69 
     70 xxboot:	start.o bootxx.o init.o romread.o ${LIBS} machine
     71 	ld -N -T ${RELOC} -o a.out start.o bootxx.o init.o romread.o ${LIBS}
     72 	@strip a.out
     73 	@size a.out
     74 	@dd if=a.out of=xxboot bs=32 skip=1
     75 	@rm -f a.out
     76 
     77 start.o: start.s
     78 	${CC} -x assembler-with-cpp -E start.s | as -o start.o
     79 
     80 romread.o:	romread.s
     81 	${CC} -x assembler-with-cpp -E romread.s | as -o romread.o
     82 
     83 init.o:	init.c
     84 	${CC} -c ${CFLAGS} $*.c
     85 
     86 bootxx.o: bootxx.c 
     87 	${CC} -c ${CFLAGS} $*.c
     88 
     89 clean:
     90 	rm -f start.o romread.o bootxx.o init.o xxboot bootxx bootblocks \
     91 	libsvax.a libsa.a libkern.a udiv.o urem.o consio.o machine
     92 	rm -f autoconf.o conf.o boot.o hp.o boot srt0.o devopen.o
     93