Makefile revision 1.1
11.1Sderaadt#	@(#)Makefile	5.4 (Berkeley) 2/15/93
21.1Sderaadt
31.1SderaadtDESTDIR=
41.1SderaadtSTAND=	../../stand
51.1SderaadtINCPATH=-I. -I../..
61.1SderaadtVPATH=	${STAND}
71.1Sderaadt
81.1Sderaadt# RELOC=80200000 allows for boot prog up to 1D0000 (1900544) bytes long
91.1SderaadtRELOC=	80200000
101.1Sderaadt
111.1SderaadtDEFS= -DSTANDALONE -DDS5000 -DSMALL
121.1SderaadtCFLAGS=	-O ${INCPATH} ${DEFS}
131.1SderaadtAFLAGS=	-O ${INCPATH} ${DEFS} -DLOCORE
141.1Sderaadt
151.1SderaadtDRIVERS= rz.c
161.1SderaadtSRCS=	${DRIVERS}
171.1SderaadtLIBS=	libdrive.a libsa/libsa.a ../../libkern/obj/libkern.a
181.1Sderaadt
191.1Sderaadt#ALL=	boot mkboot mkboottape
201.1SderaadtALL=	boot
211.1Sderaadt
221.1Sderaadt.s.o:
231.1Sderaadt	${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
241.1Sderaadt	    ${AS} -o ${.TARGET}
251.1Sderaadt
261.1Sderaadtall: ${ALL}
271.1Sderaadt
281.1Sderaadtboot: ${LIBS}
291.1Sderaadt
301.1Sderaadtlibsa/libsa.a::
311.1Sderaadt	cd libsa; make
321.1Sderaadt
331.1Sderaadtlibdrive.a: conf.o ${DRIVERS:.c=.o}
341.1Sderaadt	ar crv $@ $?
351.1Sderaadt	ranlib $@
361.1Sderaadt
371.1Sderaadt# depend on DEFS
381.1Sderaadt
391.1Sderaadt# bootable from real disks
401.1Sderaadt
411.1Sderaadtboot:	start.o boot.o bootconf.o ${LIBS}
421.1Sderaadt	ld -N -Ttext ${RELOC} -e start start.o boot.o bootconf.o ${LIBS} -o $@ 
431.1Sderaadt
441.1Sderaadtstart.o: start.s
451.1Sderaadt	${CPP} -E ${CFLAGS:M-[ID]*} -DLOCORE ${AINC} ${.IMPSRC} | \
461.1Sderaadt	    ${AS} -o ${.TARGET}
471.1Sderaadt
481.1Sderaadtbootconf.o: conf.o
491.1Sderaadt	rm -f bootconf.c
501.1Sderaadt	ln -s conf.c bootconf.c
511.1Sderaadt	${CC} -c ${CFLAGS} -DBOOT bootconf.c
521.1Sderaadt	rm -f bootconf.c
531.1Sderaadt
541.1Sderaadtmkboot: mkboot.c
551.1Sderaadt	${CC} ${CFLAGS} -o mkboot mkboot.c
561.1Sderaadt
571.1Sderaadtmkboottape: mkboottape.c
581.1Sderaadt	${CC} ${CFLAGS} -o mkboottape mkboottape.c
591.1Sderaadt
601.1Sderaadt# utilities
611.1Sderaadt
621.1Sderaadtclean cleandir:
631.1Sderaadt	rm -f .depend *.o *.exe *.i errs make.out core*
641.1Sderaadt	rm -f a.out boot cat
651.1Sderaadt	rm -f boot[a-z][a-z] [a-z][a-z]boot
661.1Sderaadt	rm -f libdrive.a mkboot mkboottape
671.1Sderaadt	cd libsa; make cleandir
681.1Sderaadt
691.1Sderaadtinstall:
701.1Sderaadt	./mkboot boot rzboot bootrz
711.1Sderaadt	install -s -o bin -g bin -m 444 rzboot ${DESTDIR}/usr/mdec
721.1Sderaadt	install -s -o bin -g bin -m 444 bootrz ${DESTDIR}/usr/mdec
731.1Sderaadt
741.1Sderaadtdepend: ${SRCS}
751.1Sderaadt	mkdep ${INCPATH} ${DEFS} ${SRCS}
761.1Sderaadt	mkdep -a -p ${INCPATH} ${DEFS} mkboot.c mkboottape.c
771.1Sderaadt	cd libsa; make depend
78