head	1.22;
access;
symbols
	netbsd-11-0-RC4:1.22
	netbsd-11-0-RC3:1.22
	netbsd-11-0-RC2:1.22
	netbsd-11-0-RC1:1.22
	perseant-exfatfs-base-20250801:1.22
	netbsd-11:1.22.0.34
	netbsd-11-base:1.22
	netbsd-10-1-RELEASE:1.22
	perseant-exfatfs-base-20240630:1.22
	perseant-exfatfs:1.22.0.32
	perseant-exfatfs-base:1.22
	netbsd-8-3-RELEASE:1.20
	netbsd-9-4-RELEASE:1.20
	netbsd-10-0-RELEASE:1.22
	netbsd-10-0-RC6:1.22
	netbsd-10-0-RC5:1.22
	netbsd-10-0-RC4:1.22
	netbsd-10-0-RC3:1.22
	netbsd-10-0-RC2:1.22
	thorpej-ifq:1.22.0.30
	thorpej-ifq-base:1.22
	thorpej-altq-separation:1.22.0.28
	thorpej-altq-separation-base:1.22
	netbsd-10-0-RC1:1.22
	netbsd-10:1.22.0.26
	netbsd-10-base:1.22
	bouyer-sunxi-drm:1.22.0.24
	bouyer-sunxi-drm-base:1.22
	netbsd-9-3-RELEASE:1.20
	thorpej-i2c-spi-conf2:1.22.0.22
	thorpej-i2c-spi-conf2-base:1.22
	thorpej-futex2:1.22.0.20
	thorpej-futex2-base:1.22
	thorpej-cfargs2:1.22.0.18
	thorpej-cfargs2-base:1.22
	cjep_sun2x-base1:1.22
	cjep_sun2x:1.22.0.16
	cjep_sun2x-base:1.22
	cjep_staticlib_x-base1:1.22
	netbsd-9-2-RELEASE:1.20
	cjep_staticlib_x:1.22.0.14
	cjep_staticlib_x-base:1.22
	thorpej-i2c-spi-conf:1.22.0.12
	thorpej-i2c-spi-conf-base:1.22
	thorpej-cfargs:1.22.0.10
	thorpej-cfargs-base:1.22
	thorpej-futex:1.22.0.8
	thorpej-futex-base:1.22
	netbsd-9-1-RELEASE:1.20
	bouyer-xenpvh-base2:1.22
	phil-wifi-20200421:1.22
	bouyer-xenpvh-base1:1.22
	phil-wifi-20200411:1.22
	bouyer-xenpvh:1.22.0.6
	bouyer-xenpvh-base:1.22
	is-mlppp:1.22.0.4
	is-mlppp-base:1.22
	phil-wifi-20200406:1.22
	netbsd-8-2-RELEASE:1.20
	ad-namecache-base3:1.22
	netbsd-9-0-RELEASE:1.20
	netbsd-9-0-RC2:1.20
	ad-namecache-base2:1.22
	ad-namecache-base1:1.22
	ad-namecache:1.22.0.2
	ad-namecache-base:1.22
	netbsd-9-0-RC1:1.20
	phil-wifi-20191119:1.22
	netbsd-9:1.20.0.18
	netbsd-9-base:1.20
	phil-wifi-20190609:1.20
	netbsd-8-1-RELEASE:1.20
	netbsd-8-1-RC1:1.20
	isaki-audio2:1.20.0.16
	isaki-audio2-base:1.20
	pgoyette-compat-merge-20190127:1.20
	pgoyette-compat-20190127:1.20
	pgoyette-compat-20190118:1.20
	pgoyette-compat-1226:1.20
	pgoyette-compat-1126:1.20
	pgoyette-compat-1020:1.20
	pgoyette-compat-0930:1.20
	pgoyette-compat-0906:1.20
	netbsd-7-2-RELEASE:1.16
	pgoyette-compat-0728:1.20
	netbsd-8-0-RELEASE:1.20
	phil-wifi:1.20.0.14
	phil-wifi-base:1.20
	pgoyette-compat-0625:1.20
	netbsd-8-0-RC2:1.20
	pgoyette-compat-0521:1.20
	pgoyette-compat-0502:1.20
	pgoyette-compat-0422:1.20
	netbsd-8-0-RC1:1.20
	pgoyette-compat-0415:1.20
	pgoyette-compat-0407:1.20
	pgoyette-compat-0330:1.20
	pgoyette-compat-0322:1.20
	pgoyette-compat-0315:1.20
	netbsd-7-1-2-RELEASE:1.16
	pgoyette-compat:1.20.0.12
	pgoyette-compat-base:1.20
	netbsd-7-1-1-RELEASE:1.16
	tls-maxphys-base-20171202:1.20
	matt-nb8-mediatek:1.20.0.10
	matt-nb8-mediatek-base:1.20
	nick-nhusb-base-20170825:1.20
	perseant-stdc-iso10646:1.20.0.8
	perseant-stdc-iso10646-base:1.20
	netbsd-8:1.20.0.6
	netbsd-8-base:1.20
	prg-localcount2-base3:1.20
	prg-localcount2-base2:1.20
	prg-localcount2-base1:1.20
	prg-localcount2:1.20.0.4
	prg-localcount2-base:1.20
	pgoyette-localcount-20170426:1.20
	bouyer-socketcan-base1:1.20
	jdolecek-ncq:1.20.0.2
	jdolecek-ncq-base:1.20
	pgoyette-localcount-20170320:1.19
	netbsd-7-1:1.16.0.10
	netbsd-7-1-RELEASE:1.16
	netbsd-7-1-RC2:1.16
	nick-nhusb-base-20170204:1.18
	netbsd-7-nhusb-base-20170116:1.16
	bouyer-socketcan:1.18.0.4
	bouyer-socketcan-base:1.18
	pgoyette-localcount-20170107:1.18
	netbsd-7-1-RC1:1.16
	nick-nhusb-base-20161204:1.18
	pgoyette-localcount-20161104:1.18
	netbsd-7-0-2-RELEASE:1.16
	nick-nhusb-base-20161004:1.18
	localcount-20160914:1.18
	netbsd-7-nhusb:1.16.0.8
	netbsd-7-nhusb-base:1.16
	pgoyette-localcount-20160806:1.18
	pgoyette-localcount-20160726:1.18
	pgoyette-localcount:1.18.0.2
	pgoyette-localcount-base:1.18
	nick-nhusb-base-20160907:1.18
	nick-nhusb-base-20160529:1.18
	netbsd-7-0-1-RELEASE:1.16
	nick-nhusb-base-20160422:1.18
	nick-nhusb-base-20160319:1.18
	nick-nhusb-base-20151226:1.17
	netbsd-7-0:1.16.0.6
	netbsd-7-0-RELEASE:1.16
	nick-nhusb-base-20150921:1.17
	netbsd-7-0-RC3:1.16
	netbsd-7-0-RC2:1.16
	netbsd-7-0-RC1:1.16
	nick-nhusb-base-20150606:1.17
	nick-nhusb-base-20150406:1.17
	nick-nhusb:1.17.0.2
	nick-nhusb-base:1.17
	netbsd-6-0-6-RELEASE:1.8
	netbsd-6-1-5-RELEASE:1.8
	netbsd-7:1.16.0.4
	netbsd-7-base:1.16
	yamt-pagecache-base9:1.16
	yamt-pagecache-tag8:1.6.4.1
	netbsd-6-1-4-RELEASE:1.8
	netbsd-6-0-5-RELEASE:1.8
	tls-earlyentropy:1.16.0.2
	tls-earlyentropy-base:1.16
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.16
	riastradh-drm2-base3:1.16
	netbsd-6-1-3-RELEASE:1.8
	netbsd-6-0-4-RELEASE:1.8
	netbsd-6-1-2-RELEASE:1.8
	netbsd-6-0-3-RELEASE:1.8
	rmind-smpnet-nbase:1.16
	netbsd-6-1-1-RELEASE:1.8
	riastradh-drm2-base2:1.10
	riastradh-drm2-base1:1.10
	riastradh-drm2:1.10.0.6
	riastradh-drm2-base:1.10
	rmind-smpnet:1.10.0.4
	rmind-smpnet-base:1.16
	netbsd-6-1:1.8.0.14
	netbsd-6-0-2-RELEASE:1.8
	netbsd-6-1-RELEASE:1.8
	khorben-n900:1.10.0.2
	netbsd-6-1-RC4:1.8
	netbsd-6-1-RC3:1.8
	agc-symver:1.8.0.12
	agc-symver-base:1.8
	netbsd-6-1-RC2:1.8
	netbsd-6-1-RC1:1.8
	yamt-pagecache-base8:1.8
	netbsd-6-0-1-RELEASE:1.8
	yamt-pagecache-base7:1.8
	matt-nb6-plus-nbase:1.8
	yamt-pagecache-base6:1.8
	netbsd-6-0:1.8.0.8
	netbsd-6-0-RELEASE:1.8
	netbsd-6-0-RC2:1.8
	tls-maxphys:1.8.0.6
	tls-maxphys-base:1.16
	matt-nb6-plus:1.8.0.4
	matt-nb6-plus-base:1.8
	netbsd-6-0-RC1:1.8
	jmcneill-usbmp-base10:1.8
	yamt-pagecache-base5:1.8
	jmcneill-usbmp-base9:1.8
	yamt-pagecache-base4:1.8
	jmcneill-usbmp-base8:1.8
	jmcneill-usbmp-base7:1.8
	jmcneill-usbmp-base6:1.8
	jmcneill-usbmp-base5:1.8
	jmcneill-usbmp-base4:1.8
	jmcneill-usbmp-base3:1.8
	jmcneill-usbmp-pre-base2:1.6
	jmcneill-usbmp-base2:1.8
	netbsd-6:1.8.0.2
	netbsd-6-base:1.8
	jmcneill-usbmp:1.6.0.8
	jmcneill-usbmp-base:1.6
	jmcneill-audiomp3:1.6.0.6
	jmcneill-audiomp3-base:1.6
	yamt-pagecache-base3:1.6
	yamt-pagecache-base2:1.6
	yamt-pagecache:1.6.0.4
	yamt-pagecache-base:1.6
	rmind-uvmplock-nbase:1.6
	cherry-xenmp:1.6.0.2
	cherry-xenmp-base:1.6
	uebayasi-xip-base7:1.6
	bouyer-quota2-nbase:1.6
	bouyer-quota2:1.4.0.4
	bouyer-quota2-base:1.6
	jruoho-x86intr:1.4.0.2
	jruoho-x86intr-base:1.4
	matt-mips64-premerge-20101231:1.4
	uebayasi-xip-base6:1.4
	uebayasi-xip-base5:1.4
	uebayasi-xip-base4:1.4
	uebayasi-xip-base3:1.4
	yamt-nfs-mp-base11:1.4
	uebayasi-xip-base2:1.4
	yamt-nfs-mp-base10:1.4
	uebayasi-xip-base1:1.3
	rmind-uvmplock:1.3.0.8
	rmind-uvmplock-base:1.6
	yamt-nfs-mp-base9:1.3
	uebayasi-xip:1.3.0.6
	uebayasi-xip-base:1.3
	matt-premerge-20091211:1.3
	yamt-nfs-mp-base8:1.3
	yamt-nfs-mp-base7:1.3
	jymxensuspend-base:1.3
	yamt-nfs-mp-base6:1.3
	yamt-nfs-mp-base5:1.3
	yamt-nfs-mp-base4:1.3
	jym-xensuspend-base:1.6
	jym-xensuspend:1.3.0.4
	jym-xensuspend-nbase:1.6
	yamt-nfs-mp:1.3.0.2
	yamt-nfs-mp-base3:1.3
	nick-hppapmap-base4:1.3
	nick-hppapmap-base:1.3
	nick-hppapmap-base3:1.3
	nick-hppapmap:1.2.0.2
	nick-hppapmap-base2:1.2;
