Home | History | Annotate | Line # | Download | only in mboot
Makefile revision 1.7.4.1
      1  1.7.4.1     fvdl #	$NetBSD: Makefile,v 1.7.4.1 2001/10/01 12:43:10 fvdl Exp $
      2      1.1  minoura 
      3      1.1  minoura BOOT=		mboot
      4      1.1  minoura VERSION=	0.1
      5      1.1  minoura 
      6      1.1  minoura # text address
      7      1.1  minoura TEXT=		00002000
      8      1.1  minoura TEXTSZ=		1024
      9      1.1  minoura 
     10      1.1  minoura PROG=		${BOOT}
     11      1.1  minoura BINDIR=		/usr/mdec
     12      1.1  minoura BINMODE=	444
     13      1.1  minoura MKMAN=		no
     14      1.1  minoura STRIPFLAG=
     15      1.1  minoura 
     16      1.5  tsutsui STRIP?=		/usr/bin/strip
     17      1.1  minoura 
     18      1.1  minoura SRCS=		srt0.S mboot.c
     19      1.1  minoura KERN!=		cd ${.CURDIR}/../../../..; pwd
     20      1.1  minoura 
     21      1.1  minoura CPPFLAGS+=	-nostdinc -I${KERN} -I${.CURDIR} -I.
     22      1.1  minoura #CPPFLAGS+=	-I${.CURDIR}/../libiocs
     23      1.1  minoura CPPFLAGS+=	-DTEXTADDR="0x${TEXT}" 
     24      1.1  minoura CPPFLAGS+=	-DBOOT=\"${BOOT}\" -DBOOT_VERS=\"${VERSION}\"
     25      1.1  minoura CFLAGS=		-Wno-main -Os -m68000
     26      1.1  minoura 
     27      1.7  minoura LDFLAGS=	-N -static -Ttext ${TEXT}
     28      1.1  minoura 
     29      1.1  minoura .PHONY:	machine-links
     30      1.1  minoura beforedepend: machine-links
     31      1.1  minoura machine-links:
     32      1.1  minoura 	echo ${.CURDIR}
     33      1.1  minoura 	-rm -f machine && \
     34      1.1  minoura 	    ln -s ${KERN}/arch/${MACHINE}/include machine
     35      1.1  minoura 	-rm -f ${MACHINE_ARCH} && \
     36      1.1  minoura 	    ln -s ${KERN}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
     37      1.1  minoura CLEANFILES+=	machine ${MACHINE_ARCH}
     38      1.1  minoura 
     39      1.4  mycroft realall: machine-links ${PROG}
     40      1.1  minoura ${BOOT}:	${OBJS}
     41      1.1  minoura 	${LD} ${LDFLAGS} -o ${BOOT}.x ${OBJS} ${LDLIBS}
     42      1.5  tsutsui #	${STRIP} ${BOOT}.x
     43      1.1  minoura #	dd bs=32 skip=1 count=32 if=${BOOT}.x of=${BOOT}
     44      1.1  minoura 	${OBJCOPY} -O binary ${BOOT}.x ${BOOT}
     45      1.1  minoura 	@rm ${BOOT}.x
     46      1.1  minoura CLEANFILES+=	${BOOT}.x
     47      1.1  minoura 
     48      1.1  minoura .include <bsd.prog.mk>
     49