Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.18
      1  1.18   simonb #	$NetBSD: Makefile.booters,v 1.18 1999/03/27 07:17:50 simonb Exp $
      2  1.18   simonb #
      3  1.18   simonb #	NOTE: $S must correspond to the top of the 'sys' tree
      4   1.1  deraadt 
      5  1.18   simonb BINDIR?=/usr/mdec
      6  1.18   simonb BINMODE?=444
      7   1.1  deraadt 
      8  1.18   simonb .BEGIN: ${.OBJDIR}/machine ${.OBJDIR}/mips
      9  1.18   simonb ${PROG} depend all: ${.OBJDIR}/machine ${.OBJDIR}/mips
     10  1.18   simonb CLEANFILES+= machine mips
     11   1.5   mellon 
     12  1.18   simonb ${.OBJDIR}/machine:
     13  1.18   simonb 	-rm -f ${.TARGET}
     14  1.18   simonb 	ln -s $S/arch/${MACHINE}/include ${.TARGET}
     15  1.15   simonb 
     16  1.18   simonb ${.OBJDIR}/mips:
     17  1.18   simonb 	-rm -f ${.TARGET}
     18  1.18   simonb 	ln -s $S/arch/mips/include mips
     19   1.1  deraadt 
     20  1.18   simonb CLEANFILES+=vers.c vers.o ${PROG}.map
     21   1.5   mellon 
     22  1.18   simonb # Tailor C compilation for standalone environment.
     23  1.18   simonb COPTS=	-Os				# -Os gives smaller code
     24  1.18   simonb 
     25  1.18   simonb C_MACHDEP=-mmemcpy -mno-abicalls -G 128	# even smaller code
     26  1.18   simonb 
     27  1.18   simonb DEFS?=	-DSMALL -D_STANDALONE -D_NO_PROM_DEFINES -DNO_ABICALLS \
     28  1.18   simonb 	${BOOTDEFADD}
     29  1.18   simonb INCL?=	-nostdinc -I${.OBJDIR} -I$S -I${PMAX_STAND_DIR}/lib -I$S/lib/libsa
     30  1.18   simonb 
     31  1.18   simonb CFLAGS+=	${CWARN} ${C_MACHDEP}
     32  1.18   simonb AFLAGS+=	-D_LOCORE -D_KERNEL
     33  1.18   simonb CPPFLAGS+=	${DEFS} ${INCL}
     34  1.18   simonb 
     35  1.18   simonb LDBUG=	-T $S/arch/mips/conf/stand.ldscript
     36  1.18   simonb 
     37  1.18   simonb # We don't need libkern/libsa for the first stage bootblocks
     38  1.18   simonb .if ${PROG} != "bootxx"
     39  1.18   simonb 
     40  1.18   simonb ### find out what to use for libsa
     41  1.18   simonb SA_AS=		library
     42  1.18   simonb .include "${S}/lib/libsa/Makefile.inc"
     43  1.18   simonb LIBSA=		${SALIB}
     44  1.18   simonb SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_INCLUDE_NET=no
     45  1.18   simonb 
     46  1.18   simonb ### find out what to use for libz
     47  1.18   simonb Z_AS=		library
     48  1.18   simonb .include "${S}/lib/libz/Makefile.inc"
     49  1.18   simonb LIBZ=		${ZLIB}
     50  1.18   simonb 
     51  1.18   simonb ### find out what to use for libkern
     52  1.18   simonb KERN_AS=	library
     53  1.18   simonb .include "${S}/lib/libkern/Makefile.inc"
     54  1.18   simonb LIBKERN=	${KERNLIB}
     55  1.18   simonb 
     56  1.18   simonb .endif	# ${PROG} != "bootxx"
     57  1.18   simonb 
     58  1.18   simonb PMAX_STAND_DIR?= $S/arch/pmax/stand
     59  1.18   simonb ### find out what to use for libpmax
     60  1.18   simonb PMAXDIR= ${PMAX_STAND_DIR}/lib
     61  1.18   simonb .include "${PMAXDIR}/Makefile.inc"
     62  1.18   simonb LIBPMAX=		${PMAXLIB}
     63  1.18   simonb 
     64  1.18   simonb cleandir distclean: cleanlibdir
     65  1.18   simonb 
     66  1.18   simonb cleanlibdir:
     67  1.18   simonb 	rm -rf lib
     68  1.18   simonb 
     69  1.18   simonb LIBS=	${LIBPMAX} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBPMAX}
     70  1.18   simonb VERS_O?=vers.o
     71  1.18   simonb 
     72  1.18   simonb vers.o:	${VERSIONFILE}
     73  1.18   simonb 	sh ${PMAX_STAND_DIR}/lib/newvers.sh ${.ALLSRC} ${NEWVERSWHAT}
     74  1.18   simonb 	${COMPILE.c} vers.c
     75  1.18   simonb 
     76  1.18   simonb ${PROG}: ${OBJS} ${VERS_O} ${LIBS}
     77  1.18   simonb 	ld -Map ${PROG}.map -N -x -Ttext ${RELOC} ${LDBUG} -e start \
     78  1.18   simonb 	    ${OBJS} ${VERS_O} ${LIBS} -o ${PROG}
     79  1.18   simonb 
     80  1.18   simonb 
     81  1.18   simonb .include <bsd.prog.mk>
     82  1.18   simonb 
     83  1.18   simonb # be sure to turn off any PIC flags for standalone library code.
     84  1.18   simonb CPICFLAGS=
     85  1.18   simonb CAPICFLAGS=
     86  1.18   simonb CPPPICFLAGS=
     87  1.18   simonb APICFLAGS=
     88