head	1.5;
access;
symbols
	netbsd-11-0-RELEASE:1.5
	netbsd-11-0-RC7:1.5
	netbsd-11-0-RC6:1.5
	netbsd-11-0-RC5:1.5
	netbsd-11-0-RC4:1.5
	netbsd-11-0-RC3:1.5
	netbsd-11-0-RC2:1.5
	netbsd-11-0-RC1:1.5
	perseant-exfatfs-base-20250801:1.5
	netbsd-11:1.5.0.52
	netbsd-11-base:1.5
	netbsd-10-1-RELEASE:1.5
	perseant-exfatfs-base-20240630:1.5
	perseant-exfatfs:1.5.0.50
	perseant-exfatfs-base:1.5
	netbsd-8-3-RELEASE:1.5
	netbsd-9-4-RELEASE:1.5
	netbsd-10-0-RELEASE:1.5
	netbsd-10-0-RC6:1.5
	netbsd-10-0-RC5:1.5
	netbsd-10-0-RC4:1.5
	netbsd-10-0-RC3:1.5
	netbsd-10-0-RC2:1.5
	thorpej-ifq:1.5.0.48
	thorpej-ifq-base:1.5
	thorpej-altq-separation:1.5.0.46
	thorpej-altq-separation-base:1.5
	netbsd-10-0-RC1:1.5
	netbsd-10:1.5.0.44
	netbsd-10-base:1.5
	bouyer-sunxi-drm:1.5.0.42
	bouyer-sunxi-drm-base:1.5
	netbsd-9-3-RELEASE:1.5
	thorpej-i2c-spi-conf2:1.5.0.40
	thorpej-i2c-spi-conf2-base:1.5
	thorpej-futex2:1.5.0.38
	thorpej-futex2-base:1.5
	thorpej-cfargs2:1.5.0.36
	thorpej-cfargs2-base:1.5
	cjep_sun2x-base1:1.5
	cjep_sun2x:1.5.0.34
	cjep_sun2x-base:1.5
	cjep_staticlib_x-base1:1.5
	netbsd-9-2-RELEASE:1.5
	cjep_staticlib_x:1.5.0.32
	cjep_staticlib_x-base:1.5
	thorpej-i2c-spi-conf:1.5.0.30
	thorpej-i2c-spi-conf-base:1.5
	thorpej-cfargs:1.5.0.28
	thorpej-cfargs-base:1.5
	thorpej-futex:1.5.0.26
	thorpej-futex-base:1.5
	netbsd-9-1-RELEASE:1.5
	bouyer-xenpvh-base2:1.5
	phil-wifi-20200421:1.5
	bouyer-xenpvh-base1:1.5
	phil-wifi-20200411:1.5
	bouyer-xenpvh:1.5.0.24
	bouyer-xenpvh-base:1.5
	is-mlppp:1.5.0.22
	is-mlppp-base:1.5
	phil-wifi-20200406:1.5
	netbsd-8-2-RELEASE:1.5
	ad-namecache-base3:1.5
	netbsd-9-0-RELEASE:1.5
	netbsd-9-0-RC2:1.5
	ad-namecache-base2:1.5
	ad-namecache-base1:1.5
	ad-namecache:1.5.0.20
	ad-namecache-base:1.5
	netbsd-9-0-RC1:1.5
	phil-wifi-20191119:1.5
	netbsd-9:1.5.0.18
	netbsd-9-base:1.5
	phil-wifi-20190609:1.5
	netbsd-8-1-RELEASE:1.5
	netbsd-8-1-RC1:1.5
	isaki-audio2:1.5.0.16
	isaki-audio2-base:1.5
	pgoyette-compat-merge-20190127:1.5
	pgoyette-compat-20190127:1.5
	pgoyette-compat-20190118:1.5
	pgoyette-compat-1226:1.5
	pgoyette-compat-1126:1.5
	pgoyette-compat-1020:1.5
	pgoyette-compat-0930:1.5
	pgoyette-compat-0906:1.5
	netbsd-7-2-RELEASE:1.4
	pgoyette-compat-0728:1.5
	netbsd-8-0-RELEASE:1.5
	phil-wifi:1.5.0.14
	phil-wifi-base:1.5
	pgoyette-compat-0625:1.5
	netbsd-8-0-RC2:1.5
	pgoyette-compat-0521:1.5
	pgoyette-compat-0502:1.5
	pgoyette-compat-0422:1.5
	netbsd-8-0-RC1:1.5
	pgoyette-compat-0415:1.5
	pgoyette-compat-0407:1.5
	pgoyette-compat-0330:1.5
	pgoyette-compat-0322:1.5
	pgoyette-compat-0315:1.5
	netbsd-7-1-2-RELEASE:1.4
	pgoyette-compat:1.5.0.12
	pgoyette-compat-base:1.5
	netbsd-7-1-1-RELEASE:1.4
	tls-maxphys-base-20171202:1.5
	matt-nb8-mediatek:1.5.0.10
	matt-nb8-mediatek-base:1.5
	nick-nhusb-base-20170825:1.5
	perseant-stdc-iso10646:1.5.0.8
	perseant-stdc-iso10646-base:1.5
	netbsd-8:1.5.0.6
	netbsd-8-base:1.5
	prg-localcount2-base3:1.5
	prg-localcount2-base2:1.5
	prg-localcount2-base1:1.5
	prg-localcount2:1.5.0.4
	prg-localcount2-base:1.5
	pgoyette-localcount-20170426:1.5
	bouyer-socketcan-base1:1.5
	jdolecek-ncq:1.5.0.2
	jdolecek-ncq-base:1.5
	pgoyette-localcount-20170320:1.4
	netbsd-7-1:1.4.0.16
	netbsd-7-1-RELEASE:1.4
	netbsd-7-1-RC2:1.4
	nick-nhusb-base-20170204:1.4
	netbsd-7-nhusb-base-20170116:1.4
	bouyer-socketcan:1.4.0.14
	bouyer-socketcan-base:1.4
	pgoyette-localcount-20170107:1.4
	netbsd-7-1-RC1:1.4
	nick-nhusb-base-20161204:1.4
	pgoyette-localcount-20161104:1.4
	netbsd-7-0-2-RELEASE:1.4
	nick-nhusb-base-20161004:1.4
	localcount-20160914:1.4
	netbsd-7-nhusb:1.4.0.12
	netbsd-7-nhusb-base:1.4
	pgoyette-localcount-20160806:1.4
	pgoyette-localcount-20160726:1.4
	pgoyette-localcount:1.4.0.10
	pgoyette-localcount-base:1.4
	nick-nhusb-base-20160907:1.4
	nick-nhusb-base-20160529:1.4
	netbsd-7-0-1-RELEASE:1.4
	nick-nhusb-base-20160422:1.4
	nick-nhusb-base-20160319:1.4
	nick-nhusb-base-20151226:1.4
	netbsd-7-0:1.4.0.8
	netbsd-7-0-RELEASE:1.4
	nick-nhusb-base-20150921:1.4
	netbsd-7-0-RC3:1.4
	netbsd-7-0-RC2:1.4
	netbsd-7-0-RC1:1.4
	nick-nhusb-base-20150606:1.4
	nick-nhusb-base-20150406:1.4
	nick-nhusb:1.4.0.6
	nick-nhusb-base:1.4
	netbsd-6-0-6-RELEASE:1.2
	netbsd-6-1-5-RELEASE:1.2
	netbsd-7:1.4.0.4
	netbsd-7-base:1.4
	yamt-pagecache-base9:1.4
	yamt-pagecache-tag8:1.2
	netbsd-6-1-4-RELEASE:1.2
	netbsd-6-0-5-RELEASE:1.2
	tls-earlyentropy:1.4.0.2
	tls-earlyentropy-base:1.4
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.4
	riastradh-drm2-base3:1.4
	netbsd-6-1-3-RELEASE:1.2
	netbsd-6-0-4-RELEASE:1.2
	netbsd-6-1-2-RELEASE:1.2
	netbsd-6-0-3-RELEASE:1.2
	rmind-smpnet-nbase:1.4
	netbsd-6-1-1-RELEASE:1.2
	riastradh-drm2-base2:1.2
	riastradh-drm2-base1:1.2
	riastradh-drm2:1.2.0.32
	riastradh-drm2-base:1.2
	rmind-smpnet:1.2.0.24
	rmind-smpnet-base:1.4
	netbsd-6-1:1.2.0.30
	netbsd-6-0-2-RELEASE:1.2
	netbsd-6-1-RELEASE:1.2
	khorben-n900:1.2.0.28
	netbsd-6-1-RC4:1.2
	netbsd-6-1-RC3:1.2
	agc-symver:1.2.0.26
	agc-symver-base:1.2
	netbsd-6-1-RC2:1.2
	netbsd-6-1-RC1:1.2
	yamt-pagecache-base8:1.2
	netbsd-6-0-1-RELEASE:1.2
	yamt-pagecache-base7:1.2
	matt-nb6-plus-nbase:1.2
	yamt-pagecache-base6:1.2
	netbsd-6-0:1.2.0.22
	netbsd-6-0-RELEASE:1.2
	netbsd-6-0-RC2:1.2
	tls-maxphys:1.2.0.20
	tls-maxphys-base:1.4
	matt-nb6-plus:1.2.0.18
	matt-nb6-plus-base:1.2
	netbsd-6-0-RC1:1.2
	jmcneill-usbmp-base10:1.2
	yamt-pagecache-base5:1.2
	jmcneill-usbmp-base9:1.2
	yamt-pagecache-base4:1.2
	jmcneill-usbmp-base8:1.2
	jmcneill-usbmp-base7:1.2
	jmcneill-usbmp-base6:1.2
	jmcneill-usbmp-base5:1.2
	jmcneill-usbmp-base4:1.2
	jmcneill-usbmp-base3:1.2
	jmcneill-usbmp-pre-base2:1.2
	jmcneill-usbmp-base2:1.2
	netbsd-6:1.2.0.16
	netbsd-6-base:1.2
	jmcneill-usbmp:1.2.0.14
	jmcneill-usbmp-base:1.2
	jmcneill-audiomp3:1.2.0.12
	jmcneill-audiomp3-base:1.2
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.10
	yamt-pagecache-base:1.2
	rmind-uvmplock-nbase:1.2
	jruoho-x86intr:1.2.0.8
	cherry-xenmp:1.2.0.6
	cherry-xenmp-base:1.2
	jym-xensuspend-nbase:1.2
	jym-xensuspend-base:1.2
	rmind-uvmplock-base:1.2
	rmind-uvmplock:1.2.0.4
	bouyer-quota2:1.2.0.2
	bouyer-quota2-nbase:1.2;