locks; strict;
comment	@# @;


1.22
date	2019.10.24.18.46.21;	author christos;	state Exp;
branches;
next	1.21;
commitid	Rj6tOeEFFt6Mn9IB;

1.21
date	2019.09.23.13.42.37;	author christos;	state Exp;
branches;
next	1.20;
commitid	6ImXbYN9X0dSK8EB;

1.20
date	2017.04.08.19.53.23;	author christos;	state Exp;
branches
	1.20.14.1;
next	1.19;
commitid	mAo8FJwd588QFLMz;

1.19
date	2017.02.22.12.51.38;	author maya;	state Exp;
branches;
next	1.18;
commitid	VHQQEFx0pcmjMWGz;

1.18
date	2016.01.31.15.32.12;	author christos;	state Exp;
branches
	1.18.2.1
	1.18.4.1;
next	1.17;
commitid	E1svwpcw8vHf96Ty;

1.17
date	2014.08.27.03.17.21;	author matt;	state Exp;
branches
	1.17.2.1;
next	1.16;
commitid	9nqLBbabSxDlRWNx;

1.16
date	2014.01.12.15.26.31;	author tsutsui;	state Exp;
branches;
next	1.15;
commitid	YjbnVt32CCoKaQkx;

1.15
date	2013.12.15.18.08.37;	author joerg;	state Exp;
branches;
next	1.14;
commitid	nZqOOUhhkcW4Zfhx;

