Home | History | Annotate | Line # | Download | only in boot
Makefile revision 1.8.2.2
      1  1.8.2.2  thorpej #	$NetBSD: Makefile,v 1.8.2.2 2002/01/10 19:50:26 thorpej Exp $
      2  1.8.2.2  thorpej 
      3  1.8.2.2  thorpej NOMAN=		# defined
      4  1.8.2.2  thorpej 
      5  1.8.2.2  thorpej .include <bsd.own.mk>
      6  1.8.2.2  thorpej 
      7  1.8.2.2  thorpej BOOT=		Multi-boot
      8  1.8.2.2  thorpej VERSIONFILE=	${.CURDIR}/version
      9  1.8.2.2  thorpej VERSION!=	awk -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } END { print it }' ${VERSIONFILE}
     10  1.8.2.2  thorpej NEWVERSWHAT=	"${BOOT}"
     11  1.8.2.2  thorpej 
     12  1.8.2.2  thorpej # text address
     13  1.8.2.2  thorpej TEXT=		006000
     14  1.8.2.2  thorpej 
     15  1.8.2.2  thorpej PROG=		boot
     16  1.8.2.2  thorpej BINDIR=		/usr/mdec
     17  1.8.2.2  thorpej BINMODE=	444
     18  1.8.2.2  thorpej STRIPFLAG=
     19  1.8.2.2  thorpej 
     20  1.8.2.2  thorpej BFDNAME=	a.out-m68k-netbsd
     21  1.8.2.2  thorpej STRIP?=		/usr/bin/strip
     22  1.8.2.2  thorpej OBJCOPY?=	/usr/bin/objcopy
     23  1.8.2.2  thorpej 
     24  1.8.2.2  thorpej SRCS=		srt0.S boot.c conf.c exec_image.S
     25  1.8.2.2  thorpej S=		${.CURDIR}/../../../..
     26  1.8.2.2  thorpej M=		$S/arch/${MACHINE}
     27  1.8.2.2  thorpej COMMONDIR=	$M/stand/common
     28  1.8.2.2  thorpej .PATH:		${COMMONDIR}
     29  1.8.2.2  thorpej 
     30  1.8.2.2  thorpej SRCS+=		vers.c
     31  1.8.2.2  thorpej CLEANFILES+=	vers.c
     32  1.8.2.2  thorpej vers.c:	${VERSIONFILE}
     33  1.8.2.2  thorpej 	sh ${S}/conf/newvers_stand.sh ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT}
     34  1.8.2.2  thorpej 
     35  1.8.2.2  thorpej CPPFLAGS+=	-nostdinc -I$S -I${.OBJDIR} -I$M/stand/libsa
     36  1.8.2.2  thorpej CPPFLAGS+=	-I$M/stand/libiocs -I${COMMONDIR}
     37  1.8.2.2  thorpej CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
     38  1.8.2.2  thorpej CPPFLAGS+=	-DTEXTADDR="0x${TEXT}" 
     39  1.8.2.2  thorpej CPPFLAGS+=	-DBOOT=\"${BOOT}\" -DBOOT_VERS=\"${VERSION}\"
     40  1.8.2.2  thorpej CFLAGS=		-Wno-main -Os -m68020-60
     41  1.8.2.2  thorpej .if ${OBJECT_FMT} == "ELF"
     42  1.8.2.2  thorpej LDFLAGS=	-N -static -T ${.CURDIR}/boot.ldscript
     43  1.8.2.2  thorpej .else
     44  1.8.2.2  thorpej LDFLAGS=	-N -static -Ttext ${TEXT}
     45  1.8.2.2  thorpej .endif
     46  1.8.2.2  thorpej LIBIOCS!=	cd $M/stand/libiocs && ${PRINTOBJDIR}
     47  1.8.2.2  thorpej LIBSA!=		cd $M/stand/libsa && ${PRINTOBJDIR}
     48  1.8.2.2  thorpej LDLIBS=		-L${LIBSA} -lsa -L${LIBIOCS} -liocs
     49  1.8.2.2  thorpej 
     50  1.8.2.2  thorpej .PHONY:	machine-links
     51  1.8.2.2  thorpej beforedepend: machine-links
     52  1.8.2.2  thorpej machine-links:
     53  1.8.2.2  thorpej 	-rm -f machine && \
     54  1.8.2.2  thorpej 	    ln -s $M/include machine
     55  1.8.2.2  thorpej 	-rm -f ${MACHINE_ARCH} && \
     56  1.8.2.2  thorpej 	    ln -s $S/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
     57  1.8.2.2  thorpej CLEANFILES+=	machine ${MACHINE_ARCH}
     58  1.8.2.2  thorpej 
     59  1.8.2.2  thorpej realall: machine-links ${PROG}
     60  1.8.2.2  thorpej ${PROG}:	${OBJS}
     61  1.8.2.2  thorpej 	${LD} ${LDFLAGS} -o ${PROG}.sym ${OBJS} ${LDLIBS}
     62  1.8.2.2  thorpej 	${STRIP} -F ${BFDNAME} -o ${PROG} ${PROG}.sym
     63  1.8.2.2  thorpej 
     64  1.8.2.2  thorpej CLEANFILES+=	${PROG}.sym
     65  1.8.2.2  thorpej 
     66  1.8.2.2  thorpej .include <bsd.prog.mk>
     67