locks; strict;
comment	@# @;


1.5
date	2017.04.08.19.53.21;	author christos;	state Exp;
branches;
next	1.4;
commitid	mAo8FJwd588QFLMz;

1.4
date	2014.01.16.01.15.34;	author christos;	state Exp;
branches
	1.4.6.1
	1.4.10.1
	1.4.14.1;
next	1.3;
commitid	eohV5AOa1lR3mhlx;

1.3
date	2014.01.12.15.26.30;	author tsutsui;	state Exp;
branches;
next	1.2;
commitid	YjbnVt32CCoKaQkx;

1.2
date	2011.03.05.01.58.01;	author joerg;	state Exp;
branches
	1.2.2.1
	1.2.4.1
	1.2.8.1
	1.2.10.1
	1.2.20.1
	1.2.24.1;
next	1.1;

1.1
date	2011.03.03.05.59.37;	author kiyohara;	state Exp;
branches;
next	;

1.4.6.1
date	2017.08.28.17.51.46;	author skrll;	state Exp;
branches;
next	;
commitid	UQQpnjvcNkUZn05A;

1.4.10.1
date	2017.04.26.02.53.05;	author pgoyette;	state Exp;
branches;
next	;
commitid	ojV02aOSdzvBqZOz;

1.4.14.1
date	2017.04.21.16.53.32;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.2.2.1
date	2011.03.05.01.58.01;	author bouyer;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2011.03.05.15.09.54;	author bouyer;	state Exp;
branches;
next	;

