Home | History | Annotate | Line # | Download | only in stand
Makefile revision 1.22
      1 #	$NetBSD: Makefile,v 1.22 1996/10/18 06:03:25 thorpej Exp $
      2 
      3 #	@(#)Makefile	8.1 (Berkeley) 6/10/93
      4 
      5 NOPROG=	noprog
      6 NOMAN=	noman
      7 
      8 # RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long
      9 RELOC=	FFF00000
     10 
     11 CONS=	-DDCACONSOLE -DITECONSOLE -DDCMCONSOLE
     12 DEFS=	-DSTANDALONE -DCOMPAT_NOLABEL ${CONS} -Dhp300 # -DROMPRF
     13 #DEFS+=	-DNETIF_DEBUG -DRPC_DEBUG -DNFS_DEBUG -DRARP_DEBUG -DNET_DEBUG
     14 #DEFS+=	-DLE_DEBUG
     15 CFLAGS=	-O3 ${INCPATH} ${DEFS}
     16 
     17 SRCS=   autoconf.c cons.c devopen.c machdep.c prf.c
     18 OBJS=	${SRCS:N*.h:R:S/$/.o/g}
     19 DSRCS=	ct.c dca.c dcm.c fhpib.c hil.c hpib.c if_le.c \
     20 	ite.c ite_dv.c ite_gb.c ite_rb.c ite_subr.c ite_tc.c ite_hy.c \
     21 	nhpib.c rd.c scsi.c sd.c
     22 DOBJS=	${DSRCS:N*.h:R:S/$/.o/g}
     23 
     24 S=	${.CURDIR}/../../..
     25 
     26 .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
     27 .PATH: ${S}/stand
     28 
     29 INCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa
     30 ### find out what to use for libkern
     31 KERNREL=
     32 .include "$S/lib/libkern/Makefile.inc"
     33 LIBKERN=	${KERNLIB}
     34 
     35 .include "${.CURDIR}/libsa/Makefile.inc"
     36 LIBSA=	${SA_LIB}
     37 
     38 LIBS=	${OBJS} libdrive.a ${LIBSA} ${LIBKERN}
     39 
     40 BOOTS=	uboot.lif inst.lif
     41 BOOTAOUTS=uboot inst
     42 ALL=	${BOOTS} mkboot installboot
     43 
     44 all: ${ALL}
     45 
     46 ${BOOTS}: ${LIBS}
     47 
     48 libdrive.a: ${DOBJS}
     49 	rm -f $@
     50 	${AR} cq $@ ${DOBJS}
     51 	${RANLIB} $@
     52 
     53 # depend on DEFS
     54 
     55 devopen.o machdep.o srt0.o: Makefile
     56 cons.o dca.o hil.o: Makefile
     57 ite.o ite_subr.o ite_dv.o ite_gb.o ite_hy.o ite_rb.o ite_tc.o: Makefile
     58 
     59 # startups
     60 
     61 srt0.o: ${.CURDIR}/srt0.s
     62 	${CC} ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.s
     63 
     64 # unified boot program (disk, network, tape)
     65 uboot.lif: uboot mkboot
     66 	./mkboot uboot $@
     67 
     68 uboot:	srt0.o uboot.o tgets.o netio.o clock.o conf.o ${LIBS}
     69 	${LD} -N -T ${RELOC} -e begin srt0.o uboot.o tgets.o netio.o clock.o \
     70 	    conf.o ${LIBS} -o $@
     71 	@size $@
     72 	@echo $@ total size should not exceed 1044480 bytes
     73 
     74 # miniroot installation program
     75 inst.lif: inst mkboot
     76 	./mkboot inst $@
     77 
     78 inst: srt0.o inst.o clock.o conf.o netio.o tgets.o ${LIBS}
     79 	${LD} -N -T ${RELOC} -e begin srt0.o inst.o clock.o conf.o netio.o \
     80 	    tgets.o ${LIBS} -o $@
     81 	@size $@
     82 	@echo $@ total size should not exceed 1044480 bytes
     83 
     84 # helper program ... turns OMAGIC into LIF
     85 mkboot: ${.CURDIR}/mkboot.c
     86 	${CC} ${CFLAGS} ${.CURDIR}/mkboot.c -o $@
     87 
     88 installboot: ${.CURDIR}/installboot.sh
     89 	@rm -f installboot
     90 	cp -p ${.CURDIR}/installboot.sh installboot
     91 
     92 # utilities
     93 
     94 clean::
     95 	rm -f *.o *.i
     96 	rm -f a.out ${BOOTS} ${BOOTAOUTS}
     97 	rm -f libdrive.a mkboot installboot
     98 
     99 install:
    100 	${INSTALL} -d -m 755 -o ${BINOWN} -g ${BINGRP} \
    101 	    ${DESTDIR}/usr/mdec/rbootd
    102 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 installboot \
    103 	    ${DESTDIR}/usr/mdec
    104 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 uboot.lif \
    105 	    ${DESTDIR}/usr/mdec
    106 	rm -f ${DESTDIR}/usr/mdec/rdboot
    107 	ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/rdboot
    108 	rm -f ${DESTDIR}/usr/mdec/bootrd
    109 	ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootrd
    110 	rm -f ${DESTDIR}/usr/mdec/sdboot
    111 	ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/sdboot
    112 	rm -f ${DESTDIR}/usr/mdec/bootsd
    113 	ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootsd
    114 	rm -f ${DESTDIR}/usr/mdec/ctboot
    115 	ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/ctboot
    116 	rm -f ${DESTDIR}/usr/mdec/bootct
    117 	ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootct
    118 	rm -f ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT
    119 	ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT
    120 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 inst.lif \
    121 	    ${DESTDIR}/usr/mdec
    122 	rm -f ${DESTDIR}/usr/mdec/rbootd/SYS_INST
    123 	ln ${DESTDIR}/usr/mdec/inst.lif ${DESTDIR}/usr/mdec/rbootd/SYS_INST
    124 
    125 .include <bsd.prog.mk>
    126