head	1.4;
access;
symbols
	perseant-exfatfs-base-20250801:1.4
	perseant-exfatfs-base-20240630:1.4
	perseant-exfatfs:1.4.0.118
	perseant-exfatfs-base:1.4
	bouyer-sunxi-drm:1.4.0.116
	bouyer-sunxi-drm-base:1.4
	cjep_sun2x:1.4.0.114
	cjep_sun2x-base:1.4
	cjep_staticlib_x-base1:1.4
	cjep_staticlib_x:1.4.0.112
	cjep_staticlib_x-base:1.4
	thorpej-futex-base:1.4
	bouyer-xenpvh-base2:1.4
	phil-wifi-20200421:1.4
	bouyer-xenpvh-base1:1.4
	phil-wifi-20200411:1.4
	bouyer-xenpvh:1.4.0.110
	bouyer-xenpvh-base:1.4
	phil-wifi-20200406:1.4
	ad-namecache-base3:1.4
	ad-namecache-base2:1.4
	ad-namecache-base1:1.4
	ad-namecache:1.4.0.108
	ad-namecache-base:1.4
	isaki-audio2:1.4.0.106
	isaki-audio2-base:1.4
	pgoyette-compat-merge-20190127:1.4
	pgoyette-compat-20190127:1.4
	pgoyette-compat-20190118:1.4
	pgoyette-compat-1226:1.4
	pgoyette-compat-1126:1.4
	pgoyette-compat-1020:1.4
	pgoyette-compat-0930:1.4
	pgoyette-compat-0906:1.4
	pgoyette-compat-0728:1.4
	pgoyette-compat-0625:1.4
	pgoyette-compat-0521:1.4
	pgoyette-compat-0502:1.4
	pgoyette-compat-0422:1.4
	pgoyette-compat-0415:1.4
	pgoyette-compat-0407:1.4
	pgoyette-compat-0330:1.4
	pgoyette-compat-0322:1.4
	pgoyette-compat-0315:1.4
	pgoyette-compat:1.4.0.104
	pgoyette-compat-base:1.4
	perseant-stdc-iso10646:1.4.0.102
	perseant-stdc-iso10646-base:1.4
	prg-localcount2-base3:1.4
	prg-localcount2-base2:1.4
	prg-localcount2-base1:1.4
	prg-localcount2:1.4.0.100
	prg-localcount2-base:1.4
	pgoyette-localcount-20170426:1.4
	bouyer-socketcan-base1:1.4
	pgoyette-localcount-20170320:1.4
	bouyer-socketcan:1.4.0.98
	bouyer-socketcan-base:1.4
	pgoyette-localcount-20170107:1.4
	pgoyette-localcount-20161104:1.4
	localcount-20160914:1.4
	pgoyette-localcount-20160806:1.4
	pgoyette-localcount-20160726:1.4
	pgoyette-localcount:1.4.0.96
	pgoyette-localcount-base:1.4
	netbsd-5-2-3-RELEASE:1.4
	netbsd-5-1-5-RELEASE:1.4
	yamt-pagecache-base9:1.4
	yamt-pagecache-tag8:1.4
	tls-earlyentropy:1.4.0.94
	tls-earlyentropy-base:1.4
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.4
	riastradh-drm2-base3:1.4
	netbsd-5-2-2-RELEASE:1.4
	netbsd-5-1-4-RELEASE:1.4
	netbsd-5-2-1-RELEASE:1.4
	netbsd-5-1-3-RELEASE:1.4
	rmind-smpnet-nbase:1.4
	rmind-smpnet:1.4.0.90
	rmind-smpnet-base:1.4
	agc-symver:1.4.0.92
	agc-symver-base:1.4
	tls-maxphys-base:1.4
	yamt-pagecache-base8:1.4
	netbsd-5-2:1.4.0.88
	yamt-pagecache-base7:1.4
	netbsd-5-2-RELEASE:1.4
	netbsd-5-2-RC1:1.4
	yamt-pagecache-base6:1.4
	yamt-pagecache-base5:1.4
	yamt-pagecache-base4:1.4
	netbsd-5-1-2-RELEASE:1.4
	netbsd-5-1-1-RELEASE:1.4
	jmcneill-usbmp:1.4.0.86
	jmcneill-usbmp-base:1.4
	jmcneill-audiomp3:1.4.0.84
	jmcneill-audiomp3-base:1.4
	yamt-pagecache-base3:1.4
	yamt-pagecache-base2:1.4
	yamt-pagecache:1.4.0.82
	yamt-pagecache-base:1.4
	rmind-uvmplock-nbase:1.4
	bouyer-quota2-nbase:1.4
	bouyer-quota2:1.4.0.80
	bouyer-quota2-base:1.4
	jruoho-x86intr:1.4.0.78
	jruoho-x86intr-base:1.4
	matt-nb5-pq3:1.4.0.76
	matt-nb5-pq3-base:1.4
	netbsd-5-1:1.4.0.74
	netbsd-5-1-RELEASE:1.4
	yamt-nfs-mp-base11:1.4
	netbsd-5-1-RC4:1.4
	uebayasi-xip-base2:1.4
	yamt-nfs-mp-base10:1.4
	netbsd-5-1-RC3:1.4
	netbsd-5-1-RC2:1.4
	netbsd-5-1-RC1:1.4
	rmind-uvmplock:1.4.0.72
	rmind-uvmplock-base:1.4
	yamt-nfs-mp-base9:1.4
	uebayasi-xip:1.4.0.70
	uebayasi-xip-base:1.4
	netbsd-5-0-2-RELEASE:1.4
	yamt-nfs-mp-base8:1.4
	yamt-nfs-mp-base7:1.4
	netbsd-5-0-1-RELEASE:1.4
	jymxensuspend-base:1.4
	yamt-nfs-mp-base6:1.4
	yamt-nfs-mp-base5:1.4
	yamt-nfs-mp-base4:1.4
	jym-xensuspend-nbase:1.4
	yamt-nfs-mp-base3:1.4
	netbsd-5-0:1.4.0.68
	netbsd-5-0-RELEASE:1.4
	netbsd-5-0-RC4:1.4
	netbsd-5-0-RC3:1.4
	netbsd-5-0-RC2:1.4
	jym-xensuspend:1.4.0.66
	jym-xensuspend-base:1.4
	netbsd-5-0-RC1:1.4
	haad-dm-base2:1.4
	haad-nbase2:1.4
	ad-audiomp2:1.4.0.64
	ad-audiomp2-base:1.4
	netbsd-5:1.4.0.62
	netbsd-5-base:1.4
	haad-dm-base1:1.4
	haad-dm:1.4.0.60
	haad-dm-base:1.4
	simonb-wapbl-nbase:1.4
	yamt-pf42-base4:1.4
	simonb-wapbl:1.4.0.58
	simonb-wapbl-base:1.4
	yamt-pf42-base3:1.4
	hpcarm-cleanup-nbase:1.4
	yamt-pf42-base2:1.4
	yamt-nfs-mp-base2:1.4
	yamt-nfs-mp:1.4.0.56
	yamt-nfs-mp-base:1.4
	yamt-pf42:1.4.0.54
	yamt-pf42-base:1.4
	ad-socklock-base1:1.4
	yamt-lazymbuf-base15:1.4
	yamt-lazymbuf-base14:1.4
	keiichi-mipv6-nbase:1.4
	mjf-devfs2:1.4.0.52
	mjf-devfs2-base:1.4
	keiichi-mipv6:1.4.0.50
	keiichi-mipv6-base:1.4
	bouyer-xeni386-merge1:1.4
	vmlocking2-base3:1.4
	bouyer-xeni386-nbase:1.4
	yamt-kmem-base3:1.4
	cube-autoconf:1.4.0.48
	cube-autoconf-base:1.4
	yamt-kmem-base2:1.4
	bouyer-xeni386:1.4.0.46
	bouyer-xeni386-base:1.4
	yamt-kmem:1.4.0.44
	yamt-kmem-base:1.4
	vmlocking2-base2:1.4
	reinoud-bufcleanup-nbase:1.4
	vmlocking2:1.4.0.42
	vmlocking2-base1:1.4
	jmcneill-base:1.4
	mjf-devfs:1.4.0.40
	mjf-devfs-base:1.4
	bouyer-xenamd64-base2:1.4
	vmlocking-nbase:1.4
	yamt-x86pmap-base4:1.4
	bouyer-xenamd64:1.4.0.38
	bouyer-xenamd64-base:1.4
	yamt-x86pmap-base3:1.4
	yamt-x86pmap-base2:1.4
	yamt-x86pmap:1.4.0.36
	yamt-x86pmap-base:1.4
	jmcneill-pm:1.4.0.34
	jmcneill-pm-base:1.4
	hpcarm-cleanup:1.4.0.32
	hpcarm-cleanup-base:1.4
	mjf-ufs-trans-base:1.4
	yamt-idlelwp-base8:1.4
	ppcoea-renovation:1.4.0.30
	ppcoea-renovation-base:1.4
	reinoud-bufcleanup-base:1.4
	vmlocking:1.4.0.28
	vmlocking-base:1.4
	ad-audiomp:1.4.0.26
	ad-audiomp-base:1.4
	yamt-idlelwp:1.4.0.24
	post-newlock2-merge:1.4
	newlock2-nbase:1.4
	yamt-splraiseipl-base5:1.4
	yamt-splraiseipl-base4:1.4
	yamt-splraiseipl-base3:1.4
	yamt-splraiseipl-base2:1.4
	yamt-splraiseipl:1.4.0.22
	yamt-splraiseipl-base:1.4
	newlock2:1.4.0.20
	newlock2-base:1.4
	yamt-pdpolicy-base8:1.4
	yamt-pdpolicy-base7:1.4
	yamt-pdpolicy-base6:1.4
	gdamore-uart:1.4.0.18
	gdamore-uart-base:1.4
	simonb-timcounters-final:1.4
	yamt-pdpolicy-base5:1.4
	elad-kernelauth-nbase:1.4
	yamt-pdpolicy-base4:1.4
	yamt-pdpolicy-base3:1.4
	yamt-pdpolicy-base2:1.4
	yamt-pdpolicy:1.4.0.16
	yamt-pdpolicy-base:1.4
	yamt-uio_vmspace-base5:1.4
	simonb-timecounters:1.4.0.14
	simonb-timecounters-base:1.4
	rpaulo-netinet-merge-pcb:1.4.0.12
	rpaulo-netinet-merge-pcb-base:1.4
	yamt-uio_vmspace:1.4.0.10
	yamt-readahead-base3:1.4
	yamt-readahead-base2:1.4
	yamt-readahead:1.4.0.8
	yamt-readahead-base:1.4
	yamt-vop-base3:1.4
	netbsd-2-0-3-RELEASE:1.2.2.3
	netbsd-2-1:1.2.2.3.0.4
	yamt-vop-base2:1.4
	thorpej-vnode-attr:1.4.0.6
	thorpej-vnode-attr-base:1.4
	netbsd-2-1-RELEASE:1.2.2.3
	yamt-vop:1.4.0.4
	yamt-vop-base:1.4
	netbsd-2-1-RC6:1.2.2.3
	netbsd-2-1-RC5:1.2.2.3
	netbsd-2-1-RC4:1.2.2.3
	netbsd-2-1-RC3:1.2.2.3
	netbsd-2-1-RC2:1.2.2.3
	netbsd-2-1-RC1:1.2.2.3
	yamt-lazymbuf:1.4.0.2
	yamt-km-base4:1.4
	netbsd-2-0-2-RELEASE:1.2.2.3
	yamt-km-base3:1.4
	yamt-km-base2:1.3
	yamt-km:1.3.0.10
	yamt-km-base:1.3
	kent-audio2:1.3.0.8
	kent-audio2-base:1.3
	netbsd-2-0-1-RELEASE:1.2.2.3
	kent-audio1-beforemerge:1.3
	netbsd-2:1.2.2.3.0.2
	netbsd-2-base:1.2.2.3
	bouyer-xen2:1.3.0.6
	bouyer-xen2-base:1.3
	kent-audio1:1.3.0.4
	kent-audio1-base:1.3
	netbsd-2-0-RELEASE:1.2.2.3
	netbsd-2-0-RC5:1.2.2.3
	ktrace-lwp-newbase:1.3
	netbsd-2-0-RC4:1.2.2.3
	netbsd-2-0-RC3:1.2.2.3
	netbsd-2-0-RC2:1.2.2.3
	netbsd-2-0-RC1:1.2.2.3
	ktrace-lwp-base:1.3
	ktrace-lwp:1.3.0.2
	netbsd-2-0:1.2.0.2;