1.14
date	2013.12.05.16.26.04;	author joerg;	state Exp;
branches;
next	1.13;
commitid	jpx9p027A726KXfx;

1.13
date	2013.11.04.21.30.16;	author christos;	state Exp;
branches;
next	1.12;
commitid	DiXoOmz3NAEiq0cx;

1.12
date	2013.08.15.21.41.09;	author matt;	state Exp;
branches;
next	1.11;
commitid	GJoRkipSgA5o5B1x;

1.11
date	2013.08.12.22.50.51;	author matt;	state Exp;
branches;
next	1.10;
commitid	4wh2zuu45Fslzd1x;

1.10
date	2013.05.02.03.56.42;	author matt;	state Exp;
branches
	1.10.4.1;
next	1.9;

1.9
date	2013.05.01.22.16.16;	author matt;	state Exp;
branches;
next	1.8;

1.8
date	2012.01.18.23.12.21;	author nonaka;	state Exp;
branches
	1.8.6.1;
next	1.7;

1.7
date	2011.12.25.06.09.10;	author tsutsui;	state Exp;
branches;
next	1.6;

1.6
date	2011.01.23.13.17.02;	author joerg;	state Exp;
branches
	1.6.4.1
	1.6.8.1;
next	1.5;

1.5
date	2011.01.22.19.19.25;	author joerg;	state Exp;
branches;
next	1.4;

