Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.91.12.1
      1  1.91.12.1  pgoyette #	$NetBSD: Makefile.booters,v 1.91.12.1 2018/06/25 07:25:42 pgoyette Exp $
      2       1.32   thorpej 
      3  1.91.12.1  pgoyette NOSANITIZER=
      4       1.32   thorpej .include <bsd.own.mk>
      5        1.1     perry 
      6        1.2   thorpej STRIPFLAG=
      7        1.1     perry BINMODE=444
      8       1.38   thorpej 
      9       1.38   thorpej LIBCRT0=	# nothing
     10       1.89   tsutsui LIBCRTI=	# nothing
     11       1.38   thorpej LIBCRTBEGIN=	# nothing
     12       1.38   thorpej LIBCRTEND=	# nothing
     13       1.38   thorpej LIBC=		# nothing
     14       1.29       tls 
     15       1.33   thorpej # Make sure we override any optimization options specified by the
     16       1.33   thorpej # user.
     17       1.37      fvdl .if ${MACHINE_ARCH} == "x86_64"
     18       1.90    martin CPUFLAGS= -m32 -march=i386 -mtune=i386
     19       1.37      fvdl .else
     20       1.81  jakllsch CPUFLAGS=  -march=i386 -mtune=i386
     21       1.63       mrg .endif
     22       1.84     joerg COPTS=	${OPT_SIZE.${ACTIVE_CC}}
     23        1.1     perry 
     24        1.8  drochner I386_STAND_DIR?= $S/arch/i386/stand
     25        1.8  drochner 
     26       1.52       dsl .PATH: ${I386_STAND_DIR}/lib
     27       1.32   thorpej 
     28       1.16  christos ROMSTART= start_rom.o
     29        1.8  drochner GENPROMDIR= ${I386_STAND_DIR}/genprom
     30       1.32   thorpej GENPROMOBJDIR!= cd ${GENPROMDIR} && ${PRINTOBJDIR}
     31       1.32   thorpej GENPROM= ${GENPROMOBJDIR}/genprom
     32       1.32   thorpej 
     33        1.8  drochner .PATH: ${I386_STAND_DIR}/lib/crt/dos
     34       1.16  christos DOSSTART= start_dos.o doscommain.o
     35       1.32   thorpej 
     36       1.31   thorpej .PATH: ${I386_STAND_DIR}/lib/crt/pxe
     37       1.31   thorpej PXESTART= start_pxe.o
     38        1.1     perry 
     39       1.70      yamt CPPFLAGS+= -nostdinc -I${.OBJDIR} -I$S -I${I386_STAND_DIR}/lib -I$S/lib/libsa
     40        1.5  drochner CPPFLAGS+= -D_STANDALONE
     41       1.68     lukem LDFLAGS+=  -nostdlib
     42       1.37      fvdl 
     43       1.37      fvdl # XXX
     44       1.37      fvdl .if ${MACHINE_ARCH} == "x86_64"
     45       1.37      fvdl CPPFLAGS+=-m32
     46       1.68     lukem LDFLAGS+=-Wl,-m,elf_i386
     47       1.37      fvdl LIBKERN_ARCH=i386
     48       1.37      fvdl KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
     49       1.37      fvdl .endif
     50        1.1     perry 
     51       1.91  christos CLEANFILES+= ${STARTFILE} ${BASE}.list
     52        1.7   thorpej 
     53        1.1     perry ### find out what to use for libkern
     54        1.1     perry KERN_AS=	library
     55        1.1     perry .include "${S}/lib/libkern/Makefile.inc"
     56        1.1     perry LIBKERN=	${KERNLIB}
     57        1.1     perry 
     58        1.1     perry ### find out what to use for libz
     59        1.1     perry Z_AS=		library
     60        1.1     perry .include "${S}/lib/libz/Makefile.inc"
     61        1.1     perry LIBZ=		${ZLIB}
     62        1.1     perry 
     63        1.1     perry ### find out what to use for libsa
     64        1.1     perry SA_AS=		library
     65       1.22  christos SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
     66        1.1     perry .include "${S}/lib/libsa/Makefile.inc"
     67        1.1     perry LIBSA=		${SALIB}
     68        1.1     perry 
     69        1.1     perry ### find out what to use for libi386
     70        1.8  drochner I386DIR= ${I386_STAND_DIR}/lib
     71        1.1     perry .include "${I386DIR}/Makefile.inc"
     72        1.1     perry LIBI386=		${I386LIB}
     73       1.17      tron 
     74       1.79  dholland cleandir distclean: .WAIT cleanlibdir
     75       1.17      tron 
     76       1.17      tron cleanlibdir:
     77       1.57       jmc 	-rm -rf lib
     78       1.16  christos 
     79       1.68     lukem LDFLAGS+=-Wl,-M -Wl,-e,start 	# -N does not work properly.
     80       1.16  christos 
     81       1.22  christos LIBLIST=${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBI386} ${LIBSA}
     82       1.22  christos 
     83       1.91  christos VERSIONMACHINE=x86
     84       1.91  christos .include "${S}/conf/newvers_stand.mk"
     85        1.7   thorpej 
     86       1.32   thorpej CLEANFILES+= ${BASE}.sym
     87       1.32   thorpej ${BASE}.sym: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
     88       1.64     lukem 	${_MKTARGET_LINK}
     89       1.68     lukem 	${CC} -o ${BASE}.sym ${LDFLAGS} -Wl,-Ttext,${RELOC} \
     90       1.39       dsl 	    ${STARTFILE} ${OBJS} ${LIBLIST} >${BASE}.list
     91       1.32   thorpej 
     92       1.65     lukem CLEANFILES+= ${BASE}.rom ${BASE}.rom.tmp
     93       1.32   thorpej ${BASE}.rom: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
     94       1.64     lukem 	${_MKTARGET_LINK}
     95       1.68     lukem 	${CC} -o ${BASE}.sym ${LDFLAGS} -Wl,-Ttext,${RELOC} \
     96       1.68     lukem 	    ${STARTFILE} ${OBJS} ${LIBLIST} >${BASE}.list
     97       1.65     lukem 	${OBJCOPY} -O binary ${BASE}.sym ${BASE}.rom.tmp
     98       1.65     lukem 	${GENPROM} ${ROM_SIZE} < ${BASE}.rom.tmp > ${BASE}.rom || \
     99       1.83     joerg 	    ( rm -f ${BASE}.rom && false )
    100       1.65     lukem 	rm -f ${BASE}.rom.tmp
    101        1.9  drochner 
    102       1.32   thorpej CLEANFILES+= ${BASE}.com
    103       1.32   thorpej ${BASE}.com: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
    104       1.64     lukem 	${_MKTARGET_LINK}
    105       1.68     lukem 	${CC} -o ${BASE}.sym ${LDFLAGS} -Wl,-Ttext,${RELOC} \
    106       1.68     lukem 	    ${STARTFILE} ${OBJS} ${LIBLIST} >${BASE}.list
    107       1.32   thorpej 	${OBJCOPY} -O binary ${BASE}.sym ${BASE}.com
    108       1.32   thorpej 
    109       1.32   thorpej CLEANFILES+= ${BASE}.bin
    110       1.32   thorpej ${BASE}.bin: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
    111       1.64     lukem 	${_MKTARGET_LINK}
    112       1.68     lukem 	${CC} -o ${BASE}.sym ${LDFLAGS} -Wl,-Ttext,${RELOC} \
    113       1.68     lukem 	    ${STARTFILE} ${OBJS} ${LIBLIST} > ${BASE}.list
    114       1.32   thorpej 	${OBJCOPY} -O binary ${BASE}.sym ${BASE}.bin
    115        1.9  drochner 
    116        1.9  drochner .include <bsd.prog.mk>
    117       1.88      matt KLINK_MACHINE=	i386
    118       1.87      matt .include <bsd.klinks.mk>
    119