Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.26.4.3
      1  1.26.4.3   nathanw #	$NetBSD: Makefile.booters,v 1.26.4.3 2002/01/08 00:25:46 nathanw Exp $
      2       1.1     perry 
      3       1.1     perry BINDIR= /usr/mdec
      4       1.2   thorpej STRIPFLAG=
      5       1.1     perry BINMODE=444
      6       1.1     perry 
      7  1.26.4.2   nathanw DBG=    -Os
      8  1.26.4.2   nathanw 
      9       1.8  drochner I386_STAND_DIR?= $S/arch/i386/stand
     10       1.8  drochner 
     11       1.8  drochner .PATH: ${I386_STAND_DIR}/lib/crt/bootsect ${I386_STAND_DIR}/lib
     12       1.3  drochner BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.o diskbuf.o
     13       1.8  drochner .PATH: ${I386_STAND_DIR}/lib/crt/rom
     14      1.16  christos ROMSTART= start_rom.o
     15       1.8  drochner GENPROMDIR= ${I386_STAND_DIR}/genprom
     16       1.8  drochner .PATH: ${I386_STAND_DIR}/lib/crt/dos
     17      1.16  christos DOSSTART= start_dos.o doscommain.o
     18       1.1     perry 
     19      1.13       cgd CPPFLAGS += -nostdinc -I${.OBJDIR} -I$S -I${I386_STAND_DIR}/lib -I$S/lib/libsa
     20       1.5  drochner CPPFLAGS+= -D_STANDALONE
     21       1.1     perry 
     22      1.26  jdolecek CLEANFILES+= vers.c ${BASE}.list
     23      1.26  jdolecek SRCS+=	vers.c
     24       1.7   thorpej 
     25  1.26.4.3   nathanw .if !make(obj) && !make(clean) && !make(cleandir)
     26      1.25   mycroft .BEGIN: machine
     27      1.25   mycroft .NOPATH: machine
     28  1.26.4.3   nathanw .endif
     29  1.26.4.3   nathanw 
     30      1.25   mycroft realdepend realall: machine
     31      1.25   mycroft CLEANFILES+= machine
     32       1.6  drochner 
     33      1.25   mycroft machine::
     34      1.10   hubertf 	-rm -f $@
     35       1.6  drochner 	ln -s $S/arch/i386/include $@
     36      1.23  drochner 
     37      1.25   mycroft ${OBJS} ${BSSTART} ${ROMSTART} ${DOSSTART}: machine
     38       1.6  drochner 
     39       1.1     perry ### find out what to use for libkern
     40       1.1     perry KERN_AS=	library
     41       1.1     perry .include "${S}/lib/libkern/Makefile.inc"
     42       1.1     perry LIBKERN=	${KERNLIB}
     43       1.1     perry 
     44       1.1     perry ### find out what to use for libz
     45       1.1     perry Z_AS=		library
     46       1.1     perry .include "${S}/lib/libz/Makefile.inc"
     47       1.1     perry LIBZ=		${ZLIB}
     48       1.1     perry 
     49       1.1     perry ### find out what to use for libsa
     50       1.1     perry SA_AS=		library
     51      1.22  christos SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
     52       1.1     perry .include "${S}/lib/libsa/Makefile.inc"
     53       1.1     perry LIBSA=		${SALIB}
     54       1.1     perry 
     55       1.1     perry ### find out what to use for libi386
     56       1.8  drochner I386DIR= ${I386_STAND_DIR}/lib
     57       1.1     perry .include "${I386DIR}/Makefile.inc"
     58       1.1     perry LIBI386=		${I386LIB}
     59      1.17      tron 
     60  1.26.4.1   nathanw .include <bsd.own.mk>
     61  1.26.4.1   nathanw 
     62      1.18      tron cleandir distclean: cleanlibdir
     63      1.17      tron 
     64      1.17      tron cleanlibdir:
     65      1.17      tron 	rm -rf lib
     66      1.16  christos 
     67      1.16  christos .if ${OBJECT_FMT} == "ELF"
     68      1.16  christos LDFLAGS=-M -e start 	# -N does not work properly.
     69      1.16  christos .else
     70      1.16  christos LDFLAGS=-N -M -e _start 
     71      1.16  christos .endif
     72      1.16  christos 
     73      1.22  christos LIBLIST=${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBI386} ${LIBSA}
     74      1.22  christos 
     75      1.26  jdolecek .PHONY: vers.c
     76      1.26  jdolecek vers.c: ${VERSIONFILE}
     77      1.26  jdolecek 	sh ${S}conf/newvers_stand.sh ${.ALLSRC} 'i386' ${NEWVERSWHAT}
     78       1.7   thorpej 
     79      1.26  jdolecek ${BASE}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
     80      1.20      tron 	${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext 0 ${BSSTART} ${OBJS} \
     81      1.26  jdolecek 	${LIBLIST} >${BASE}.list
     82       1.9  drochner 
     83      1.26  jdolecek ${BASE}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
     84      1.20      tron 	${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext ${RELOC} ${ROMSTART} ${OBJS} \
     85      1.26  jdolecek 	${LIBLIST} >${BASE}.list
     86  1.26.4.2   nathanw 	${OBJCOPY} --output-target=binary ${BASE}.sym ${BASE}.bin
     87       1.9  drochner 	(cd ${GENPROMDIR}; ${MAKE} rom BINFILE=${.OBJDIR:Q}/${BASE:Q}.bin \
     88       1.9  drochner 		ROMFILE=${.OBJDIR:Q}/${BASE:Q}.rom ROM_SIZE=${ROM_SIZE:Q})
     89       1.9  drochner 	rm -f ${BASE}.bin
     90       1.9  drochner 
     91      1.26  jdolecek ${BASE}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
     92      1.20      tron 	${LD} -o ${BASE}.sym ${LDFLAGS} -Ttext 0x100 ${DOSSTART} ${OBJS} \
     93      1.26  jdolecek 	${LIBLIST} >${BASE}.list
     94  1.26.4.2   nathanw 	${OBJCOPY} --output-target=binary ${BASE}.sym ${BASE}.com
     95       1.9  drochner 
     96       1.9  drochner .include <bsd.prog.mk>
     97