locks; strict;
comment	@# @;


1.4
date	2005.03.09.22.39.20;	author bouyer;	state dead;
branches;
next	1.3;

1.3
date	2004.06.21.18.20.09;	author jmc;	state Exp;
branches
	1.3.2.1
	1.3.6.1
	1.3.8.1
	1.3.10.1;
next	1.2;

1.2
date	2004.05.12.16.56.43;	author cl;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2004.04.17.23.20.37;	author cl;	state Exp;
branches;
next	;

1.3.2.1
date	2004.06.21.18.20.09;	author skrll;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2004.08.03.10.43.19;	author skrll;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2004.09.18.14.42.53;	author skrll;	state Exp;
branches;
next	1.3.2.4;

1.3.2.4
date	2004.09.21.13.24.45;	author skrll;	state Exp;
branches;
next	1.3.2.5;

1.3.2.5
date	2005.04.01.14.29.11;	author skrll;	state dead;
branches;
next	;

1.3.6.1
date	2005.03.09.18.39.39;	author bouyer;	state dead;
branches;
next	;

1.3.8.1
date	2005.04.29.11.28.30;	author kent;	state dead;
branches;
next	;

1.3.10.1
date	2005.03.19.08.33.26;	author yamt;	state dead;
branches;
next	;

1.2.2.1
date	2004.05.12.16.56.43;	author he;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2004.05.22.15.57.25;	author he;	state Exp;
branches;
next	1.2.2.3;

