Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.5
      1  1.5   mellon #	$NetBSD: Makefile.booters,v 1.5 1995/01/18 06:53:36 mellon 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.5   mellon #VPATH=	${STAND}
      7  1.1  deraadt 
      8  1.1  deraadt # RELOC=80200000 allows for boot prog up to 1D0000 (1900544) bytes long
      9  1.1  deraadt RELOC=	80200000
     10  1.1  deraadt 
     11  1.5   mellon S=      ${.CURDIR}/../../..
     12  1.5   mellon 
     13  1.2    glass DEFS= -DSTANDALONE -DSMALL
     14  1.2    glass CFLAGS=	-O2 ${INCPATH} ${DEFS}
     15  1.2    glass AFLAGS=	-O2 ${INCPATH} ${DEFS} -DLOCORE
     16  1.1  deraadt 
     17  1.5   mellon .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
     18  1.5   mellon .PATH: ${S}/stand ${S}/lib/libsa
     19  1.5   mellon 
     20  1.5   mellon #INCPATH=-I. -I/sys
     21  1.5   mellon INCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa
     22  1.5   mellon 
     23  1.5   mellon ### find out what to use for libkern
     24  1.5   mellon .include "$S/lib/libkern/Makefile.inc"
     25  1.5   mellon #LIBKERN= ${KERNLIB}
     26  1.5   mellon #KERNLIB= ${.CURDIR}/../compile/libkern.a
     27  1.5   mellon 
     28  1.5   mellon .include "$S/lib/libsa/Makefile.inc"
     29  1.5   mellon LIBSA=  ${SA_LIB}
     30  1.5   mellon 
     31  1.5   mellon # not yet: need to write libsa/Makefile.inc first
     32  1.5   mellon LIBS=  ${.OBJDIR}/libdrive.a ${.CURDIR}/libsa/libsa.a  ${KERNLIB}
     33  1.5   mellon #LIBS=	libdrive.a libsa/libsa.a ../../libkern/obj/libkern.a 
     34  1.5   mellon 
     35  1.1  deraadt DRIVERS= rz.c
     36  1.1  deraadt SRCS=	${DRIVERS}
     37  1.5   mellon #STUFF=	callvec.c devopen.c getenv.c gets.c strcmp.c
     38  1.5   mellon STUFF=
     39  1.1  deraadt 
     40  1.5   mellon ALL=	boot mkboot mkboottape dec_label rzboot bootrz
     41  1.1  deraadt 
     42  1.1  deraadt .s.o:
     43  1.1  deraadt 	${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
     44  1.1  deraadt 	    ${AS} -o ${.TARGET}
     45  1.1  deraadt 
     46  1.1  deraadt all: ${ALL}
     47  1.1  deraadt 
     48  1.1  deraadt boot: ${LIBS}
     49  1.1  deraadt 
     50  1.5   mellon #libsa/libsa.a::
     51  1.5   mellon #	cd libsa; make
     52  1.1  deraadt 
     53  1.5   mellon ${.OBJDIR}/libdrive.a: conf.o ${DRIVERS:.c=.o}
     54  1.1  deraadt 	ar crv $@ $?
     55  1.1  deraadt 	ranlib $@
     56  1.1  deraadt 
     57  1.1  deraadt # depend on DEFS
     58  1.1  deraadt 
     59  1.5   mellon #before other deps on bootconf.o
     60  1.5   mellon bootconf.o: conf.o
     61  1.5   mellon 	rm -f bootconf.c
     62  1.5   mellon 	ln -s ${.CURDIR}/conf.c bootconf.c
     63  1.5   mellon 	${CC} -c ${CFLAGS} -DBOOT bootconf.c
     64  1.5   mellon 	rm -f bootconf.c
     65  1.5   mellon 
     66  1.5   mellon 
     67  1.1  deraadt # bootable from real disks
     68  1.1  deraadt 
     69  1.5   mellon boot:	start.o boot.o bootconf.o filesystem.o ${LIBS}
     70  1.5   mellon 	ld -Map boot.map -N -Ttext ${RELOC} -e start start.o boot.o bootconf.o filesystem.o ${LIBS} -o boot.elf
     71  1.5   mellon 	elf2aout boot.elf boot
     72  1.5   mellon 
     73  1.5   mellon start.o: ${.CURDIR}/start.S
     74  1.1  deraadt 
     75  1.5   mellon #	${CPP} -E ${CFLAGS:M-[ID]*} -DLOCORE ${AINC} ${.IMPSRC} | \
     76  1.5   mellon #	    ${AS} -o ${.TARGET}
     77  1.1  deraadt 
     78  1.5   mellon mkboot: ${.CURDIR}/mkboot.c
     79  1.5   mellon 	${CC} ${CFLAGS} -o mkboot ${.CURDIR}/mkboot.c
     80  1.1  deraadt 
     81  1.5   mellon mkboottape: ${.CURDIR}/mkboottape.c
     82  1.5   mellon 	${CC} ${CFLAGS} -o mkboottape ${.CURDIR}/mkboottape.c
     83  1.1  deraadt 
     84  1.5   mellon dec_label: ${.CURDIR}/dec_label.c
     85  1.5   mellon 	${CC} ${CFLAGS} -o dec_label ${.CURDIR}/dec_label.c
     86  1.1  deraadt 
     87  1.5   mellon rzboot bootrz:	mkboot boot
     88  1.5   mellon 	./mkboot boot rzboot bootrz
     89  1.2    glass 
     90  1.1  deraadt # utilities
     91  1.1  deraadt 
     92  1.1  deraadt clean cleandir:
     93  1.1  deraadt 	rm -f .depend *.o *.exe *.i errs make.out core*
     94  1.2    glass 	rm -f a.out ${ALL}
     95  1.1  deraadt 	rm -f boot[a-z][a-z] [a-z][a-z]boot
     96  1.2    glass 	rm -f libdrive.a
     97  1.1  deraadt 	cd libsa; make cleandir
     98  1.1  deraadt 
     99  1.1  deraadt install:
    100  1.1  deraadt 	./mkboot boot rzboot bootrz
    101  1.2    glass 	install -o bin -g bin -m 444 rzboot ${DESTDIR}/usr/mdec
    102  1.2    glass 	install -o bin -g bin -m 444 bootrz ${DESTDIR}/usr/mdec
    103  1.1  deraadt 
    104  1.1  deraadt depend: ${SRCS}
    105  1.1  deraadt 	mkdep ${INCPATH} ${DEFS} ${SRCS}
    106  1.1  deraadt 	mkdep -a -p ${INCPATH} ${DEFS} mkboot.c mkboottape.c
    107  1.1  deraadt 	cd libsa; make depend
    108  1.5   mellon 
    109  1.5   mellon .include <bsd.dep.mk>
    110  1.5   mellon .include <bsd.obj.mk>
    111