Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.4
      1  1.4      cgd #	$NetBSD: Makefile.booters,v 1.4 1994/10/26 21:10:48 cgd Exp $
      2  1.4      cgd #	@(#)Makefile	8.3 (Berkeley) 2/16/94
      3  1.1  deraadt 
      4  1.1  deraadt DESTDIR=
      5  1.1  deraadt STAND=	../../stand
      6  1.2    glass INCPATH=-I. -I/sys
      7  1.1  deraadt VPATH=	${STAND}
      8  1.1  deraadt 
      9  1.1  deraadt # RELOC=80200000 allows for boot prog up to 1D0000 (1900544) bytes long
     10  1.1  deraadt RELOC=	80200000
     11  1.1  deraadt 
     12  1.2    glass DEFS= -DSTANDALONE -DSMALL
     13  1.2    glass CFLAGS=	-O2 ${INCPATH} ${DEFS}
     14  1.2    glass AFLAGS=	-O2 ${INCPATH} ${DEFS} -DLOCORE
     15  1.1  deraadt 
     16  1.1  deraadt DRIVERS= rz.c
     17  1.1  deraadt SRCS=	${DRIVERS}
     18  1.1  deraadt LIBS=	libdrive.a libsa/libsa.a ../../libkern/obj/libkern.a
     19  1.1  deraadt 
     20  1.2    glass ALL=	boot mkboot mkboottape dec_label
     21  1.1  deraadt 
     22  1.1  deraadt .s.o:
     23  1.1  deraadt 	${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
     24  1.1  deraadt 	    ${AS} -o ${.TARGET}
     25  1.1  deraadt 
     26  1.1  deraadt all: ${ALL}
     27  1.1  deraadt 
     28  1.1  deraadt boot: ${LIBS}
     29  1.1  deraadt 
     30  1.1  deraadt libsa/libsa.a::
     31  1.1  deraadt 	cd libsa; make
     32  1.1  deraadt 
     33  1.1  deraadt libdrive.a: conf.o ${DRIVERS:.c=.o}
     34  1.1  deraadt 	ar crv $@ $?
     35  1.1  deraadt 	ranlib $@
     36  1.1  deraadt 
     37  1.1  deraadt # depend on DEFS
     38  1.1  deraadt 
     39  1.1  deraadt # bootable from real disks
     40  1.1  deraadt 
     41  1.1  deraadt boot:	start.o boot.o bootconf.o ${LIBS}
     42  1.1  deraadt 	ld -N -Ttext ${RELOC} -e start start.o boot.o bootconf.o ${LIBS} -o $@ 
     43  1.1  deraadt 
     44  1.1  deraadt start.o: start.s
     45  1.1  deraadt 	${CPP} -E ${CFLAGS:M-[ID]*} -DLOCORE ${AINC} ${.IMPSRC} | \
     46  1.1  deraadt 	    ${AS} -o ${.TARGET}
     47  1.1  deraadt 
     48  1.1  deraadt bootconf.o: conf.o
     49  1.1  deraadt 	rm -f bootconf.c
     50  1.1  deraadt 	ln -s conf.c bootconf.c
     51  1.1  deraadt 	${CC} -c ${CFLAGS} -DBOOT bootconf.c
     52  1.1  deraadt 	rm -f bootconf.c
     53  1.1  deraadt 
     54  1.1  deraadt mkboot: mkboot.c
     55  1.1  deraadt 	${CC} ${CFLAGS} -o mkboot mkboot.c
     56  1.1  deraadt 
     57  1.1  deraadt mkboottape: mkboottape.c
     58  1.1  deraadt 	${CC} ${CFLAGS} -o mkboottape mkboottape.c
     59  1.1  deraadt 
     60  1.2    glass dec_label: dec_label.c
     61  1.2    glass 	${CC} ${CFLAGS} -o dec_label dec_label.c
     62  1.2    glass 
     63  1.1  deraadt # utilities
     64  1.1  deraadt 
     65  1.1  deraadt clean cleandir:
     66  1.1  deraadt 	rm -f .depend *.o *.exe *.i errs make.out core*
     67  1.2    glass 	rm -f a.out ${ALL}
     68  1.1  deraadt 	rm -f boot[a-z][a-z] [a-z][a-z]boot
     69  1.2    glass 	rm -f libdrive.a
     70  1.1  deraadt 	cd libsa; make cleandir
     71  1.1  deraadt 
     72  1.1  deraadt install:
     73  1.1  deraadt 	./mkboot boot rzboot bootrz
     74  1.2    glass 	install -o bin -g bin -m 444 rzboot ${DESTDIR}/usr/mdec
     75  1.2    glass 	install -o bin -g bin -m 444 bootrz ${DESTDIR}/usr/mdec
     76  1.1  deraadt 
     77  1.1  deraadt depend: ${SRCS}
     78  1.1  deraadt 	mkdep ${INCPATH} ${DEFS} ${SRCS}
     79  1.1  deraadt 	mkdep -a -p ${INCPATH} ${DEFS} mkboot.c mkboottape.c
     80  1.1  deraadt 	cd libsa; make depend
     81