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