1.4
date	2010.05.27.06.58.15;	author dholland;	state Exp;
branches
	1.4.2.1
	1.4.4.1;
next	1.3;

1.3
date	2009.04.13.12.25.36;	author nonaka;	state Exp;
branches
	1.3.2.1
	1.3.4.1
	1.3.6.1
	1.3.8.1;
next	1.2;

1.2
date	2009.03.03.09.20.55;	author nonaka;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2009.03.02.09.33.02;	author nonaka;	state Exp;
branches;
next	;

1.20.14.1
date	2020.04.13.08.04.13;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.18.2.1
date	2017.03.20.06.57.23;	author pgoyette;	state Exp;
branches;
next	1.18.2.2;
commitid	jjw7cAwgyKq7RfKz;

1.18.2.2
date	2017.04.26.02.53.09;	author pgoyette;	state Exp;
branches;
next	;
commitid	ojV02aOSdzvBqZOz;

1.18.4.1
date	2017.04.21.16.53.40;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.17.2.1
date	2016.03.19.11.30.07;	author skrll;	state Exp;
branches;
next	1.17.2.2;
commitid	2PHKtPSg1vDV9fZy;

1.17.2.2
date	2017.08.28.17.51.57;	author skrll;	state Exp;
branches;
next	;
commitid	UQQpnjvcNkUZn05A;

1.10.4.1
date	2013.08.28.23.59.24;	author rmind;	state Exp;
branches;
next	1.10.4.2;
commitid	cbp9Ov2uYijlqh3x;

1.10.4.2
date	2014.05.18.17.45.31;	author rmind;	state Exp;
branches;
next	;
commitid	mL5ZYSzpqK6QS2Bx;

1.8.6.1
date	2013.06.23.06.20.15;	author tls;	state Exp;
branches;
next	1.8.6.2;
commitid	eVjr9caYRQbRGHUw;

1.8.6.2
date	2014.08.20.00.03.30;	author tls;	state Exp;
branches;
next	1.8.6.3;
commitid	jTnpym9Qu0o4R1Nx;

1.8.6.3
date	2017.12.03.11.36.52;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;

1.6.4.1
date	2012.04.17.00.07.13;	author yamt;	state Exp;
branches;
next	1.6.4.2;

1.6.4.2
date	2014.05.22.11.40.15;	author yamt;	state Exp;
branches;
next	;
commitid	VUUXuyNWnt3AKwBx;

1.6.8.1
date	2012.02.18.07.33.51;	author mrg;	state Exp;
branches;
next	;

1.4.2.1
date	2011.06.06.09.07.13;	author jruoho;	state Exp;
branches;
next	;

1.4.4.1
date	2011.02.08.16.19.45;	author bouyer;	state Exp;
branches;
next	;

1.3.2.1
date	2009.04.13.12.25.36;	author yamt;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2009.05.04.08.12.16;	author yamt;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2010.08.11.22.53.01;	author yamt;	state Exp;
branches;
next	;

1.3.4.1
date	2009.04.13.12.25.36;	author jym;	state dead;
branches;
next	1.3.4.2;

1.3.4.2
date	2009.05.13.17.18.54;	author jym;	state Exp;
branches;
next	;

1.3.6.1
date	2010.08.17.06.45.37;	author uebayasi;	state Exp;
branches;
next	;

1.3.8.1
date	2010.05.30.05.17.14;	author rmind;	state Exp;
branches;
next	1.3.8.2;

1.3.8.2
date	2011.03.05.20.52.36;	author rmind;	state Exp;
branches;
next	;

1.2.2.1
date	2009.03.03.09.20.55;	author skrll;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2009.03.03.18.29.50;	author skrll;	state Exp;
branches;
next	1.2.2.3;

1.2.2.3
date	2009.04.28.07.35.02;	author skrll;	state Exp;
branches;
next	;


desc
@@