1.2.4.1
date	2011.03.05.01.58.01;	author rmind;	state dead;
branches;
next	1.2.4.2;

1.2.4.2
date	2011.03.05.20.51.15;	author rmind;	state Exp;
branches;
next	;

1.2.8.1
date	2011.03.05.01.58.01;	author jruoho;	state dead;
branches;
next	1.2.8.2;

1.2.8.2
date	2011.06.06.09.06.14;	author jruoho;	state Exp;
branches;
next	;

1.2.10.1
date	2014.05.22.11.39.58;	author yamt;	state Exp;
branches;
next	;
commitid	VUUXuyNWnt3AKwBx;

1.2.20.1
date	2014.08.20.00.03.14;	author tls;	state Exp;
branches;
next	1.2.20.2;
commitid	jTnpym9Qu0o4R1Nx;

1.2.20.2
date	2017.12.03.11.36.30;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;

1.2.24.1
date	2014.05.18.17.45.18;	author rmind;	state Exp;
branches;
next	;
commitid	mL5ZYSzpqK6QS2Bx;


desc
@@


1.5
log
@centralize vers.c building for standalone programs.
@
text
@#	$NetBSD: Makefile,v 1.4 2014/01/16 01:15:34 christos Exp $

NOMAN=		# defined

.include <bsd.own.mk>