1.2.2.3
date	2004.06.22.07.52.22;	author tron;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Merge the bouyer-xen2 branch. This add supports for the Xen 2.0 virtual
machine kernel (both privileged and non-privileged domains), and remove support
for the old xen 1.2.
@
text
@# $NetBSD: Makefile,v 1.3 2004/06/21 18:20:09 jmc Exp $

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

TEXTADDR?=	c0100000

NOMAN=
PROG?=		xen12load

SOURCES?=	start.S xenload.c loadelf.c
SRCS= ${SOURCES}

.include <bsd.own.mk>

LIBCRT0=	# nothing
LIBCRTBEGIN=	# nothing
LIBCRTEND=	# nothing
LIBC=		# nothing

BINDIR=		/usr/mdec
BINMODE=	444

STRIP=

.PATH:	${.CURDIR}/.. ${.CURDIR}/../../lib

LDFLAGS+= -N -e load_start
CPPFLAGS+= -I ${S}/lib/libsa
CPPFLAGS+= -I ${.OBJDIR}/xen-ma -I ${.OBJDIR}

# Make sure we override any optimization options specified by the user
COPTS=  -Os

COPTS+=    -mcpu=i386

COPTS+=    -ffreestanding
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
CFLAGS+= -fPIC
CPPFLAGS+= -nostdinc -D_STANDALONE
CPPFLAGS+= -I$S