1.22
log
@1. All Makefiles that use ARM_APCS_FLAGS add -marm unconditionally and
   bsd.own.mk also adds it for gcc only (so we end up with 2 -marm for gcc).
   Just add -marm unconditionally in bsd.own.mk in ARM_APCS_FLAGS and remove
   it from everywhere else.
2. gcc-8 now warns about thumb internetwork in APCS mode. This does not make
   sense because the documentation says that this flag does not make a
   difference in apcs mode, but might produce larger code in non-APCS mode.
   So we just add it to silence the warnings.
@
text
@#	$NetBSD: Makefile,v 1.21 2019/09/23 13:42:37 christos Exp $

PROG=		zboot

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

SRCS=		crt0.c
SRCS+=		boot.c bootinfo.c bootmenu.c conf.c devopen.c diskprobe.c
SRCS+=		loadfile_zboot.c
SRCS+=		getsecs.c termios.c unixcons.c unixdev.c unixsys.S
SRCS+=		pathfs.c

NOMAN=		# defined

.include <bsd.init.mk>

CFLAGS+=	-Wall -Wno-main
CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
CFLAGS+=	-fno-stack-protector -fno-builtin -ffreestanding
CFLAGS+=	-fno-unwind-tables
CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S}
CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
CPPFLAGS+=	-DLIBSA_ENABLE_LS_OP
CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
CPUFLAGS=
AFLAGS+=	-D_LOCORE
LDFLAGS+=	-nostdlib -Bstatic

LIBCRT0=	crt0.o
LIBCRTI=	# nothing
LIBC=		# nothing
LIBCRTBEGIN=	# nothing
LIBCRTEND=	# nothing

NEWVERSWHAT?=   "Boot"

### 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 SA_ENABLE_LS_OP=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}

${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
	${_MKTARGET_LINK}
	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}

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

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

cleandir distclean: .WAIT cleanlibdir

cleanlibdir:
	-rm -rf lib

release: check_RELEASEDIR
	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
	    ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation
@


1.21
log
@Consistently use ${RELEASEDIR}/${RELEASEMACHINE} instead of
${RELEASEDIR}/${MACHINE} (Paul Ripke)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.20 2017/04/08 19:53:23 christos Exp $
a24 1
CPPFLAGS+=	-marm
@


1.20
log
@centralize vers.c building for standalone programs.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.19 2017/02/22 12:51:38 maya Exp $
d70 1
a70 1
	    ${RELEASEDIR}/${MACHINE}/installation
@


1.20.14.1
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d1 1
a1 1
#	$NetBSD$
d25 1
d70 1
a70 1
	    ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation
@


1.19
log
@GC more logic that was intended for GCC <4.8 (or !LLVM)

Same as before (-marm implies -mno-thumb), but now the condition was flipped
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 2016/01/31 15:32:12 christos Exp $
a29 2
CLEANFILES+=	vers.c vers.o

a36 1
VERSIONFILE?=	${.CURDIR}/version
d54 1
a54 1
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${VERSIONFILE}
d56 3
a58 4
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${VERSIONFILE} zaurus ${NEWVERSWHAT}
	${CC} ${CFLAGS} ${CPPFLAGS} -c vers.c
	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN}
@


1.18
log
@include bsd.init.mk to get Makefile.inc
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.17 2014/08/27 03:17:21 matt Exp $
a24 1
.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48
a25 3
.else
CPPFLAGS+=	-mno-thumb -mno-thumb-interwork
.endif
@


1.18.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.20 2017/04/08 19:53:23 christos Exp $
d25 1
d27 3
d34 2
d43 1
d61 1
a61 1
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
d63 4
a66 3
	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}

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


1.18.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.19 2017/02/22 12:51:38 maya Exp $
d25 1
d27 3
@


1.18.2.2
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.20 2017/04/08 19:53:23 christos Exp $
d30 2
d39 1
d57 1
a57 1
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
d59 4
a62 3
	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}

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


1.17
log
@Don't use ${MACHINE} but zaurus instead.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.16 2014/01/12 15:26:31 tsutsui Exp $
d15 1
a15 1
.include <bsd.own.mk>
@


1.17.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 2016/01/31 15:32:12 christos Exp $
d15 1
a15 1
.include <bsd.init.mk>
@


1.17.2.2
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.17.2.1 2016/03/19 11:30:07 skrll Exp $
d25 1
d27 3
d34 2
d43 1
d61 1
a61 1
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
d63 4
a66 3
	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}

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


1.16
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.15 2013/12/15 18:08:37 joerg Exp $
d64 1
a64 1
	    ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT}
@


1.15
log
@Move flags for ARM's APCS ABI into a common variable. Add some forces to
deal with limitations in the Clang <-> LLVM backend interaction to pick
the correct ABI and target assembler.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.14 2013/12/05 16:26:04 joerg Exp $
d37 1
@


