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