Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.33.8.2
      1  1.33.8.1     lukem #	$NetBSD: Makefile.booters,v 1.33.8.2 2002/07/04 10:50:33 lukem Exp $
      2      1.32   thorpej 
      3      1.32   thorpej .include <bsd.own.mk>
      4       1.1     perry 
      5       1.2   thorpej STRIPFLAG=
      6       1.1     perry BINMODE=444
      7      1.29       tls 
      8      1.33   thorpej # Make sure we override any optimization options specified by the
      9      1.33   thorpej # user.
     10  1.33.8.1     lukem COPTS=	-Os -mcpu=i386
     11       1.1     perry 
     12       1.8  drochner I386_STAND_DIR?= $S/arch/i386/stand
     13       1.8  drochner 
     14       1.8  drochner .PATH: ${I386_STAND_DIR}/lib/crt/bootsect ${I386_STAND_DIR}/lib
     15      1.32   thorpej BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o \
     16      1.32   thorpej 	bios_disk.o diskbuf.o
     17      1.32   thorpej 
     18       1.8  drochner .PATH: ${I386_STAND_DIR}/lib/crt/rom
     19      1.16  christos ROMSTART= start_rom.o
     20       1.8  drochner GENPROMDIR= ${I386_STAND_DIR}/genprom
     21      1.32   thorpej GENPROMOBJDIR!= cd ${GENPROMDIR} && ${PRINTOBJDIR}
     22      1.32   thorpej GENPROM= ${GENPROMOBJDIR}/genprom
     23      1.32   thorpej 
     24       1.8  drochner .PATH: ${I386_STAND_DIR}/lib/crt/dos
     25      1.16  christos DOSSTART= start_dos.o doscommain.o
     26      1.32   thorpej 
     27      1.31   thorpej .PATH: ${I386_STAND_DIR}/lib/crt/pxe
     28      1.31   thorpej PXESTART= start_pxe.o
     29       1.1     perry 
     30      1.13       cgd CPPFLAGS += -nostdinc -I${.OBJDIR} -I$S -I${I386_STAND_DIR}/lib -I$S/lib/libsa
     31       1.5  drochner CPPFLAGS+= -D_STANDALONE
     32       1.1     perry 
     33      1.32   thorpej CLEANFILES+= ${STARTFILE} vers.c ${BASE}.list
     34      1.26  jdolecek SRCS+=	vers.c
     35       1.7   thorpej 
     36      1.30       jmc .if !make(obj) && !make(clean) && !make(cleandir)
     37      1.25   mycroft .BEGIN: machine
     38      1.25   mycroft .NOPATH: machine
     39      1.30       jmc .endif
     40      1.30       jmc 
     41      1.25   mycroft realdepend realall: machine
     42      1.25   mycroft CLEANFILES+= machine
     43       1.6  drochner 
     44      1.25   mycroft machine::
     45      1.10   hubertf 	-rm -f $@
     46       1.6  drochner 	ln -s $S/arch/i386/include $@
     47      1.23  drochner 
     48      1.31   thorpej ${OBJS} ${BSSTART} ${ROMSTART} ${DOSSTART} ${PXESTART}: machine
     49       1.6  drochner 
     50       1.1     perry ### find out what to use for libkern
     51       1.1     perry KERN_AS=	library
     52       1.1     perry .include "${S}/lib/libkern/Makefile.inc"
     53       1.1     perry LIBKERN=	${KERNLIB}
     54       1.1     perry 
     55       1.1     perry ### find out what to use for libz
     56       1.1     perry Z_AS=		library
     57       1.1     perry .include "${S}/lib/libz/Makefile.inc"
     58       1.1     perry LIBZ=		${ZLIB}
     59       1.1     perry 
     60       1.1     perry ### find out what to use for libsa
     61       1.1     perry SA_AS=		library
     62      1.22  christos SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
     63       1.1     perry .include "${S}/lib/libsa/Makefile.inc"
     64       1.1     perry LIBSA=		${SALIB}
     65       1.1     perry 
     66       1.1     perry ### find out what to use for libi386
     67       1.8  drochner I386DIR= ${I386_STAND_DIR}/lib
     68       1.1     perry .include "${I386DIR}/Makefile.inc"
     69       1.1     perry LIBI386=		${I386LIB}
     70      1.17      tron 
     71      1.18      tron cleandir distclean: cleanlibdir
     72      1.17      tron 
     73      1.17      tron cleanlibdir:
     74      1.17      tron 	rm -rf lib
     75      1.16  christos 
     76      1.16  christos .if ${OBJECT_FMT} == "ELF"
     77      1.16  christos LDFLAGS=-M -e start 	# -N does not work properly.
     78      1.16  christos .else
     79      1.16  christos LDFLAGS=-N -M -e _start 
     80      1.16  christos .endif
     81      1.16  christos 
     82      1.22  christos LIBLIST=${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBI386} ${LIBSA}
     83      1.22  christos 
     84      1.26  jdolecek .PHONY: vers.c
     85      1.26  jdolecek vers.c: ${VERSIONFILE}
     86      1.26  jdolecek 	sh ${S}conf/newvers_stand.sh ${.ALLSRC} 'i386' ${NEWVERSWHAT}
     87       1.7   thorpej 
     88      1.32   thorpej CLEANFILES+= ${BASE}.sym
     89      1.32   thorpej ${BASE}.sym: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
     90      1.32   thorpej 	${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext ${RELOC} ${STARTFILE} ${OBJS} \
     91      1.32   thorpej 	    ${LIBLIST} >${BASE}.list
     92      1.32   thorpej 
     93      1.32   thorpej CLEANFILES+= ${BASE}.rom
     94      1.32   thorpej ${BASE}.rom: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
     95      1.32   thorpej 	${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext ${RELOC} ${STARTFILE} ${OBJS} \
     96      1.32   thorpej 	    ${LIBLIST} >${BASE}.list
     97      1.32   thorpej 	${OBJCOPY} -O binary ${BASE}.sym ${BASE}.bin
     98      1.32   thorpej 	${GENPROM} ${ROM_SIZE} < ${BASE}.bin > ${BASE}.rom || \
     99      1.32   thorpej 	    rm -f ${BASE}.rom
    100       1.9  drochner 	rm -f ${BASE}.bin
    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.32   thorpej 	${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext ${RELOC} ${STARTFILE} ${OBJS} \
    105      1.32   thorpej 	    ${LIBLIST} >${BASE}.list
    106      1.32   thorpej 	${OBJCOPY} -O binary ${BASE}.sym ${BASE}.com
    107      1.32   thorpej 
    108      1.32   thorpej CLEANFILES+= ${BASE}.bin
    109      1.32   thorpej ${BASE}.bin: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
    110      1.32   thorpej 	${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext ${RELOC} ${STARTFILE} ${OBJS} \
    111      1.31   thorpej 	    ${LIBLIST} > ${BASE}.list
    112      1.32   thorpej 	${OBJCOPY} -O binary ${BASE}.sym ${BASE}.bin
    113       1.9  drochner 
    114       1.9  drochner .include <bsd.prog.mk>
    115