1.14
log
@Use -marm for clang builds, too.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.13 2013/11/04 21:30:16 christos Exp $
d24 1
a24 1
CPPFLAGS+=	-mabi=apcs-gnu -mfloat-abi=soft -mcpu=xscale
@


1.13
log
@fix more -mno-thumb.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 2013/08/15 21:41:09 matt Exp $
d25 3
a27 1
.if ${HAVE_GCC} < 48
a28 2
.else
CPPFLAGS+=	-marm
@


1.12
log
@Add CPPFLAGS+= -mno-thumb -mno-thumb-interwork
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2013/08/12 22:50:51 matt Exp $
d25 1
d27 3
@


1.11
log
@Add -fno-unwind-tables
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2013/05/02 03:56:42 matt Exp $
d25 1
@


1.10
log
@This change arm, armeb, earm, earmeb, earmhf, earmhfeb so all builds that
share a MACHINE_ARCH for userland so that except for etc, will produce
identical sets.

usr/include/machine now points to usr/include/arm
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2013/05/01 22:16:16 matt Exp $
d20 1
@


1.10.4.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD$
a19 1
CFLAGS+=	-fno-unwind-tables
a23 1
CPPFLAGS+=	-mno-thumb -mno-thumb-interwork
@


1.10.4.2
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10.4.1 2013/08/28 23:59:24 rmind Exp $
d24 1
a24 4
CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48
CPPFLAGS+=	-marm
.else
a25 1
.endif
a32 1
LIBCRTI=	# nothing
@


1.9
log
@Force abi/float-abi/cpu
Only allow to build on little-endian.
Force MACHINE to be zaurus.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2012/01/18 23:12:21 nonaka Exp $
d58 1
a58 1
	${CC} -c vers.c
@


1.8
log
@Support to read the kernel from local file system.

ex. boot path:/mnt/card/netbsd
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2011/12/25 06:09:10 tsutsui Exp $
d23 2
d55 1
@


1.8.6.1
log
@resync from head
@
text
@d1 1
a1 1
#	$NetBSD$
a22 2
CPPFLAGS+=	-mabi=apcs-gnu -mfloat-abi=soft -mcpu=xscale
CPUFLAGS=
a52 1
	${_MKTARGET_LINK}
d55 1
a55 1
	${CC} ${CFLAGS} ${CPPFLAGS} -c vers.c
@


1.8.6.2
log
@Rebase to HEAD as of a few days ago.
@
text
@a19 1
CFLAGS+=	-fno-unwind-tables
d23 1
a23 6
CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48
CPPFLAGS+=	-marm
.else
CPPFLAGS+=	-mno-thumb -mno-thumb-interwork
.endif
a30 1
LIBCRTI=	# nothing
@


1.8.6.3
log
@update from HEAD
@
text
@d15 1
a15 1
.include <bsd.init.mk>
d25 1
d27 3
d34 2
d43 1
d61 1
a61 1
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
d63 4
a66 3
	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}

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


