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