XEN_STAND_DIR?= $S/arch/xen/stand

.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN: machine i386 x86 lib
.NOPATH: machine i386 x86
.endif

realdepend realall: machine xen-ma i386 x86 lib
CLEANFILES+= machine i386 x86

machine::
	-rm -f $@@
	ln -s $S/arch/xen/include $@@

xen-ma::
	-rm -rf $@@
	mkdir $@@
	ln -s ../i386 $@@/machine

i386::
	-rm -f $@@
	ln -s $S/arch/i386/include $@@

x86::
	-rm -f $@@
	ln -s $S/arch/x86/include $@@

${OBJS}: machine i386 x86 lib

lib:
.ifdef LIBOBJ
	-rm -f $@@
	ln -s ${LIBOBJ}/lib .
	[ -d ${LIBOBJ}/lib ] || mkdir ${LIBOBJ}/lib
.else
	mkdir lib
.endif

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

cleandir distclean: cleanlibdir cleanxenmadir

cleanlibdir:
	-rm -rf lib

cleanxenmadir:
	-rm -rf xen-ma

LIBLIST= ${LIBSA}

CLEANFILES+= ${PROG}.tmp ${PROG}.tmp2

AWKPROG='\
	function x(v) { \
		printf "\\%o\\%o\\%o\\%o", v % 256, (v / 2^8) % 256, \
		    (v / 2^16) % 256, (v / 2^24) % 256 } \
	{ \
		printf "XenoGues"; \
		x($$1); \
	}'

