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