1.7
log
@Apply the following patch submitted by Evgeniy Ivanov:
http://mail-index.NetBSD.org/tech-kern/2011/12/15/msg012226.html
http://mail-index.NetBSD.org/tech-kern/2011/12/17/msg012229.html

 - add 'ls' op to struct fs_ops to support ls command on each fs,
   enabled by -DLIBSA_ENABLE_LS_OP and SAMISCMAKEFLAGS+="SA_ENABLE_LS_OP=yes"
   in libsa
 - split sys/lib/libsa/ufs_ls.c into UFS specific part and MI part (ls.c)
   that opens the target fs and calls fs-depedent XXX_ls() functions
 - add a ls op for ext2fs
   (all other fs than ufs and ext2fs don't have actual ls ops yet)
 - replace existing MD ufs_ls() calls with this new MI ls()

The original patch was written for i386 and ext2fs.
zaurus zboot has been tested by nonaka@@.
ews4800mips and x68k loaders have been tested by me (with several fixes).
landisk might be okay since it was almost copied from i386.

XXX1: "ls" op in fs_ops looks a bit inconsistent, but we will be able to
      replace it with real fs ops like readdir if it's really worth
XXX2: someone might have to check sys/arch/ia64/stand/efi/libefi/efifs_ls.c
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2011/01/23 13:17:02 joerg Exp $
d11 1
d37 1
a37 1
KERN_AS=		library
d52 1
a52 1
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
@


1.6
log
@Defer bsd.own.mk include after NOMAN.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2011/01/22 19:19:25 joerg Exp $
d21 1
d47 1
a47 1
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
@


1.6.4.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2011/01/23 13:17:02 joerg Exp $
a10 1
SRCS+=		pathfs.c
a20 1
CPPFLAGS+=	-DLIBSA_ENABLE_LS_OP
d35 1
a35 1
KERN_AS=	library
d46 1
a46 1
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes SA_ENABLE_LS_OP=yes
d50 1
a50 1
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${VERSIONFILE}
@


1.6.4.2
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.6.4.1 2012/04/17 00:07:13 yamt Exp $
a19 1
CFLAGS+=	-fno-unwind-tables
a22 7
CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48
CPPFLAGS+=	-marm
.else
CPPFLAGS+=	-mno-thumb -mno-thumb-interwork
.endif
CPUFLAGS=
a28 1
LIBCRTI=	# nothing
a52 1
	${_MKTARGET_LINK}
d55 1
a55 1
	${CC} ${CFLAGS} ${CPPFLAGS} -c vers.c
@


1.6.8.1
log
@merge to -current.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2012/01/18 23:12:21 nonaka Exp $
a10 1
SRCS+=		pathfs.c
a20 1
CPPFLAGS+=	-DLIBSA_ENABLE_LS_OP
d35 1
a35 1
KERN_AS=	library
d46 1
a46 1
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes SA_ENABLE_LS_OP=yes
d50 1
a50 1
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${VERSIONFILE}
@


1.5
log
@Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh.  Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
@
text
@d1 1
a1 3
#	$NetBSD: src/sys/arch/zaurus/stand/zboot/Makefile,v 1.4 2010-05-27 06:58:15 dholland Exp $

.include <bsd.own.mk>
d14 2
@


1.4
log
@Introduce .WAIT into the cleandir rule for blasting the libsa/libkern/etc.
trees, because it can race with the libsa/libkern/etc. makefiles' own
cleandir rules. I think I've found all of the uses of the offending idiom...
Closes PR 43360.
@
text
@d1 3
a3 1
#	$NetBSD: Makefile,v 1.3 2009/04/13 12:25:36 nonaka Exp $
d51 2
a52 1
	${HOST_SH} ${S}/conf/newvers_stand.sh ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT}
@


1.4.2.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2011/01/23 13:17:02 joerg Exp $
a13 2
.include <bsd.own.mk>

d49 1
a49 2
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT}
@


1.4.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2011/01/23 13:17:02 joerg Exp $
a13 2
.include <bsd.own.mk>

d49 1
a49 2
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT}
@


1.3
log
@Use <bsd.klinks.mk> to create ${MACHINE} and ${MACHINE_ARCH} symlinks.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2009/03/03 09:20:55 nonaka Exp $
d56 1
a56 1
cleandir distclean: cleanlibdir
@


1.3.6.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
#	$NetBSD$
d56 1
a56 1
cleandir distclean: .WAIT cleanlibdir
@


1.3.8.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2009/04/13 12:25:36 nonaka Exp $
d56 1
a56 1
cleandir distclean: .WAIT cleanlibdir
@


1.3.8.2
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD$
a13 2
.include <bsd.own.mk>

d49 1
a49 2
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT}
@


1.3.4.1
log
@file Makefile was added on branch jym-xensuspend on 2009-05-13 17:18:54 +0000
@
text
@d1 63
@


1.3.4.2
log
@Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
@
text
@a0 76
#	$NetBSD: Makefile,v 1.2 2009/03/03 09:20:55 nonaka Exp $

PROG=		zboot

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

SRCS=		crt0.c
SRCS+=		boot.c bootinfo.c bootmenu.c conf.c devopen.c diskprobe.c
SRCS+=		loadfile_zboot.c
SRCS+=		getsecs.c termios.c unixcons.c unixdev.c unixsys.S

NOMAN=		# defined

CFLAGS+=	-Wall -Wno-main
CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
CFLAGS+=	-fno-stack-protector -fno-builtin -ffreestanding
CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S}
CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
AFLAGS+=	-D_LOCORE
LDFLAGS+=	-nostdlib -Bstatic

CLEANFILES+=	vers.c vers.o

LIBCRT0=	crt0.o
LIBC=		# nothing
LIBCRTBEGIN=	# nothing
LIBCRTEND=	# nothing

NEWVERSWHAT?=   "Boot"
VERSIONFILE?=	${.CURDIR}/version

.if !make(obj) && !make(clean) && !make(cleandir) && !make(release)
.BEGIN: machine arm
.NOPATH: machine arm

machine::
	-rm -f $@@
	ln -s ${S}/arch/${MACHINE}/include $@@

arm::
	-rm -f $@@
	ln -s ${S}/arch/arm/include $@@
.endif
CLEANFILES+=	machine arm

### 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}
	${HOST_SH} ${S}/conf/newvers_stand.sh ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT}
	${CC} -c vers.c
	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN}

.include <bsd.prog.mk>