${PROG}: ${OBJS} ${LIBLIST}
	${_MKTARGET_LINK}
	${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x${TEXTADDR} \
		${OBJS} ${LIBLIST}
	printf $$(printf %d 0x${TEXTADDR} | awk ${AWKPROG}) >${PROG}
	${OBJCOPY} -O binary -R .ident -R .comment ${PROG}.tmp ${PROG}.tmp2
	cat ${PROG}.tmp2 >>${PROG}
	rm -f ${PROG}.tmp ${PROG}.tmp2

proginstall:
#

XEN12LOAD_DIR= ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/xen12load/

release: check_RELEASEDIR .WAIT ${PROG}
	${_MKMSG_INSTALL} ${PROG}.gz
	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${PROG} ${XEN12LOAD_DIR}
	@@rm -f ${XEN12LOAD_DIR}xen12load.gz
	gzip -9 ${XEN12LOAD_DIR}xen12load

.include <bsd.prog.mk>
@


1.3
log
@Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2004/05/12 16:56:43 cl Exp $
@


1.3.2.1
log
@file Makefile was added on branch ktrace-lwp on 2004-08-03 10:43:19 +0000
@
text
@d1 130
@


1.3.2.2
log
@Sync with HEAD
@
text
@a0 130
# $NetBSD: Makefile,v 1.3.2.1 2004/08/03 10:43:19 skrll Exp $

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

TEXTADDR?=	c0100000

NOMAN=
PROG?=		xen12load

SOURCES?=	start.S xenload.c loadelf.c
SRCS= ${SOURCES}

.include <bsd.own.mk>

LIBCRT0=	# nothing
LIBCRTBEGIN=	# nothing
LIBCRTEND=	# nothing
LIBC=		# nothing

BINDIR=		/usr/mdec
BINMODE=	444

STRIP=

.PATH:	${.CURDIR}/.. ${.CURDIR}/../../lib

LDFLAGS+= -N -e load_start
CPPFLAGS+= -I ${S}/lib/libsa
CPPFLAGS+= -I ${.OBJDIR}/xen-ma -I ${.OBJDIR}

# Make sure we override any optimization options specified by the user
COPTS=  -Os

COPTS+=    -mcpu=i386

COPTS+=    -ffreestanding
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
CFLAGS+= -fPIC
CPPFLAGS+= -nostdinc -D_STANDALONE
CPPFLAGS+= -I$S


XEN_STAND_DIR?= $S/arch/xen/stand

.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN: machine i386 x86 lib
.NOPATH: machine i386 x86
.endif

realdepend realall: machine xen-ma i386 x86 lib
CLEANFILES+= machine i386 x86

machine::
	-rm -f $@@
	ln -s $S/arch/xen/include $@@

xen-ma::
	-rm -rf $@@
	mkdir $@@
	ln -s ../i386 $@@/machine

i386::
	-rm -f $@@
	ln -s $S/arch/i386/include $@@

x86::
	-rm -f $@@
	ln -s $S/arch/x86/include $@@

${OBJS}: machine i386 x86 lib

lib:
.ifdef LIBOBJ
	-rm -f $@@
	ln -s ${LIBOBJ}/lib .
	[ -d ${LIBOBJ}/lib ] || mkdir ${LIBOBJ}/lib
.else
	mkdir lib
.endif

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

cleandir distclean: cleanlibdir cleanxenmadir

cleanlibdir:
	-rm -rf lib

cleanxenmadir:
	-rm -rf xen-ma

LIBLIST= ${LIBSA}

CLEANFILES+= ${PROG}.tmp ${PROG}.tmp2

AWKPROG='\
	function x(v) { \
		printf "\\%o\\%o\\%o\\%o", v % 256, (v / 2^8) % 256, \
		    (v / 2^16) % 256, (v / 2^24) % 256 } \
	{ \
		printf "XenoGues"; \
		x($$1); \
	}'

${PROG}: ${OBJS} ${LIBLIST}
	${_MKTARGET_LINK}
	${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x${TEXTADDR} \
		${OBJS} ${LIBLIST}
	printf $$(printf %d 0x${TEXTADDR} | awk ${AWKPROG}) >${PROG}
	${OBJCOPY} -O binary -R .ident -R .comment ${PROG}.tmp ${PROG}.tmp2
	cat ${PROG}.tmp2 >>${PROG}
	rm -f ${PROG}.tmp ${PROG}.tmp2

proginstall:
#

XEN12LOAD_DIR= ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/xen12load/

release: check_RELEASEDIR .WAIT ${PROG}
	${_MKMSG_INSTALL} ${PROG}.gz
	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${PROG} ${XEN12LOAD_DIR}
	@@rm -f ${XEN12LOAD_DIR}xen12load.gz
	gzip -9 ${XEN12LOAD_DIR}xen12load

.include <bsd.prog.mk>
@


1.3.2.3
log
@Sync with HEAD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3.2.2 2004/09/18 14:42:53 skrll Exp $
@


1.3.2.4
log
@Fix the sync with head I botched.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3.2.3 2004/09/21 13:24:45 skrll Exp $
@


1.3.2.5
log
@Sync with HEAD.
@
text
@d1 130
@


1.3.8.1
log
@sync with -current
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2004/06/21 18:20:09 jmc Exp $
@


1.3.10.1
log
@sync with head.  xen and whitespace.  xen part is not finished.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2004/06/21 18:20:09 jmc Exp $
@


1.3.6.1
log
@Not used any more.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2004/06/21 18:20:09 jmc Exp $
@


1.2
log
@``build.sh -m xen-i386 release'' now builds a release for NetBSD/xen
for i386.  The resulting release consists of:
- NetBSD/xen for i386 kernel, loader and docuemntation
- NetBSD/i386 userland sets
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2004/04/17 23:20:37 cl Exp $
d92 1
a92 1
	rm -rf lib
d95 1
a95 1
	rm -rf xen-ma
@


1.2.2.1
log
@file Makefile was added on branch netbsd-2-0 on 2004-05-22 15:57:25 +0000
@
text
@d1 130
@


1.2.2.2
log
@Pull up revisions 1.1-1.2 (requested by cl in ticket #337):
	Upgrade xen support:
	 - add block device driver
	 - network device driver bug fixes
	 - support for vga/keyboard/mouse
	 - support for domain0 operations
	 - fix /dev/mem and i386_iopl, reboot, event dispatch
	 - fix clock support, cpu speed report, lazy fpu switching
	 - add xen12load loader
	 - sys/arch/xen parts of build.sh release support
	[cl, ticket #337]
@
text
@a0 130
# $NetBSD: Makefile,v 1.2.2.1 2004/05/22 15:57:25 he Exp $

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

TEXTADDR?=	c0100000

NOMAN=
PROG?=		xen12load

SOURCES?=	start.S xenload.c loadelf.c
SRCS= ${SOURCES}

.include <bsd.own.mk>

LIBCRT0=	# nothing
LIBCRTBEGIN=	# nothing
LIBCRTEND=	# nothing
LIBC=		# nothing

BINDIR=		/usr/mdec
BINMODE=	444

STRIP=

.PATH:	${.CURDIR}/.. ${.CURDIR}/../../lib

LDFLAGS+= -N -e load_start
CPPFLAGS+= -I ${S}/lib/libsa
CPPFLAGS+= -I ${.OBJDIR}/xen-ma -I ${.OBJDIR}

# Make sure we override any optimization options specified by the user
COPTS=  -Os

COPTS+=    -mcpu=i386

COPTS+=    -ffreestanding
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
CFLAGS+= -fPIC
CPPFLAGS+= -nostdinc -D_STANDALONE
CPPFLAGS+= -I$S


XEN_STAND_DIR?= $S/arch/xen/stand

.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN: machine i386 x86 lib
.NOPATH: machine i386 x86
.endif

realdepend realall: machine xen-ma i386 x86 lib
CLEANFILES+= machine i386 x86

machine::
	-rm -f $@@
	ln -s $S/arch/xen/include $@@

xen-ma::
	-rm -rf $@@
	mkdir $@@
	ln -s ../i386 $@@/machine

i386::
	-rm -f $@@
	ln -s $S/arch/i386/include $@@

x86::
	-rm -f $@@
	ln -s $S/arch/x86/include $@@

${OBJS}: machine i386 x86 lib

lib:
.ifdef LIBOBJ
	-rm -f $@@
	ln -s ${LIBOBJ}/lib .
	[ -d ${LIBOBJ}/lib ] || mkdir ${LIBOBJ}/lib
.else
	mkdir lib
.endif

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

cleandir distclean: cleanlibdir cleanxenmadir

cleanlibdir:
	rm -rf lib

cleanxenmadir:
	rm -rf xen-ma

LIBLIST= ${LIBSA}

CLEANFILES+= ${PROG}.tmp ${PROG}.tmp2

AWKPROG='\
	function x(v) { \
		printf "\\%o\\%o\\%o\\%o", v % 256, (v / 2^8) % 256, \
		    (v / 2^16) % 256, (v / 2^24) % 256 } \
	{ \
		printf "XenoGues"; \
		x($$1); \
	}'

${PROG}: ${OBJS} ${LIBLIST}
	${_MKTARGET_LINK}
	${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x${TEXTADDR} \
		${OBJS} ${LIBLIST}
	printf $$(printf %d 0x${TEXTADDR} | awk ${AWKPROG}) >${PROG}
	${OBJCOPY} -O binary -R .ident -R .comment ${PROG}.tmp ${PROG}.tmp2
	cat ${PROG}.tmp2 >>${PROG}
	rm -f ${PROG}.tmp ${PROG}.tmp2

proginstall:
#

XEN12LOAD_DIR= ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/xen12load/

release: check_RELEASEDIR .WAIT ${PROG}
	${_MKMSG_INSTALL} ${PROG}.gz
	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${PROG} ${XEN12LOAD_DIR}
	@@rm -f ${XEN12LOAD_DIR}xen12load.gz
	gzip -9 ${XEN12LOAD_DIR}xen12load

.include <bsd.prog.mk>
@


1.2.2.3
log
@Pull up revision 1.3 (requested by jmc in ticket #531):
Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2.2.2 2004/06/22 07:52:22 tron Exp $
d92 1
a92 1
	-rm -rf lib
d95 1
a95 1
	-rm -rf xen-ma
@


1.1
log
@Loader which allows booting NetBSD as domain0 guest OS.
@
text
@d1 1
a1 1
# $NetBSD$
d119 11
@
