Makefile.booters revision 1.5
11.5Smellon# $NetBSD: Makefile.booters,v 1.5 1995/01/18 06:53:36 mellon Exp $ 21.4Scgd# @(#)Makefile 8.3 (Berkeley) 2/16/94 31.1Sderaadt 41.1SderaadtDESTDIR= 51.1SderaadtSTAND= ../../stand 61.5Smellon#VPATH= ${STAND} 71.1Sderaadt 81.1Sderaadt# RELOC=80200000 allows for boot prog up to 1D0000 (1900544) bytes long 91.1SderaadtRELOC= 80200000 101.1Sderaadt 111.5SmellonS= ${.CURDIR}/../../.. 121.5Smellon 131.2SglassDEFS= -DSTANDALONE -DSMALL 141.2SglassCFLAGS= -O2 ${INCPATH} ${DEFS} 151.2SglassAFLAGS= -O2 ${INCPATH} ${DEFS} -DLOCORE 161.1Sderaadt 171.5Smellon.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} 181.5Smellon.PATH: ${S}/stand ${S}/lib/libsa 191.5Smellon 201.5Smellon#INCPATH=-I. -I/sys 211.5SmellonINCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa 221.5Smellon 231.5Smellon### find out what to use for libkern 241.5Smellon.include "$S/lib/libkern/Makefile.inc" 251.5Smellon#LIBKERN= ${KERNLIB} 261.5Smellon#KERNLIB= ${.CURDIR}/../compile/libkern.a 271.5Smellon 281.5Smellon.include "$S/lib/libsa/Makefile.inc" 291.5SmellonLIBSA= ${SA_LIB} 301.5Smellon 311.5Smellon# not yet: need to write libsa/Makefile.inc first 321.5SmellonLIBS= ${.OBJDIR}/libdrive.a ${.CURDIR}/libsa/libsa.a ${KERNLIB} 331.5Smellon#LIBS= libdrive.a libsa/libsa.a ../../libkern/obj/libkern.a 341.5Smellon 351.1SderaadtDRIVERS= rz.c 361.1SderaadtSRCS= ${DRIVERS} 371.5Smellon#STUFF= callvec.c devopen.c getenv.c gets.c strcmp.c 381.5SmellonSTUFF= 391.1Sderaadt 401.5SmellonALL= boot mkboot mkboottape dec_label rzboot bootrz 411.1Sderaadt 421.1Sderaadt.s.o: 431.1Sderaadt ${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ 441.1Sderaadt ${AS} -o ${.TARGET} 451.1Sderaadt 461.1Sderaadtall: ${ALL} 471.1Sderaadt 481.1Sderaadtboot: ${LIBS} 491.1Sderaadt 501.5Smellon#libsa/libsa.a:: 511.5Smellon# cd libsa; make 521.1Sderaadt 531.5Smellon${.OBJDIR}/libdrive.a: conf.o ${DRIVERS:.c=.o} 541.1Sderaadt ar crv $@ $? 551.1Sderaadt ranlib $@ 561.1Sderaadt 571.1Sderaadt# depend on DEFS 581.1Sderaadt 591.5Smellon#before other deps on bootconf.o 601.5Smellonbootconf.o: conf.o 611.5Smellon rm -f bootconf.c 621.5Smellon ln -s ${.CURDIR}/conf.c bootconf.c 631.5Smellon ${CC} -c ${CFLAGS} -DBOOT bootconf.c 641.5Smellon rm -f bootconf.c 651.5Smellon 661.5Smellon 671.1Sderaadt# bootable from real disks 681.1Sderaadt 691.5Smellonboot: start.o boot.o bootconf.o filesystem.o ${LIBS} 701.5Smellon ld -Map boot.map -N -Ttext ${RELOC} -e start start.o boot.o bootconf.o filesystem.o ${LIBS} -o boot.elf 711.5Smellon elf2aout boot.elf boot 721.5Smellon 731.5Smellonstart.o: ${.CURDIR}/start.S 741.1Sderaadt 751.5Smellon# ${CPP} -E ${CFLAGS:M-[ID]*} -DLOCORE ${AINC} ${.IMPSRC} | \ 761.5Smellon# ${AS} -o ${.TARGET} 771.1Sderaadt 781.5Smellonmkboot: ${.CURDIR}/mkboot.c 791.5Smellon ${CC} ${CFLAGS} -o mkboot ${.CURDIR}/mkboot.c 801.1Sderaadt 811.5Smellonmkboottape: ${.CURDIR}/mkboottape.c 821.5Smellon ${CC} ${CFLAGS} -o mkboottape ${.CURDIR}/mkboottape.c 831.1Sderaadt 841.5Smellondec_label: ${.CURDIR}/dec_label.c 851.5Smellon ${CC} ${CFLAGS} -o dec_label ${.CURDIR}/dec_label.c 861.1Sderaadt 871.5Smellonrzboot bootrz: mkboot boot 881.5Smellon ./mkboot boot rzboot bootrz 891.2Sglass 901.1Sderaadt# utilities 911.1Sderaadt 921.1Sderaadtclean cleandir: 931.1Sderaadt rm -f .depend *.o *.exe *.i errs make.out core* 941.2Sglass rm -f a.out ${ALL} 951.1Sderaadt rm -f boot[a-z][a-z] [a-z][a-z]boot 961.2Sglass rm -f libdrive.a 971.1Sderaadt cd libsa; make cleandir 981.1Sderaadt 991.1Sderaadtinstall: 1001.1Sderaadt ./mkboot boot rzboot bootrz 1011.2Sglass install -o bin -g bin -m 444 rzboot ${DESTDIR}/usr/mdec 1021.2Sglass install -o bin -g bin -m 444 bootrz ${DESTDIR}/usr/mdec 1031.1Sderaadt 1041.1Sderaadtdepend: ${SRCS} 1051.1Sderaadt mkdep ${INCPATH} ${DEFS} ${SRCS} 1061.1Sderaadt mkdep -a -p ${INCPATH} ${DEFS} mkboot.c mkboottape.c 1071.1Sderaadt cd libsa; make depend 1081.5Smellon 1091.5Smellon.include <bsd.dep.mk> 1101.5Smellon.include <bsd.obj.mk> 111