S=		${.CURDIR}/../../../..

BINMODE=	444

PROG=		boot
SRCS=		entry.S
SRCS+=		boot.c bootinfo.c clock.c conf.c cons.c devopen.c prf.c tgets.c
SRCS+=		com.c scif.c wd.c wdc.c

CLEANFILES+=	${PROG}

#MMEYE_CPU=	SH3
MMEYE_CPU=	SH4

.if ${MMEYE_CPU} == "SH3"
AFLAGS+=	-DSH3
CPPFLAGS+=	-DSH3
CPPFLAGS+=	-DCONS_COM
RELOC=		8c800000
.endif
.if ${MMEYE_CPU} == "SH4"
CLEANFILES+=	${PROG}.bin ${PROG}.bin.gz
AFLAGS+=	-DSH4
CPPFLAGS+=	-DSH4
CPPFLAGS+=	-DCONS_SCIF
RELOC=		89000000
.endif


AFLAGS+=	-D_LOCORE -D_KERNEL
CFLAGS+=	-ffreestanding
CFLAGS+=	-Wall -Werror -Wno-main
CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
CFLAGS+=	-Wno-pointer-sign
CPPFLAGS+=	-nostdinc -D_STANDALONE -I. -I${.OBJDIR} -I${S}
DBG=		-Os

NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrelease.sh
CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBCRTI=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

STRIPFLAG=

ENTRY=		start


### find out what to use for libkern
KERN_AS=	library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=	${KERNLIB}

### find out what to use for libz
Z_AS=		library
.include "${S}/lib/libz/Makefile.inc"
LIBZ=		${ZLIB}

### find out what to use for libsa
SA_AS=		library
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}


