Home | History | Annotate | Line # | Download | only in boot
Makefile revision 1.1
      1 #	$NetBSD: Makefile,v 1.1 1995/02/13 00:41:04 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
     12 MACH=	-DVAX750
     13 
     14 DRIVERS=autoconf.c hp.c hpmaptype.c ht.c idc.c kdb.c mba.c mt.c qdcons.c \
     15 	qvcons.c rk.c rl.c tm.c tmscp.c ts.c uba.c uda.c up.c upmaptype.c \
     16 	ut.c
     17 DEVS=	autoconf.o hp.o
     18 LIBS=	libsa.a libkern.a libsvax.a
     19 
     20 all:	boot
     21 
     22 libsa.a: ../../../lib/libsa/libsa.a
     23 	cd ../../../lib/libsa; rm -f machine; \
     24 	ln -s ../../arch/vax/include machine;make
     25 	ln -s ../../../lib/libsa/libsa.a
     26 
     27 libkern.a: ../../../lib/libkern/libkern.a
     28 	cd ../../../lib/libkern; make
     29 	ln -s ../../../lib/libkern/libkern.a
     30 
     31 libsvax.a: consio.o urem.o udiv.o
     32 	ar crv $@ $?
     33 	ranlib $@
     34 
     35 urem.o:	../vax/urem.s
     36 	${CC} -x assembler-with-cpp -E ../vax/urem.s | as -o urem.o
     37 
     38 udiv.o:	../vax/udiv.s
     39 	${CC} -x assembler-with-cpp -E ../vax/udiv.s | as -o udiv.o
     40 
     41 # startups
     42 
     43 srt0.o:	srt0.s
     44 	${CC} -x assembler-with-cpp -E -DREL srt0.s | as -o srt0.o
     45 
     46 
     47 boot:	boot.o srt0.o devopen.o conf.o ${DEVS} ${LIBS} 
     48 	ld -N -T ${RELOC} -e nisse -o $@ srt0.o devopen.o boot.o \
     49 	conf.o ${DEVS} ${LIBS}
     50 	@strip boot
     51 	@size boot
     52 
     53 hp.o:	hp.c
     54 	${CC} -c ${CFLAGS} $*.c
     55 
     56 autoconf.o:	autoconf.c
     57 	${CC} -c ${CFLAGS} $*.c
     58 
     59 conf.o:	conf.c
     60 	${CC} -c ${CFLAGS} $*.c
     61 
     62 boot.o:	boot.c
     63 	${CC} -c ${CFLAGS} $*.c
     64 
     65 install:
     66 	install -c -s -o bin -g bin -m 644 \
     67 	    format cat copy drtest ls ${DESTDIR}/stand
     68 	[ -d ../vaxdist/tp ] || mkdir ../vaxdist/tp
     69 	cp tpcopy ../vaxdist/tp/copy
     70 	cp tpboot ../vaxdist/tp/boot
     71 	cp tpformat ../vaxdist/tp/format
     72 	cp boot a.out; strip a.out; \
     73 		dd if=a.out of=../floppy/boot bs=32 skip=1; rm a.out
     74 	cp 730boot a.out; strip a.out; \
     75 		dd if=a.out of=../cassette/boot.730 bs=32 skip=1; rm a.out
     76 	cp ../floppy/boot ../cassette/boot.750
     77 	cp ../floppy/boot ../consolerl/boot
     78 	cp copy a.out; strip a.out; \
     79 		dd if=a.out of=../floppy/copy bs=32 skip=1; rm a.out
     80 	cp 730copy a.out; strip a.out; \
     81 		dd if=a.out of=../cassette/copy.730 bs=32 skip=1; rm a.out
     82 	cp ../floppy/copy ../cassette/copy.750
     83 	cp ../floppy/copy ../consolerl/copy
     84 	cp format a.out; strip a.out; \
     85 		dd if=a.out of=../floppy/format bs=32 skip=1; rm a.out
     86 	cp 730format a.out; strip a.out; \
     87 		dd if=a.out of=../cassette/format.730 bs=32 skip=1; rm a.out
     88 	cp ../floppy/format ../cassette/format.750
     89 	cp ../floppy/format ../consolerl/format
     90 	cp drtest a.out; strip a.out; \
     91 		dd if=a.out of=../floppy/drtest bs=32 skip=1; rm a.out
     92 	cp 730drtest a.out; strip a.out; \
     93 		dd if=a.out of=../cassette/drtest.730 bs=32 skip=1; rm a.out
     94 	cp ../floppy/drtest ../cassette/drtest.750
     95 	cp ../floppy/drtest ../consolerl/drtest
     96 	install -c -o bin -g bin -m 444 ${MDEC} ${DESTDIR}/usr/mdec
     97 	rm -f ${DESTDIR}/usr/mdec/bootrd
     98 	ln ${DESTDIR}/usr/mdec/bootra ${DESTDIR}/usr/mdec/bootrd
     99 
    100 lint: ${SRCS}
    101 	lint ${COPTS} -hxbn boot.c ${SRCS} | \
    102 	    sed -e '/possible pointer alignment/d' \
    103 		-e '/struct\/union .* never defined/d'
    104 
    105 tags: ${SRCS}
    106 	ctags ${SRCS} ${DUMMIES}
    107