cleandir distclean: cleanlibdir

cleanlibdir:
	-rm -rf lib

release: check_RELEASEDIR
	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
	    ${RELEASEDIR}/${MACHINE}/installation
@


1.3.2.1
log
@file Makefile was added on branch yamt-nfs-mp on 2009-05-04 08:12:16 +0000
@
text
@d1 63
@


1.3.2.2
log
@sync with head.
@
text
@a0 63
#	$NetBSD$

PROG=		zboot

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

SRCS=		crt0.c
SRCS+=		boot.c bootinfo.c bootmenu.c conf.c devopen.c diskprobe.c
SRCS+=		loadfile_zboot.c
SRCS+=		getsecs.c termios.c unixcons.c unixdev.c unixsys.S

NOMAN=		# defined

CFLAGS+=	-Wall -Wno-main
CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
CFLAGS+=	-fno-stack-protector -fno-builtin -ffreestanding
CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S}
CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
AFLAGS+=	-D_LOCORE
LDFLAGS+=	-nostdlib -Bstatic

CLEANFILES+=	vers.c vers.o

LIBCRT0=	crt0.o
LIBC=		# nothing
LIBCRTBEGIN=	# nothing
LIBCRTEND=	# nothing

NEWVERSWHAT?=   "Boot"
VERSIONFILE?=	${.CURDIR}/version

### 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}
	${HOST_SH} ${S}/conf/newvers_stand.sh ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT}
	${CC} -c vers.c
	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN}

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

cleandir distclean: cleanlibdir

cleanlibdir:
	-rm -rf lib

release: check_RELEASEDIR
	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
	    ${RELEASEDIR}/${MACHINE}/installation
@


1.3.2.3
log
@sync with head.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3.2.2 2009/05/04 08:12:16 yamt Exp $
d56 1
a56 1
cleandir distclean: .WAIT cleanlibdir
@


1.2
log
@fix make release.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2009/03/02 09:33:02 nonaka Exp $
a31 14
.if !make(obj) && !make(clean) && !make(cleandir) && !make(release)
.BEGIN: machine arm
.NOPATH: machine arm

machine::
	-rm -f $@@
	ln -s ${S}/arch/${MACHINE}/include $@@

arm::
	-rm -f $@@
	ln -s ${S}/arch/arm/include $@@
.endif
CLEANFILES+=	machine arm

d53 1
@


1.2.2.1
log
@file Makefile was added on branch nick-hppapmap on 2009-03-03 18:29:50 +0000
@
text
@d1 76
@


1.2.2.2
log
@Sync with HEAD.
@
text
@a0 76
#	$NetBSD: Makefile,v 1.2 2009/03/03 09:20:55 nonaka Exp $

PROG=		zboot

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

SRCS=		crt0.c
SRCS+=		boot.c bootinfo.c bootmenu.c conf.c devopen.c diskprobe.c
SRCS+=		loadfile_zboot.c
SRCS+=		getsecs.c termios.c unixcons.c unixdev.c unixsys.S

NOMAN=		# defined

CFLAGS+=	-Wall -Wno-main
CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
CFLAGS+=	-fno-stack-protector -fno-builtin -ffreestanding
CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S}
CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
AFLAGS+=	-D_LOCORE
LDFLAGS+=	-nostdlib -Bstatic

CLEANFILES+=	vers.c vers.o

LIBCRT0=	crt0.o
LIBC=		# nothing
LIBCRTBEGIN=	# nothing
LIBCRTEND=	# nothing

NEWVERSWHAT?=   "Boot"
VERSIONFILE?=	${.CURDIR}/version

.if !make(obj) && !make(clean) && !make(cleandir) && !make(release)
.BEGIN: machine arm
.NOPATH: machine arm

machine::
	-rm -f $@@
	ln -s ${S}/arch/${MACHINE}/include $@@

arm::
	-rm -f $@@
	ln -s ${S}/arch/arm/include $@@
.endif
CLEANFILES+=	machine arm

### 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}
	${HOST_SH} ${S}/conf/newvers_stand.sh ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT}
	${CC} -c vers.c
	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN}

.include <bsd.prog.mk>

cleandir distclean: cleanlibdir

cleanlibdir:
	-rm -rf lib

release: check_RELEASEDIR
	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
	    ${RELEASEDIR}/${MACHINE}/installation
@


1.2.2.3
log
@Sync with HEAD.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2.2.2 2009/03/03 18:29:50 skrll Exp $
d32 14
a66 1
.include <bsd.klinks.mk>
@


1.1
log
@Added zboot from OpenBSD.
@
text
@d1 1
a1 1
#	$NetBSD$
d75 1
a75 1
	${HOST_INSTALL_FILE} -m ${BINMODE} ${OBJS} \
@