${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
	${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \
	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
.if ${MMEYE_CPU} == "SH4"
	${OBJCOPY} -S -O binary ${.TARGET} ${.TARGET}.bin
	TOOL_AWK=${TOOL_AWK} TOOL_HEXDUMP=${TOOL_HEXDUMP} \
	    ${HOST_SH} $(.CURDIR)/deflate.sh ${.TARGET}.bin
.endif

.include "${S}/conf/newvers_stand.mk"

cleandir distclean: .WAIT cleanlibdir

cleanlibdir:
	-rm -rf lib

.include <bsd.prog.mk>
.include <bsd.klinks.mk>
@


1.4
log
@eliminate use of bsd.sys.mk from Makefiles
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2014/01/12 15:26:30 tsutsui Exp $
a14 1
SRCS+=		vers.c
d16 1
a16 1
CLEANFILES+=	vers.c ${PROG}
a74 3
.PHONY: vers.c
vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "mmeye"
d85 2
@


1.4.6.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2017/04/08 19:53:21 christos Exp $
d15 1
d17 1
a17 1
CLEANFILES+=	${PROG}
d76 3
a88 2
.include "${S}/conf/newvers_stand.mk"

@


1.4.10.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2017/04/08 19:53:21 christos Exp $
d15 1
d17 1
a17 1
CLEANFILES+=	${PROG}
d76 3
a88 2
.include "${S}/conf/newvers_stand.mk"

@


1.4.14.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2017/04/08 19:53:21 christos Exp $
d15 1
d17 1
a17 1
CLEANFILES+=	${PROG}
d76 3
a88 2
.include "${S}/conf/newvers_stand.mk"

@


1.3
log
@Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2011/03/05 01:58:01 joerg Exp $
a5 1
.include <bsd.sys.mk>
@


1.2
log
@Use deflate.sh from the right directory. Execute with HOST_SH.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2011/03/03 05:59:37 kiyohara Exp $
d51 1
@


1.2.20.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
d6 1
a50 1
LIBCRTI=
@


1.2.20.2
log
@update from HEAD
@
text
@d15 1
d17 1
a17 1
CLEANFILES+=	${PROG}
d76 3
a88 2
.include "${S}/conf/newvers_stand.mk"

@


1.2.10.1
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2011/03/05 01:58:01 joerg Exp $
d6 1
a50 1
LIBCRTI=
@


1.2.24.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2011/03/05 01:58:01 joerg Exp $
d6 1
a50 1
LIBCRTI=
@


1.2.8.1
log
@file Makefile was added on branch jruoho-x86intr on 2011-06-06 09:06:14 +0000
@
text
@d1 95
@


1.2.8.2
log
@Sync with HEAD.
@
text
@a0 95
#	$NetBSD: Makefile,v 1.2 2011/03/05 01:58:01 joerg Exp $

NOMAN=		# defined

.include <bsd.own.mk>
.include <bsd.sys.mk>

S=		${.CURDIR}/../../../..

BINMODE=	444

PROG=		boot
SRCS=		entry.S
SRCS+=		boot.c bootinfo.c clock.c conf.c cons.c devopen.c prf.c tgets.c
SRCS+=		com.c scif.c wd.c wdc.c
SRCS+=		vers.c

CLEANFILES+=	vers.c ${PROG}

#MMEYE_CPU=	SH3
MMEYE_CPU=	SH4

.if ${MMEYE_CPU} == "SH3"
AFLAGS+=	-DSH3
CPPFLAGS+=	-DSH3
CPPFLAGS+=	-DCONS_COM
RELOC=		8c800000
.endif
.if ${MMEYE_CPU} == "SH4"
CLEANFILES+=	${PROG}.bin ${PROG}.bin.gz
AFLAGS+=	-DSH4
CPPFLAGS+=	-DSH4
CPPFLAGS+=	-DCONS_SCIF
RELOC=		89000000
.endif


AFLAGS+=	-D_LOCORE -D_KERNEL
CFLAGS+=	-ffreestanding
CFLAGS+=	-Wall -Werror -Wno-main
CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
CFLAGS+=	-Wno-pointer-sign
CPPFLAGS+=	-nostdinc -D_STANDALONE -I. -I${.OBJDIR} -I${S}
DBG=		-Os

NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrelease.sh
CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

STRIPFLAG=

ENTRY=		start


### find out what to use for libkern
KERN_AS=	library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=	${KERNLIB}

### find out what to use for libz
Z_AS=		library
.include "${S}/lib/libz/Makefile.inc"
LIBZ=		${ZLIB}

### find out what to use for libsa
SA_AS=		library
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}

.PHONY: vers.c
vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "mmeye"

${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
	${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \
	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
.if ${MMEYE_CPU} == "SH4"
	${OBJCOPY} -S -O binary ${.TARGET} ${.TARGET}.bin
	TOOL_AWK=${TOOL_AWK} TOOL_HEXDUMP=${TOOL_HEXDUMP} \
	    ${HOST_SH} $(.CURDIR)/deflate.sh ${.TARGET}.bin
.endif

cleandir distclean: .WAIT cleanlibdir

cleanlibdir:
	-rm -rf lib

.include <bsd.prog.mk>
.include <bsd.klinks.mk>
@


1.2.4.1
log
@file Makefile was added on branch rmind-uvmplock on 2011-03-05 20:51:15 +0000
@
text
@d1 95
@


1.2.4.2
log
@sync with head
@
text
@a0 95
#	$NetBSD$

NOMAN=		# defined

.include <bsd.own.mk>
.include <bsd.sys.mk>

S=		${.CURDIR}/../../../..

BINMODE=	444

PROG=		boot
SRCS=		entry.S
SRCS+=		boot.c bootinfo.c clock.c conf.c cons.c devopen.c prf.c tgets.c
SRCS+=		com.c scif.c wd.c wdc.c
SRCS+=		vers.c

CLEANFILES+=	vers.c ${PROG}

#MMEYE_CPU=	SH3
MMEYE_CPU=	SH4

.if ${MMEYE_CPU} == "SH3"
AFLAGS+=	-DSH3
CPPFLAGS+=	-DSH3
CPPFLAGS+=	-DCONS_COM
RELOC=		8c800000
.endif
.if ${MMEYE_CPU} == "SH4"
CLEANFILES+=	${PROG}.bin ${PROG}.bin.gz
AFLAGS+=	-DSH4
CPPFLAGS+=	-DSH4
CPPFLAGS+=	-DCONS_SCIF
RELOC=		89000000
.endif


AFLAGS+=	-D_LOCORE -D_KERNEL
CFLAGS+=	-ffreestanding
CFLAGS+=	-Wall -Werror -Wno-main
CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
CFLAGS+=	-Wno-pointer-sign
CPPFLAGS+=	-nostdinc -D_STANDALONE -I. -I${.OBJDIR} -I${S}
DBG=		-Os

NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrelease.sh
CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

STRIPFLAG=

ENTRY=		start


### find out what to use for libkern
KERN_AS=	library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=	${KERNLIB}

### find out what to use for libz
Z_AS=		library
.include "${S}/lib/libz/Makefile.inc"
LIBZ=		${ZLIB}

### find out what to use for libsa
SA_AS=		library
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}

.PHONY: vers.c
vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "mmeye"

${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
	${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \
	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
.if ${MMEYE_CPU} == "SH4"
	${OBJCOPY} -S -O binary ${.TARGET} ${.TARGET}.bin
	TOOL_AWK=${TOOL_AWK} TOOL_HEXDUMP=${TOOL_HEXDUMP} \
	    ${HOST_SH} $(.CURDIR)/deflate.sh ${.TARGET}.bin
.endif

cleandir distclean: .WAIT cleanlibdir

cleanlibdir:
	-rm -rf lib

.include <bsd.prog.mk>
.include <bsd.klinks.mk>
@


1.2.2.1
log
@file Makefile was added on branch bouyer-quota2 on 2011-03-05 15:09:54 +0000
@
text
@d1 95
@


1.2.2.2
log
@Sync with HEAD
@
text
@a0 95
#	$NetBSD$

NOMAN=		# defined

.include <bsd.own.mk>
.include <bsd.sys.mk>

S=		${.CURDIR}/../../../..

BINMODE=	444

PROG=		boot
SRCS=		entry.S
SRCS+=		boot.c bootinfo.c clock.c conf.c cons.c devopen.c prf.c tgets.c
SRCS+=		com.c scif.c wd.c wdc.c
SRCS+=		vers.c

CLEANFILES+=	vers.c ${PROG}

#MMEYE_CPU=	SH3
MMEYE_CPU=	SH4

.if ${MMEYE_CPU} == "SH3"
AFLAGS+=	-DSH3
CPPFLAGS+=	-DSH3
CPPFLAGS+=	-DCONS_COM
RELOC=		8c800000
.endif
.if ${MMEYE_CPU} == "SH4"
CLEANFILES+=	${PROG}.bin ${PROG}.bin.gz
AFLAGS+=	-DSH4
CPPFLAGS+=	-DSH4
CPPFLAGS+=	-DCONS_SCIF
RELOC=		89000000
.endif


AFLAGS+=	-D_LOCORE -D_KERNEL
CFLAGS+=	-ffreestanding
CFLAGS+=	-Wall -Werror -Wno-main
CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
CFLAGS+=	-Wno-pointer-sign
CPPFLAGS+=	-nostdinc -D_STANDALONE -I. -I${.OBJDIR} -I${S}
DBG=		-Os

NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrelease.sh
CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

STRIPFLAG=

ENTRY=		start


### find out what to use for libkern
KERN_AS=	library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=	${KERNLIB}

### find out what to use for libz
Z_AS=		library
.include "${S}/lib/libz/Makefile.inc"
LIBZ=		${ZLIB}

### find out what to use for libsa
SA_AS=		library
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}

.PHONY: vers.c
vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "mmeye"

${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
	${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \
	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
.if ${MMEYE_CPU} == "SH4"
	${OBJCOPY} -S -O binary ${.TARGET} ${.TARGET}.bin
	TOOL_AWK=${TOOL_AWK} TOOL_HEXDUMP=${TOOL_HEXDUMP} \
	    ${HOST_SH} $(.CURDIR)/deflate.sh ${.TARGET}.bin
.endif

cleandir distclean: .WAIT cleanlibdir

cleanlibdir:
	-rm -rf lib

.include <bsd.prog.mk>
.include <bsd.klinks.mk>
@


1.1
log
@Add support boot.  only support SH4 machine(mmEye-WLF and others) now.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.20 2010/06/26 21:45:49 phx Exp $
d85 2
a86 2
	env TOOL_AWK=${TOOL_AWK} TOOL_HEXDUMP=${TOOL_HEXDUMP} \
	    ./deflate.sh ${.TARGET}.bin
@

