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