head	1.81;
access;
symbols
	RELENG_8_4:1.79.0.2
	RELENG_9_1_0_RELEASE:1.72.2.2.2.2
	RELENG_9_1:1.72.2.2.0.2
	RELENG_9_1_BP:1.72.2.2
	RELENG_8_3_0_RELEASE:1.65.2.1.8.1
	RELENG_8_3:1.65.2.1.0.8
	RELENG_8_3_BP:1.65.2.1
	RELENG_9_0_0_RELEASE:1.72.2.1.2.1
	RELENG_9_0:1.72.2.1.0.2
	RELENG_9_0_BP:1.72.2.1
	RELENG_9:1.72.0.2
	RELENG_9_BP:1.72
	RELENG_7_4_0_RELEASE:1.57.2.3.8.1
	RELENG_8_2_0_RELEASE:1.65.2.1.6.1
	RELENG_7_4:1.57.2.3.0.8
	RELENG_7_4_BP:1.57.2.3
	RELENG_8_2:1.65.2.1.0.6
	RELENG_8_2_BP:1.65.2.1
	RELENG_8_1_0_RELEASE:1.65.2.1.4.1
	RELENG_8_1:1.65.2.1.0.4
	RELENG_8_1_BP:1.65.2.1
	RELENG_7_3_0_RELEASE:1.57.2.3.6.1
	RELENG_7_3:1.57.2.3.0.6
	RELENG_7_3_BP:1.57.2.3
	RELENG_8_0_0_RELEASE:1.65.2.1.2.1
	RELENG_8_0:1.65.2.1.0.2
	RELENG_8_0_BP:1.65.2.1
	RELENG_8:1.65.0.2
	RELENG_8_BP:1.65
	RELENG_7_2_0_RELEASE:1.57.2.3.4.1
	RELENG_7_2:1.57.2.3.0.4
	RELENG_7_2_BP:1.57.2.3
	RELENG_7_1_0_RELEASE:1.57.2.3.2.1
	RELENG_6_4_0_RELEASE:1.54.2.2.2.1
	RELENG_7_1:1.57.2.3.0.2
	RELENG_7_1_BP:1.57.2.3
	RELENG_6_4:1.54.2.2.0.2
	RELENG_6_4_BP:1.54.2.2
	RELENG_7_0_0_RELEASE:1.57.2.1
	RELENG_6_3_0_RELEASE:1.54.2.1
	RELENG_7_0:1.57.2.1.0.2
	RELENG_7_0_BP:1.57.2.1
	RELENG_6_3:1.54.2.1.0.2
	RELENG_6_3_BP:1.54.2.1
	RELENG_7:1.57.0.2
	RELENG_7_BP:1.57
	RELENG_6_2_0_RELEASE:1.54
	RELENG_6_2:1.54.0.8
	RELENG_6_2_BP:1.54
	RELENG_5_5_0_RELEASE:1.43.2.1
	RELENG_5_5:1.43.2.1.0.4
	RELENG_5_5_BP:1.43.2.1
	RELENG_6_1_0_RELEASE:1.54
	RELENG_6_1:1.54.0.6
	RELENG_6_1_BP:1.54
	RELENG_6_0_0_RELEASE:1.54
	RELENG_6_0:1.54.0.4
	RELENG_6_0_BP:1.54
	RELENG_6:1.54.0.2
	RELENG_6_BP:1.54
	RELENG_5_4_0_RELEASE:1.43.2.1
	RELENG_5_4:1.43.2.1.0.2
	RELENG_5_4_BP:1.43.2.1
	RELENG_4_11_0_RELEASE:1.14.2.10
	RELENG_4_11:1.14.2.10.0.10
	RELENG_4_11_BP:1.14.2.10
	RELENG_5_3_0_RELEASE:1.43
	RELENG_5_3:1.43.0.4
	RELENG_5_3_BP:1.43
	RELENG_5:1.43.0.2
	RELENG_5_BP:1.43
	RELENG_4_10_0_RELEASE:1.14.2.10
	RELENG_4_10:1.14.2.10.0.8
	RELENG_4_10_BP:1.14.2.10
	RELENG_5_2_1_RELEASE:1.40
	RELENG_5_2_0_RELEASE:1.40
	RELENG_5_2:1.40.0.2
	RELENG_5_2_BP:1.40
	RELENG_4_9_0_RELEASE:1.14.2.10
	RELENG_4_9:1.14.2.10.0.6
	RELENG_4_9_BP:1.14.2.10
	RELENG_5_1_0_RELEASE:1.38
	RELENG_5_1:1.38.0.2
	RELENG_5_1_BP:1.38
	RELENG_4_8_0_RELEASE:1.14.2.10
	RELENG_4_8:1.14.2.10.0.4
	RELENG_4_8_BP:1.14.2.10
	RELENG_5_0_0_RELEASE:1.37
	RELENG_5_0:1.37.0.2
	RELENG_5_0_BP:1.37
	RELENG_4_7_0_RELEASE:1.14.2.10
	RELENG_4_7:1.14.2.10.0.2
	RELENG_4_7_BP:1.14.2.10
	RELENG_4_6_2_RELEASE:1.14.2.9
	RELENG_4_6_1_RELEASE:1.14.2.9
	RELENG_4_6_0_RELEASE:1.14.2.9
	RELENG_4_6:1.14.2.9.0.2
	RELENG_4_6_BP:1.14.2.9
	RELENG_4_5_0_RELEASE:1.14.2.6
	RELENG_4_5:1.14.2.6.0.2
	RELENG_4_5_BP:1.14.2.6
	RELENG_4_4_0_RELEASE:1.14.2.5
	RELENG_4_4:1.14.2.5.0.2
	RELENG_4_4_BP:1.14.2.5
	RELENG_4_3_0_RELEASE:1.14.2.4
	RELENG_4_3:1.14.2.4.0.2
	RELENG_4_3_BP:1.14.2.4
	RELENG_4_2_0_RELEASE:1.14.2.2
	RELENG_4_1_1_RELEASE:1.14.2.2
	PRE_SMPNG:1.17
	RELENG_4_1_0_RELEASE:1.14.2.2
	RELENG_3_5_0_RELEASE:1.11.2.2
	RELENG_4_0_0_RELEASE:1.14
	RELENG_4:1.14.0.2
	RELENG_4_BP:1.14
	RELENG_3_4_0_RELEASE:1.11.2.2
	RELENG_3_3_0_RELEASE:1.11.2.2
	RELENG_3_2_PAO:1.11.2.1.0.2
	RELENG_3_2_PAO_BP:1.11.2.1
	RELENG_3_2_0_RELEASE:1.11.2.1
	RELENG_3_1_0_RELEASE:1.11.2.1
	RELENG_3:1.11.0.2
	RELENG_3_BP:1.11
	RELENG_3_0_0_RELEASE:1.6
	initial:1.1.1.1
	MSMITH:1.1.1;
locks; strict;
comment	@# @;


1.81
date	2013.04.29.00.36.03;	author svnexp;	state Exp;
branches;
next	1.80;

1.80
date	2013.04.17.00.33.14;	author svnexp;	state Exp;
branches;
next	1.79;

1.79
date	2013.03.08.00.34.06;	author svnexp;	state Exp;
branches
	1.79.2.1;
next	1.78;

1.78
date	2013.02.19.00.26.19;	author svnexp;	state Exp;
branches;
next	1.77;

1.77
date	2013.02.06.00.43.39;	author svnexp;	state Exp;
branches;
next	1.76;

1.76
date	2012.11.17.01.50.00;	author svnexp;	state Exp;
branches;
next	1.75;

1.75
date	2012.06.21.21.47.08;	author delphij;	state Exp;
branches;
next	1.74;

1.74
date	2012.05.17.10.11.18;	author gber;	state Exp;
branches;
next	1.73;

1.73
date	2012.01.03.07.14.01;	author ed;	state Exp;
branches;
next	1.72;

1.72
date	2011.06.16.18.00.27;	author imp;	state Exp;
branches
	1.72.2.1;
next	1.71;

1.71
date	2011.06.15.22.15.28;	author rodrigc;	state Exp;
branches;
next	1.70;

1.70
date	2011.01.05.22.24.33;	author dim;	state Exp;
branches;
next	1.69;

1.69
date	2011.01.05.22.00.37;	author dim;	state Exp;
branches;
next	1.68;

1.68
date	2010.08.23.22.24.11;	author imp;	state Exp;
branches;
next	1.67;

1.67
date	2010.07.10.15.16.35;	author nwhitehorn;	state Exp;
branches;
next	1.66;

1.66
date	2010.01.02.09.58.07;	author ed;	state Exp;
branches;
next	1.65;

1.65
date	2009.05.31.02.03.40;	author marcel;	state Exp;
branches
	1.65.2.1;
next	1.64;

1.64
date	2009.02.21.15.04.31;	author ru;	state Exp;
branches;
next	1.63;

1.63
date	2008.10.14.09.53.47;	author raj;	state Exp;
branches;
next	1.62;

1.62
date	2008.06.25.21.33.28;	author ru;	state Exp;
branches;
next	1.61;

1.61
date	2008.04.29.17.42.42;	author ru;	state Exp;
branches;
next	1.60;

1.60
date	2008.04.29.17.37.01;	author ru;	state Exp;
branches;
next	1.59;

1.59
date	2007.10.24.21.32.57;	author jhb;	state Exp;
branches;
next	1.58;

1.58
date	2007.10.15.14.20.24;	author nyan;	state Exp;
branches;
next	1.57;

1.57
date	2006.11.06.22.07.45;	author cognet;	state Exp;
branches
	1.57.2.1;
next	1.56;

1.56
date	2006.08.22.08.03.01;	author ru;	state Exp;
branches;
next	1.55;

1.55
date	2005.07.15.12.29.31;	author ache;	state Exp;
branches;
next	1.54;

1.54
date	2005.06.03.06.55.22;	author obrien;	state Exp;
branches
	1.54.2.1;
next	1.53;

1.53
date	2005.05.31.20.39.53;	author obrien;	state Exp;
branches;
next	1.52;

1.52
date	2005.05.29.21.56.38;	author sobomax;	state Exp;
branches;
next	1.51;

1.51
date	2005.05.29.21.05.58;	author sobomax;	state Exp;
branches;
next	1.50;

1.50
date	2005.05.20.03.18.19;	author peter;	state Exp;
branches;
next	1.49;

1.49
date	2005.05.17.17.48.26;	author obrien;	state Exp;
branches;
next	1.48;

1.48
date	2005.05.17.17.46.29;	author obrien;	state Exp;
branches;
next	1.47;

1.47
date	2005.05.17.16.22.54;	author obrien;	state Exp;
branches;
next	1.46;

1.46
date	2005.05.17.01.44.37;	author obrien;	state Exp;
branches;
next	1.45;

1.45
date	2004.12.21.09.33.46;	author ru;	state Exp;
branches;
next	1.44;

1.44
date	2004.10.24.15.32.33;	author ru;	state Exp;
branches;
next	1.43;

1.43
date	2004.07.01.00.01.26;	author tjr;	state Exp;
branches
	1.43.2.1;
next	1.42;

1.42
date	2004.01.11.17.23.31;	author ru;	state Exp;
branches;
next	1.41;

1.41
date	2003.12.10.13.11.03;	author grehan;	state Exp;
branches;
next	1.40;

1.40
date	2003.06.30.19.08.49;	author ru;	state Exp;
branches;
next	1.39;

1.39
date	2003.06.26.03.48.01;	author peter;	state Exp;
branches;
next	1.38;

1.38
date	2002.12.19.19.34.58;	author jake;	state Exp;
branches;
next	1.37;

1.37
date	2002.10.19.02.23.09;	author marcel;	state Exp;
branches;
next	1.36;

1.36
date	2002.07.20.04.18.20;	author peter;	state Exp;
branches;
next	1.35;

1.35
date	2002.05.12.16.00.54;	author ru;	state Exp;
branches;
next	1.34;

1.34
date	2002.04.09.20.38.29;	author obrien;	state Exp;
branches;
next	1.33;

1.33
date	2002.04.09.05.34.22;	author obrien;	state Exp;
branches;
next	1.32;

1.32
date	2002.04.08.20.46.07;	author obrien;	state Exp;
branches;
next	1.31;

1.31
date	2002.04.08.20.45.44;	author obrien;	state Exp;
branches;
next	1.30;

1.30
date	2002.03.19.12.03.05;	author peter;	state Exp;
branches;
next	1.29;

1.29
date	2002.03.17.12.25.48;	author sobomax;	state Exp;
branches;
next	1.28;

1.28
date	2002.03.17.12.18.05;	author sobomax;	state Exp;
branches;
next	1.27;

1.27
date	2002.02.27.17.15.37;	author tmm;	state Exp;
branches;
next	1.26;

1.26
date	2002.02.02.00.20.32;	author bde;	state Exp;
branches;
next	1.25;

1.25
date	2002.02.01.16.33.40;	author sobomax;	state Exp;
branches;
next	1.24;

1.24
date	2001.10.26.21.20.23;	author peter;	state Exp;
branches;
next	1.23;

1.23
date	2001.10.15.14.27.37;	author robert;	state Exp;
branches;
next	1.22;

1.22
date	2001.09.18.13.01.11;	author sobomax;	state Exp;
branches;
next	1.21;

1.21
date	2001.03.27.17.27.16;	author ru;	state Exp;
branches;
next	1.20;

1.20
date	2001.03.06.16.11.36;	author dfr;	state Exp;
branches;
next	1.19;

1.19
date	2000.11.05.14.55.08;	author ps;	state Exp;
branches;
next	1.18;

1.18
date	2000.10.10.13.22.41;	author obrien;	state Exp;
branches;
next	1.17;

1.17
date	2000.08.11.23.18.37;	author peter;	state Exp;
branches;
next	1.16;

1.16
date	2000.04.29.20.47.07;	author jlemon;	state Exp;
branches;
next	1.15;

1.15
date	2000.04.08.01.17.59;	author ps;	state Exp;
branches;
next	1.14;

1.14
date	99.08.28.00.05.29;	author peter;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	99.04.22.15.47.21;	author jdp;	state Exp;
branches;
next	1.12;

1.12
date	99.02.12.17.20.10;	author dcs;	state Exp;
branches;
next	1.11;

1.11
date	98.11.04.12.49.31;	author peter;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	98.11.04.07.39.53;	author msmith;	state Exp;
branches;
next	1.9;

1.9
date	98.11.04.00.32.08;	author msmith;	state Exp;
branches;
next	1.8;

1.8
date	98.11.04.00.23.11;	author msmith;	state Exp;
branches;
next	1.7;

1.7
date	98.11.01.09.31.07;	author msmith;	state Exp;
branches;
next	1.6;

1.6
date	98.10.06.19.23.57;	author msmith;	state Exp;
branches;
next	1.5;

1.5
date	98.10.04.08.10.29;	author msmith;	state Exp;
branches;
next	1.4;

1.4
date	98.09.26.01.42.39;	author msmith;	state Exp;
branches;
next	1.3;

1.3
date	98.09.15.02.30.22;	author msmith;	state Exp;
branches;
next	1.2;

1.2
date	98.08.20.08.23.12;	author msmith;	state Exp;
branches;
next	1.1;

1.1
date	98.08.20.08.19.55;	author msmith;	state Exp;
branches
	1.1.1.1;
next	;

1.79.2.1
date	2013.03.08.00.34.06;	author svnexp;	state dead;
branches;
next	1.79.2.2;

1.79.2.2
date	2013.03.28.13.03.20;	author svnexp;	state Exp;
branches;
next	;

1.72.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.72.2.1.2.1;
next	1.72.2.2;

1.72.2.2
date	2012.06.28.07.08.48;	author delphij;	state Exp;
branches
	1.72.2.2.2.1;
next	1.72.2.3;

1.72.2.3
date	2012.11.17.11.36.25;	author svnexp;	state Exp;
branches;
next	1.72.2.4;

1.72.2.4
date	2013.12.30.21.01.46;	author svnexp;	state Exp;
branches;
next	;

1.72.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.72.2.1.2.2;

1.72.2.1.2.2
date	2012.11.17.08.36.26;	author svnexp;	state Exp;
branches;
next	;

1.72.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.72.2.2.2.2;

1.72.2.2.2.2
date	2012.11.17.08.47.15;	author svnexp;	state Exp;
branches;
next	;

1.65.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.65.2.1.2.1
	1.65.2.1.4.1
	1.65.2.1.6.1
	1.65.2.1.8.1;
next	1.65.2.2;

1.65.2.2
date	2012.11.17.10.36.10;	author svnexp;	state Exp;
branches;
next	;

1.65.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.65.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.65.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.65.2.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.65.2.1.8.2;

1.65.2.1.8.2
date	2012.11.17.08.24.51;	author svnexp;	state Exp;
branches;
next	;

1.57.2.1
date	2007.10.18.12.08.52;	author nyan;	state Exp;
branches;
next	1.57.2.2;

1.57.2.2
date	2008.01.24.19.42.15;	author jhb;	state Exp;
branches;
next	1.57.2.3;

1.57.2.3
date	2008.05.04.11.58.25;	author ru;	state Exp;
branches
	1.57.2.3.2.1
	1.57.2.3.4.1
	1.57.2.3.6.1
	1.57.2.3.8.1;
next	1.57.2.4;

1.57.2.4
date	2012.11.17.08.03.00;	author svnexp;	state Exp;
branches;
next	;

1.57.2.3.2.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.57.2.3.4.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.57.2.3.6.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.57.2.3.8.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.57.2.3.8.2;

1.57.2.3.8.2
date	2012.11.17.08.16.50;	author svnexp;	state Exp;
branches;
next	;

1.54.2.1
date	2007.10.24.11.50.06;	author nyan;	state Exp;
branches;
next	1.54.2.2;

1.54.2.2
date	2008.01.24.22.23.20;	author jhb;	state Exp;
branches
	1.54.2.2.2.1;
next	1.54.2.3;

1.54.2.3
date	2012.11.17.07.40.36;	author svnexp;	state Exp;
branches;
next	;

1.54.2.2.2.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.43.2.1
date	2005.02.13.07.23.14;	author obrien;	state Exp;
branches;
next	1.43.2.2;

1.43.2.2
date	2008.04.18.00.01.55;	author delphij;	state Exp;
branches;
next	;

1.14.2.1
date	2000.04.15.03.09.28;	author ps;	state Exp;
branches;
next	1.14.2.2;

1.14.2.2
date	2000.05.04.13.47.49;	author ps;	state Exp;
branches;
next	1.14.2.3;

1.14.2.3
date	2000.11.21.12.04.47;	author ps;	state Exp;
branches;
next	1.14.2.4;

1.14.2.4
date	2000.12.28.12.04.03;	author ps;	state Exp;
branches;
next	1.14.2.5;

1.14.2.5
date	2001.04.25.10.04.41;	author ru;	state Exp;
branches;
next	1.14.2.6;

1.14.2.6
date	2001.10.18.11.35.53;	author sobomax;	state Exp;
branches
	1.14.2.6.2.1;
next	1.14.2.7;

1.14.2.7
date	2002.02.18.09.13.03;	author sobomax;	state Exp;
branches;
next	1.14.2.8;

1.14.2.8
date	2002.02.18.15.41.26;	author sobomax;	state Exp;
branches;
next	1.14.2.9;

1.14.2.9
date	2002.04.08.13.50.09;	author sobomax;	state Exp;
branches;
next	1.14.2.10;

1.14.2.10
date	2002.07.22.14.21.50;	author ru;	state Exp;
branches;
next	1.14.2.11;

1.14.2.11
date	2012.11.17.07.24.00;	author svnexp;	state Exp;
branches;
next	;

1.14.2.6.2.1
date	2002.02.23.18.28.11;	author jedgar;	state Exp;
branches;
next	;

1.11.2.1
date	99.02.12.17.28.06;	author dcs;	state Exp;
branches;
next	1.11.2.2;

1.11.2.2
date	99.08.29.14.57.31;	author peter;	state Exp;
branches;
next	;

1.1.1.1
date	98.08.20.08.19.55;	author msmith;	state Exp;
branches;
next	;


desc
@@


1.81
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/250023
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# $FreeBSD: head/lib/libstand/Makefile 250023 2013-04-28 16:35:24Z rwatson $
# Originally from	$NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $
#
# Notes:
# - We don't use the libc strerror/sys_errlist because the string table is
#   quite large.
#

.include <bsd.own.mk>
MK_SSP=		no

LIB=		stand
NO_PROFILE=
NO_PIC=
INCS=		stand.h
MAN=		libstand.3

WARNS?=		0

CFLAGS+= -ffreestanding -Wformat
CFLAGS+= -I${.CURDIR}

.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+=	-mpreferred-stack-boundary=2
CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
.if ${MACHINE} == "pc98"
CFLAGS+=	-Os
.endif
.if ${MACHINE_CPUARCH} == "powerpc"
CFLAGS+=	-msoft-float -D_STANDALONE -DNETIF_DEBUG
.endif
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
CFLAGS+=	-m32 -I.
.endif
.if ${MACHINE_CPUARCH} == "arm"
CFLAGS+=	-msoft-float -D_STANDALONE
.endif
.if ${MACHINE_CPUARCH} == "mips"
CFLAGS+=	-G0 -fno-pic -mno-abicalls
.endif

# standalone components and stuff we have modified locally
SRCS+=	gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
	globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \
	sbrk.c twiddle.c zalloc.c zalloc_malloc.c

# private (pruned) versions of libc string functions
SRCS+=	strcasecmp.c

.PATH: ${.CURDIR}/../libc/net

SRCS+= ntoh.c

# string functions from libc
.PATH: ${.CURDIR}/../libc/string
.if ${MACHINE_CPUARCH} != "ia64"
SRCS+=	bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
	memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
	strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \
	strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
.endif
.if ${MACHINE_CPUARCH} == "arm"
.PATH: ${.CURDIR}/../libc/arm/gen

.if ${MK_ARM_EABI} == "no"
SRCS+= divsi3.S
.else
# Compiler support functions
.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/
# __clzsi2 and ctzsi2 for various builtin functions
SRCS+=	clzsi2.c ctzsi2.c
# Divide and modulus functions called by the compiler
SRCS+=	 divmoddi4.c  divmodsi4.c  divdi3.c  divsi3.c  moddi3.c  modsi3.c
SRCS+=	udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c

.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm/
SRCS+=	aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S
SRCS+=	aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S
.endif

.endif
.if ${MACHINE_CPUARCH} == "ia64"
.PATH: ${.CURDIR}/../libc/ia64/string
SRCS+=	bcmp.c bcopy.S bzero.S ffs.S memccpy.c memchr.c memcmp.c memcpy.S \
	memmove.S memset.c strcat.c strchr.c strcmp.c strcpy.c strcspn.c \
	strlen.c strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
	strspn.c strstr.c strtok.c swab.c

.PATH: ${.CURDIR}/../libc/ia64/gen
SRCS+= __divdi3.S __divsi3.S __moddi3.S __modsi3.S
SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S
.endif
.if ${MACHINE_CPUARCH} == "powerpc"
.PATH: ${.CURDIR}/../libc/quad
SRCS+=	ashldi3.c ashrdi3.c
.PATH: ${.CURDIR}/../libc/powerpc/gen
SRCS+=	syncicache.c
.endif

# uuid functions from libc
.PATH: ${.CURDIR}/../libc/uuid
SRCS+= uuid_equal.c uuid_is_nil.c

# _setjmp/_longjmp
.if ${MACHINE_CPUARCH} == "amd64"
.PATH: ${.CURDIR}/i386
.elif ${MACHINE_ARCH} == "powerpc64"
.PATH: ${.CURDIR}/powerpc
.else
.PATH: ${.CURDIR}/${MACHINE_CPUARCH}
.endif
SRCS+=	_setjmp.S

# decompression functionality from libbz2
# NOTE: to actually test this functionality after libbz2 upgrade compile
# loader(8) with LOADER_BZIP2_SUPPORT defined
.PATH: ${.CURDIR}/../../contrib/bzip2
CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS
SRCS+=	libstand_bzlib_private.h

.for file in bzlib.c crctable.c decompress.c huffman.c randtable.c
SRCS+=	_${file}
CLEANFILES+=	_${file}

_${file}: ${file}
	sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET}
.endfor

CLEANFILES+= libstand_bzlib_private.h
libstand_bzlib_private.h: bzlib_private.h
	sed -e 's|<stdlib.h>|"stand.h"|' \
		${.ALLSRC} > ${.TARGET}

# decompression functionality from libz
.PATH: ${.CURDIR}/../libz
CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../libz
SRCS+=	adler32.c crc32.c libstand_zutil.h libstand_gzguts.h

.for file in infback.c inffast.c inflate.c inftrees.c zutil.c
SRCS+=	_${file}
CLEANFILES+=	_${file}

_${file}: ${file}
	sed -e "s|zutil\.h|libstand_zutil.h|" \
	    -e "s|gzguts\.h|libstand_gzguts.h|" \
	    ${.ALLSRC} > ${.TARGET}
.endfor

# depend on stand.h being able to be included multiple times
.for file in zutil.h gzguts.h
CLEANFILES+= libstand_${file}
libstand_${file}: ${file}
	sed -e 's|<fcntl.h>|"stand.h"|' \
	    -e 's|<stddef.h>|"stand.h"|' \
	    -e 's|<string.h>|"stand.h"|' \
	    -e 's|<stdio.h>|"stand.h"|' \
	    -e 's|<stdlib.h>|"stand.h"|' \
	    ${.ALLSRC} > ${.TARGET}
.endfor

# io routines
SRCS+=	closeall.c dev.c ioctl.c nullfs.c stat.c \
	fstat.c close.c lseek.c open.c read.c write.c readdir.c

# network routines
SRCS+=	arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c

# network info services:
SRCS+=	bootp.c rarp.c bootparam.c

# boot filesystems
SRCS+=	ufs.c nfs.c cd9660.c tftp.c gzipfs.c bzipfs.c
SRCS+=	dosfs.c ext2fs.c
SRCS+=	splitfs.c
.if ${MK_NAND} != "no"
SRCS+=	nandfs.c
.endif

.include <bsd.lib.mk>

.if ${MACHINE_CPUARCH} == "amd64"
beforedepend ${OBJS}: machine
cleandepend: cleanmachine
cleanmachine:
	rm -f machine

machine:
	ln -s ${.CURDIR}/../../sys/i386/include machine
.endif
@


1.80
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249554
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: head/lib/libstand/Makefile 249554 2013-04-16 17:20:52Z rwatson $
d57 1
a57 3
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "powerpc" || \
	${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "amd64" || \
	${MACHINE_CPUARCH} == "arm"
@


1.79
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/247912
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: head/lib/libstand/Makefile 247912 2013-03-07 09:18:52Z andrew $
d39 3
@


1.79.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:03:20 +0000
@
text
@d1 189
@


1.79.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 164
# $FreeBSD: releng/8.4/lib/libstand/Makefile 193145 2009-05-31 02:03:40Z marcel $
# Originally from	$NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $
#
# Notes:
# - We don't use the libc strerror/sys_errlist because the string table is
#   quite large.
#

.include <bsd.own.mk>
MK_SSP=		no

LIB=		stand
NO_PROFILE=
NO_PIC=
INCS=		stand.h
MAN=		libstand.3

CFLAGS+= -ffreestanding -Wformat
CFLAGS+= -I${.CURDIR}

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
CFLAGS+=	-mpreferred-stack-boundary=2
CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2
.endif
.if ${MACHINE_ARCH} == "i386"
CFLAGS+=	-mno-sse3
.endif
.if ${MACHINE} == "pc98"
CFLAGS+=	-Os
.endif
.if ${MACHINE_ARCH} == "powerpc"
CFLAGS+=	-msoft-float -D_STANDALONE
.endif
.if ${MACHINE_ARCH} == "amd64"
CFLAGS+=	-m32 -I.
.endif
.if ${MACHINE_ARCH} == "arm"
CFLAGS+=	-msoft-float -D_STANDALONE
.endif

# standalone components and stuff we have modified locally
SRCS+=	zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
	globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \
	sbrk.c twiddle.c zalloc.c zalloc_malloc.c

# private (pruned) versions of libc string functions
SRCS+=	strcasecmp.c

.PATH: ${.CURDIR}/../libc/net

SRCS+= ntoh.c

# string functions from libc
.PATH: ${.CURDIR}/../libc/string
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
	${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "amd64" || \
	${MACHINE_ARCH} == "arm"
SRCS+=	bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
        memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \
        strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \
	strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
.endif
.if ${MACHINE_ARCH} == "arm"
.PATH: ${.CURDIR}/../libc/arm/gen
SRCS+= divsi3.S
.endif
.if ${MACHINE_ARCH} == "ia64"
.PATH: ${.CURDIR}/../libc/ia64/string
SRCS+=	bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \
	memcpy.S memmove.S memset.c rindex.c strcat.c strchr.c \
	strcmp.c strcpy.c strcspn.c strlen.c \
	strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
	strspn.c strstr.c strtok.c swab.c

.PATH: ${.CURDIR}/../libc/ia64/gen
SRCS+= __divdi3.S __divsi3.S __moddi3.S __modsi3.S
SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S
.endif
.if ${MACHINE_ARCH} == "powerpc"
.PATH: ${.CURDIR}/../libc/quad
SRCS+=	ashldi3.c ashrdi3.c
.PATH: ${.CURDIR}/../libc/powerpc/gen
SRCS+=	syncicache.c
.endif

# uuid functions from libc
.PATH: ${.CURDIR}/../libc/uuid
SRCS+= uuid_equal.c uuid_is_nil.c

# _setjmp/_longjmp
.if ${MACHINE_ARCH} == "amd64"
.PATH: ${.CURDIR}/i386
.else
.PATH: ${.CURDIR}/${MACHINE_ARCH}
.endif
SRCS+=	_setjmp.S

# decompression functionality from libbz2
# NOTE: to actually test this functionality after libbz2 upgrade compile
# loader(8) with LOADER_BZIP2_SUPPORT defined
.PATH: ${.CURDIR}/../../contrib/bzip2
CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS
SRCS+=	libstand_bzlib_private.h

.for file in bzlib.c crctable.c decompress.c huffman.c randtable.c
SRCS+=	_${file}
CLEANFILES+=	_${file}

_${file}: ${file}
	sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET}
.endfor

CLEANFILES+= libstand_bzlib_private.h
libstand_bzlib_private.h: bzlib_private.h
	sed -e 's|<stdlib.h>|"stand.h"|' \
		${.ALLSRC} > ${.TARGET}

# decompression functionality from libz
.PATH: ${.CURDIR}/../libz
CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../libz
SRCS+=	adler32.c crc32.c libstand_zutil.h

.for file in infback.c inffast.c inflate.c inftrees.c zutil.c
SRCS+=	_${file}
CLEANFILES+=	_${file}

_${file}: ${file}
	sed "s|zutil\.h|libstand_zutil.h|" ${.ALLSRC} > ${.TARGET}
.endfor

# depend on stand.h being able to be included multiple times
CLEANFILES+= libstand_zutil.h
libstand_zutil.h: zutil.h
	sed -e 's|<stddef.h>|"stand.h"|' \
	    -e 's|<string.h>|"stand.h"|' \
	    -e 's|<stdlib.h>|"stand.h"|' \
	    ${.ALLSRC} > ${.TARGET}

# io routines
SRCS+=	closeall.c dev.c ioctl.c nullfs.c stat.c \
	fstat.c close.c lseek.c open.c read.c write.c readdir.c

# network routines
SRCS+=	arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c

# network info services:
SRCS+=	bootp.c rarp.c bootparam.c

# boot filesystems
SRCS+=	ufs.c nfs.c cd9660.c tftp.c gzipfs.c bzipfs.c
SRCS+=	dosfs.c ext2fs.c
SRCS+=	splitfs.c

.include <bsd.lib.mk>

.if ${MACHINE_ARCH} == "amd64"
beforedepend ${OBJS}: machine
cleandepend: cleanmachine
cleanmachine:
	rm -f machine

machine:
	ln -s ${.CURDIR}/../../sys/i386/include machine
.endif
@


1.78
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/246931
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: head/lib/libstand/Makefile 246931 2013-02-18 01:55:53Z kientzle $
d70 3
@


1.77
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/246369
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: head/lib/libstand/Makefile 246369 2013-02-05 20:03:58Z andrew $
d42 1
a42 1
	globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \
@


1.76
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/lib/libstand/Makefile 237410 2012-06-21 21:47:08Z delphij $
d64 2
d67 11
@


1.75
log
@SVN rev 237410 on 2012-06-21 21:47:08Z by delphij

MFV: Update zlib to 1.2.7.

(x86 assembler optimization disabled for now because it
requires the new .cfi_* directives that is not supported
by base system binutils).

MFC after:	1 week
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.74
log
@SVN rev 235537 on 2012-05-17 10:11:18Z by gber

Import work done under project/nand (@@235533) into head.

The NAND Flash environment consists of several distinct components:
  - NAND framework (drivers harness for NAND controllers and NAND chips)
  - NAND simulator (NANDsim)
  - NAND file system (NAND FS)
  - Companion tools and utilities
  - Documentation (manual pages)

This work is still experimental. Please use with caution.

Obtained from: Semihalf
Supported by:  FreeBSD Foundation, Juniper Networks
@
text
@d41 1
a41 1
SRCS+=	zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
d121 1
a121 1
SRCS+=	adler32.c crc32.c libstand_zutil.h
d128 3
a130 1
	sed "s|zutil\.h|libstand_zutil.h|" ${.ALLSRC} > ${.TARGET}
d134 5
a138 3
CLEANFILES+= libstand_zutil.h
libstand_zutil.h: zutil.h
	sed -e 's|<stddef.h>|"stand.h"|' \
d140 1
d143 1
@


1.73
log
@SVN rev 229368 on 2012-01-03 07:14:01Z by ed

Merge index() and strchr() together.

As I looked through the C library, I noticed the FreeBSD MIPS port has a
hand-written version of index(). This is nice, if it weren't for the
fact that most applications call strchr() instead.

Also, on the other architectures index() and strchr() are identical,
meaning we have two identical pieces of code in the C library and
statically linked applications.

Solve this by naming the actual file strchr.[cS] and let it use
__strong_reference()/STRONG_ALIAS() to provide the index() routine. Do
the same for rindex()/strrchr().

This seems to make the C libraries and static binaries slightly smaller,
but this reduction in size seems negligible.
@
text
@d153 3
@


1.72
log
@SVN rev 223156 on 2011-06-16 18:00:27Z by imp

Setting warnings without make universe considered harmful.  Revert to WARNS=0
until such time that the warnings at =2 are fixed for all platforms.
@
text
@d57 4
a60 4
SRCS+=	bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
        memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \
        strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \
	strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
d68 3
a70 4
SRCS+=	bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \
	memcpy.S memmove.S memset.c rindex.c strcat.c strchr.c \
	strcmp.c strcpy.c strcspn.c strlen.c \
	strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
@


1.72.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.72.2.2
log
@SVN rev 237691 on 2012-06-28 07:08:48Z by delphij

MFC r237410: zlib 1.2.7.
@
text
@d41 1
a41 1
SRCS+=	gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
d122 1
a122 1
SRCS+=	adler32.c crc32.c libstand_zutil.h libstand_gzguts.h
d129 1
a129 3
	sed -e "s|zutil\.h|libstand_zutil.h|" \
	    -e "s|gzguts\.h|libstand_gzguts.h|" \
	    ${.ALLSRC} > ${.TARGET}
d133 3
a135 5
.for file in zutil.h gzguts.h
CLEANFILES+= libstand_${file}
libstand_${file}: ${file}
	sed -e 's|<fcntl.h>|"stand.h"|' \
	    -e 's|<stddef.h>|"stand.h"|' \
a136 1
	    -e 's|<stdio.h>|"stand.h"|' \
a138 1
.endfor
@


1.72.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/lib/libstand/Makefile 237691 2012-06-28 07:08:48Z delphij $
@


1.72.2.4
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/260096
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/lib/libstand/Makefile 260096 2013-12-30 20:15:46Z dim $
d24 1
a24 1
CFLAGS.gcc+=	-mpreferred-stack-boundary=2
@


1.72.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.72.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/lib/libstand/Makefile 237691 2012-06-28 07:08:48Z delphij $
@


1.72.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.72.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/lib/libstand/Makefile 223156 2011-06-16 18:00:27Z imp $
@


1.71
log
@SVN rev 223125 on 2011-06-15 22:15:28Z by rodrigc

Increase WARNS level to 2.
@
text
@d18 1
a18 1
WARNS?=		2
@


1.70
log
@SVN rev 217033 on 2011-01-05 22:24:33Z by dim

On i386 and amd64, consistently use the following options whenever we
want to avoid using any "advanced" CPU features:

  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
@
text
@d18 1
a18 1
WARNS?=		0
@


1.69
log
@SVN rev 217029 on 2011-01-05 22:00:37Z by dim

In lib/libstand, sys/boot/ficl and sys/boot/zfs, -mno-sse3 should also
be used for amd64, not just for i386.
@
text
@d25 1
a25 1
CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
@


1.68
log
@SVN rev 211725 on 2010-08-23 22:24:11Z by imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
@
text
@d25 1
a25 4
CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2
.endif
.if ${MACHINE_CPUARCH} == "i386"
CFLAGS+=	-mno-sse3
@


1.67
log
@SVN rev 209882 on 2010-07-10 15:16:35Z by nwhitehorn

Teach libstand what to do for powerpc64: the same thing as powerpc. Like
amd64, libstand apps for powerpc64 systems are 32-bit, due to 32-bit Open
Firmware implementations.
@
text
@d23 1
a23 1
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
d27 1
a27 1
.if ${MACHINE_ARCH} == "i386"
d33 1
a33 1
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
d39 1
a39 1
.if ${MACHINE_ARCH} == "arm"
d57 3
a59 3
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
	${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "sparc64" || \
	${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm"
d65 1
a65 1
.if ${MACHINE_ARCH} == "arm"
d69 1
a69 1
.if ${MACHINE_ARCH} == "ia64"
d81 1
a81 1
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
d93 1
a93 1
.if ${MACHINE_ARCH} == "amd64"
d98 1
a98 1
.PATH: ${.CURDIR}/${MACHINE_ARCH}
d160 1
a160 1
.if ${MACHINE_ARCH} == "amd64"
@


1.66
log
@SVN rev 201381 on 2010-01-02 09:58:07Z by ed

Build lib/ with WARNS=6 by default.

Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
@
text
@d33 2
a34 2
.if ${MACHINE_ARCH} == "powerpc"
CFLAGS+=	-msoft-float -D_STANDALONE
d36 1
a36 1
.if ${MACHINE_ARCH} == "amd64"
d58 2
a59 2
	${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "amd64" || \
	${MACHINE_ARCH} == "arm"
d81 1
a81 1
.if ${MACHINE_ARCH} == "powerpc"
d95 2
@


1.65
log
@SVN rev 193145 on 2009-05-31 02:03:40Z by marcel

Use GCC's __SOFTFP__ to test whether we're being compiled
with softfloat or not. Now -msoft-float can be overridden
more easily.
@
text
@d18 2
@


1.65.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.65.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/lib/libstand/Makefile 193145 2009-05-31 02:03:40Z marcel $
@


1.65.2.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.65.2.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/lib/libstand/Makefile 193145 2009-05-31 02:03:40Z marcel $
@


1.65.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.65.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.65.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.64
log
@SVN rev 188895 on 2009-02-21 15:04:31Z by ru

Fix build when WITH_SSP is set explicitly.

Submitted by:	Jeremie Le Hen
@
text
@d38 1
a38 1
CFLAGS+=	-msoft-float -DSOFTFLOAT -D_STANDALONE
@


1.63
log
@SVN rev 183876 on 2008-10-14 09:53:47Z by raj

Let libstand(3) build on ARM.

This is a pre-requisite for loader(8) + U-Boot support library on this arch.
@
text
@d9 3
a17 1
WITHOUT_SSP=
@


1.62
log
@SVN rev 180012 on 2008-06-25 21:33:28Z by ru

Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
  turned opt-in for stable branches depending on the consensus.  You
  can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
  It is harmless to steal the knob as SSP symbols have been provided
  by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
  (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
  libc will be automatically downgraded to -fstack-protector because it
  breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by:	Jeremie Le Hen <jeremie@@le-hen.org>
@
text
@d35 3
d54 2
a55 1
	${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "amd64"
d61 4
@


1.61
log
@_setjmp.o was missing a dependency on "machine".
@
text
@d15 1
@


1.60
log
@Don't forget to clean the "machine" symlink on amd64, otherwise bad
things may happen.

Reported by:	phk
MFC after:	3 days
@
text
@d146 1
a146 3
${SRCS:M*.c:R:S/$/.o/g}:	machine

beforedepend:	machine
@


1.59
log
@First cut at support for booting a GPT labeled disk via the BIOS bootstrap
on i386 and amd64 machines.  The overall process is that /boot/pmbr lives
in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for
locating and loading /boot/gptboot.  /boot/gptboot is similar to /boot/boot
except that it groks GPT rather than MBR + bsdlabel.  Unlike /boot/boot,
/boot/gptboot lives in its own dedicated GPT partition with a new
"FreeBSD boot" type.  This partition does not have a fixed size in that
/boot/pmbr will load the entire partition into the lower 640k.  However,
it is limited in that it can only be 545k.  That's still a lot better than
the current 7.5k limit for boot2 on MBR.  gptboot mostly acts just like
boot2 in that it reads /boot.config and loads up /boot/loader.  Some more
details:
- Include uuid_equal() and uuid_is_nil() in libstand.
- Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using
  /boot/pmbr and /boot/gptboot.  Note that the disk must have some free
  space for the boot partition.
  - This required exposing the backend of the 'add' function as a
    gpt_add_part() function to the rest of gpt(8).  'boot' uses this to
    create a boot partition if needed.
- Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that
  it can handle a filesystem > 1.5 TB.
- /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O
  unlike boot1 since /boot/pmbr loads all of gptboot up front.  The
  C portion of gptboot (gptboot.c) has been repocopied from boot2.c.
  The primary changes are to parse the GPT to find a root filesystem
  and to use 64-bit disk addresses.  Currently gptboot assumes that the
  first UFS partition on the disk is the / filesystem, but this algorithm
  will likely be improved in the future.
- Teach the biosdisk driver in /boot/loader to understand GPT tables.
  GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is
  similar to the /dev names the kernel uses (e.g. /dev/ad0p2).
- Add a new "freebsd-boot" alias to g_part() for the new boot UUID.

MFC after:	1 month
Discussed with:	marcel (some things might still change, but am committing
			what I have so far)
@
text
@d149 3
@


1.58
log
@Optimize for size on pc98.  It enables to boot a kernel again.

I don't know what's wrong (loader, boot2 or others), but this change is
effective.

Tested by:	NAKAJI Hiroyuki
MFC after:	3 days
@
text
@d75 4
@


1.57
log
@Instead of re-implementing hton[ls] and friends for each arch, add a new MI
file, net/ntoh.c, which just implement them using the inline functions from
<sys/endian.h>.

Suggested by:	bde
@
text
@d25 3
@


1.57.2.1
log
@MFC: Optimize for size on pc98.  It enables to boot a kernel again.

Approved by:	re (kensmith)
@
text
@a24 3
.if ${MACHINE} == "pc98"
CFLAGS+=	-Os
.endif
@


1.57.2.2
log
@MFC: Add support for booting from GPT-labeled disks from the BIOS.  This
includes /boot/pmbr, /boot/gptboot, and 'gpt boot'.
@
text
@a74 4
# uuid functions from libc
.PATH: ${.CURDIR}/../libc/uuid
SRCS+= uuid_equal.c uuid_is_nil.c

@


1.57.2.3
log
@MFC: 1.60: Don't forget to clean the "machine" symlink on amd64.
     1.61: _setjmp.o was missing a dependency on "machine".
@
text
@d146 3
a148 4
beforedepend ${OBJS}: machine
cleandepend: cleanmachine
cleanmachine:
	rm -f machine
@


1.57.2.4
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/lib/libstand/Makefile 178760 2008-05-04 11:58:25Z ru $
@


1.57.2.3.8.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.57.2.3.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/lib/libstand/Makefile 178760 2008-05-04 11:58:25Z ru $
@


1.57.2.3.6.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.57.2.3.4.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.57.2.3.2.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.56
log
@Remove alpha left-overs.
@
text
@d40 3
a42 7
# byte order functions from libc
.if ${MACHINE_ARCH} != "amd64"
.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/net
.else
.PATH: ${.CURDIR}/../libc/i386/net
.endif
SRCS+= htons.S ntohs.S htonl.S ntohl.S
@


1.55
log
@Add -mno-sse3 for prescott/nocona
@
text
@a17 3
.if ${MACHINE_ARCH} == "alpha"
CFLAGS+=	-mno-fp-regs
.endif
a56 47
.if ${MACHINE_ARCH} == "alpha"
.PATH: ${.CURDIR}/../libc/alpha/string
SRCS+=	bcmp.c bcopy.S bzero.S ffs.S index.c memccpy.c memchr.c memcmp.c \
	memcpy.S memmove.S memset.c rindex.c strcat.c strchr.c \
	strcmp.c strcpy.c strcspn.c strlen.c \
	strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
	strspn.c strstr.c strtok.c swab.c

SRCS+= __divqu.S __divq.S __divlu.S __divl.S
SRCS+= __remqu.S __remq.S __remlu.S __reml.S

CLEANFILES+=   __divqu.S __divq.S __divlu.S __divl.S
CLEANFILES+=   __remqu.S __remq.S __remlu.S __reml.S


__divqu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
	m4 -DNAME=__divqu -DOP=div -DS=false -DWORDSIZE=64 \
		${.ALLSRC} > ${.TARGET}

__divq.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
	m4 -DNAME=__divq -DOP=div -DS=true -DWORDSIZE=64 \
		${.ALLSRC} > ${.TARGET}

__divlu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
	m4 -DNAME=__divlu -DOP=div -DS=false -DWORDSIZE=32 \
		${.ALLSRC} > ${.TARGET}

__divl.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
	m4 -DNAME=__divl -DOP=div -DS=true -DWORDSIZE=32 \
		${.ALLSRC} > ${.TARGET}

__remqu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
	m4 -DNAME=__remqu -DOP=rem -DS=false -DWORDSIZE=64 \
		${.ALLSRC} > ${.TARGET}

__remq.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
	m4 -DNAME=__remq -DOP=rem -DS=true -DWORDSIZE=64 \
		${.ALLSRC} > ${.TARGET}

__remlu.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
	m4 -DNAME=__remlu -DOP=rem -DS=false -DWORDSIZE=32 \
		${.ALLSRC} > ${.TARGET}

__reml.S: ${.CURDIR}/../libc/alpha/gen/divrem.m4
	m4 -DNAME=__reml -DOP=rem -DS=true -DWORDSIZE=32 \
		${.ALLSRC} > ${.TARGET}
.endif
@


1.54
log
@Match sys/boot in ensure GCC does not use x86 FP registers in integer code.

Submitted by:	Pawel Worach <pawel.worach@@gmail.com>
@
text
@d25 3
@


1.54.2.1
log
@MFC: Optimize for size on pc98.
@
text
@a24 3
.if ${MACHINE} == "pc98"
CFLAGS+=	-Os
.endif
@


1.54.2.2
log
@MFC: Add support for booting from GPT-labeled disks from the BIOS.  This
includes /boot/pmbr, /boot/gptboot, and 'gpt boot'.
@
text
@a125 4
# uuid functions from libc
.PATH: ${.CURDIR}/../libc/uuid
SRCS+= uuid_equal.c uuid_is_nil.c

@


1.54.2.3
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/lib/libstand/Makefile 175651 2008-01-24 22:23:22Z jhb $
@


1.54.2.2.2.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.53
log
@Back out revision 1.51, it is wrong.  We don't litter -I's within lib
Makefiles to get headers from /usr/src vs. the standard include paths.
@
text
@d21 1
a21 1
.if ${MACHINE_ARCH} == "i386"
d23 1
@


1.52
log
@Make bzip2 support working again after bzip2 upgrade. This time commit
BZ_NO_COMPRESS support to the bzip2 sources directly (yes, this takes file
off the vendor branch, but looks like bzip2 maintainer doesn't care), so that
it will not be removed when the next upgrade is performed. Also, add a short
note on how to test bzip2 support.

Pointy hat to:  obrien

Correct comment (libz -> libbz2) and remove useless full path to zutil.h
while I am here.
@
text
@d134 1
a134 1
CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS -I${.CURDIR}/../../contrib/bzip2
@


1.51
log
@Add missed ${.CURDIR}/../../contrib/bzip2 into include search path, otherwise
old version of bzlib.h can be picked up from the /usr/include.
@
text
@d130 3
a132 1
# decompression functionality from libz
d134 15
a148 2
CFLAGS+= -DBZ_NO_STDIO -I${.CURDIR}/../../contrib/bzip2
SRCS+=	bzlib.c crctable.c decompress.c huffman.c randtable.c
d165 1
a165 1
libstand_zutil.h: ${.CURDIR}/../libz/zutil.h
@


1.50
log
@Fix libstand on amd64.  Rev 1.46 (obrien) removed the -I. that the
bzip2 support provided, and amd64 depended on.  Amd64 has a custom
${.OBJDIR}/machine symlink in it and the -I. picked this up.  Without
it, the libstand code was being compiled in 32 bit mode, but with 64 bit
machine headers.
@
text
@d132 1
a132 1
CFLAGS+= -DBZ_NO_STDIO
@


1.49
log
@Clean up an additional file.
@
text
@d28 1
a28 1
CFLAGS+=	-m32
@


1.48
log
@Don't use a patch w/in /usr/src.  Programmatically change files when needed.
@
text
@d149 1
@


1.47
log
@Re-enable support for bzip2'ed compressed filesystems.
@
text
@d138 1
a138 10
SRCS+=	adler32.c crc32.c _infback.c _inffast.c _inflate.c \
	_inftrees.c _zutil.c _zutil.h

# aargh
.for file in zutil.h
CLEANFILES+=	_${file} _${file}.orig

_${file}: ${file} ${file}.diff
	patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.[ch]}
.endfor
d141 1
d145 1
a145 1
	sed "s|zutil\.h|_zutil.h|" ${.ALLSRC} > ${.TARGET}
d148 7
@


1.46
log
@Temporarily disable support for bzip2'ed compressed filesystems, until a
maintainable why of handling them is created.
@
text
@d48 1
a48 1
.PATH:	${.CURDIR}/../libc/string
d124 1
a124 1
.PATH:	${.CURDIR}/i386
d126 1
a126 1
.PATH:	${.CURDIR}/${MACHINE_ARCH}
d131 6
a136 1
.PATH:	${.CURDIR}/../libz
d167 1
a167 1
SRCS+=	ufs.c nfs.c cd9660.c tftp.c gzipfs.c # bzipfs.c
@


1.45
log
@NODOCCOMPRESS -> NO_DOCCOMPRESS
NOINFO -> NO_INFO
NOINFOCOMPRESS -> NO_INFOCOMPRESS
NOLINT -> NO_LINT
NOPIC -> NO_PIC
NOPROFILE -> NO_PROFILE
@
text
@a129 21
# decompression functionality from libbz2
.PATH:	${.CURDIR}/../../contrib/bzip2
CFLAGS+=-I. -DBZ_NO_STDIO -DBZ_NO_COMPRESS
SRCS+=	_bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c _bzlib.h \
	_bzlib_private.h

# check your belt - ugly bzip2 stuff ahead
.for file in bzlib.c bzlib.h bzlib_private.h
CLEANFILES+=   _${file} _${file}.orig

_${file}: ${file} ${file}.diff
	patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.[ch]}
.endfor

.for file in crctable.c decompress.c huffman.c randtable.c
CLEANFILES+=    _${file}

_${file}: ${file}
	sed "s|bzlib_private\.h|_bzlib_private.h|" ${.ALLSRC} > ${.TARGET}
.endfor

d162 1
a162 1
SRCS+=	ufs.c nfs.c cd9660.c tftp.c gzipfs.c bzipfs.c
@


1.44
log
@For variables that are only checked with defined(), don't provide
any fake value.
@
text
@d10 2
a11 2
NOPROFILE=
NOPIC=
@


1.43
log
@Update libstand makefile for zlib 1.2.1.
@
text
@d10 2
a11 2
NOPROFILE=	YES
NOPIC=		YES
@


1.43.2.1
log
@MFC: For variables that are only checked with defined(), don't provide
     any fake value.
@
text
@d10 2
a11 2
NOPROFILE=
NOPIC=
@


1.43.2.2
log
@MFC: Handle bzip2/zlib changes without using patches,
by doing the work in a programmatical way.  This is an
accumulative patch of the following changes:

	Makefile: 1.46-1.53
	bzipfs.c: 1.7

as well as removal of the now unneeded files.
@
text
@d28 1
a28 1
CFLAGS+=	-m32 -I.
d48 1
a48 1
.PATH: ${.CURDIR}/../libc/string
d124 1
a124 1
.PATH: ${.CURDIR}/i386
d126 1
a126 1
.PATH: ${.CURDIR}/${MACHINE_ARCH}
d131 8
a138 5
# NOTE: to actually test this functionality after libbz2 upgrade compile
# loader(8) with LOADER_BZIP2_SUPPORT defined
.PATH: ${.CURDIR}/../../contrib/bzip2
CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS
SRCS+=	libstand_bzlib_private.h
d140 6
a145 3
.for file in bzlib.c crctable.c decompress.c huffman.c randtable.c
SRCS+=	_${file}
CLEANFILES+=	_${file}
d148 1
a148 1
	sed "s|bzlib_private\.h|libstand_bzlib_private.h|" ${.ALLSRC} > ${.TARGET}
a150 5
CLEANFILES+= libstand_bzlib_private.h
libstand_bzlib_private.h: bzlib_private.h
	sed -e 's|<stdlib.h>|"stand.h"|' \
		${.ALLSRC} > ${.TARGET}

d152 1
a152 1
.PATH: ${.CURDIR}/../libz
d154 10
a163 1
SRCS+=	adler32.c crc32.c libstand_zutil.h
a165 1
SRCS+=	_${file}
d169 1
a169 1
	sed "s|zutil\.h|libstand_zutil.h|" ${.ALLSRC} > ${.TARGET}
a171 8
# depend on stand.h being able to be included multiple times
CLEANFILES+= libstand_zutil.h
libstand_zutil.h: zutil.h
	sed -e 's|<stddef.h>|"stand.h"|' \
	    -e 's|<string.h>|"stand.h"|' \
	    -e 's|<stdlib.h>|"stand.h"|' \
	    ${.ALLSRC} > ${.TARGET}

@


1.42
log
@Removed duplicate SRCS.
@
text
@d154 2
a155 2
SRCS+=	adler32.c crc32.c _infblock.c _infcodes.c _inffast.c _inflate.c \
	_inftrees.c _infutil.c _zutil.c _zutil.h
d165 1
a165 1
.for file in infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c zutil.c
@


1.41
log
@PowerPC-conditional changes:
 - include ashldi3.c/ashrdi3.c from libc for UFS 64-bit arith
 - pull in syncicache.c from libc, and define _STANDALONE for
   loader usage
@
text
@a183 1
SRCS+=	netif.c nfs.c
@


1.40
log
@bsd.lib.mk,v 1.143 no longer uses ld(1) directly to strip
symbols from intermediate object files, so these hacks to
get AMD64 compile are no longer needed.

Tested on:	sledge.FreeBSD.org
@
text
@d25 1
a25 1
CFLAGS+=	-msoft-float
d114 6
@


1.39
log
@Add amd64 build glue
@
text
@a28 1
LDFLAGS+=	-m elf_i386_fbsd
@


1.38
log
@Renamed the loader's zipfs to gzipfs.  zipfs.c was repo-copied to gzipfs.c.
@
text
@d27 4
d41 1
d43 3
d51 1
a51 1
	${MACHINE_ARCH} == "sparc64"
d118 3
d122 1
d184 9
@


1.37
log
@Add the libz derived files, added in the previous commit, to
CLEANFILES. We were not cleaning up after ourselves.
@
text
@d166 1
a166 1
SRCS+=	ufs.c nfs.c cd9660.c tftp.c zipfs.c bzipfs.c
@


1.36
log
@Reimplement malloc/free debugging that includes the offending file:line
info.  This turned out to be rather useful on ia64 for tracking down
malloc/free problems.
Detect duplicate free()'s - otherwise these show up as a guard1 failure
and it looks like corruption instead of something simple like a second
free() where there shouldn't be.
Deal with libz using libc headers and not seeing the malloc/free stuff that
we provide in libstand.  Do similar nastiness to what is done for bzlib.

Tested on: i386, ia64 (compile, run)
@
text
@d149 2
@


1.35
log
@Added new bsd.incs.mk which handles installing of header files
via INCS.  Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files.  Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1.  Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

	kerberos5/lib/libtelnet/Makefile
	lib/libbz2/Makefile
	lib/libdevinfo/Makefile
	lib/libform/Makefile
	lib/libisc/Makefile
	lib/libmenu/Makefile
	lib/libmilter/Makefile
	lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD.  Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".
@
text
@d15 2
a16 1
CFLAGS+= -ffreestanding
d29 1
a29 1
SRCS+=	__main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
d136 16
a151 3
CFLAGS+=-DHAVE_MEMCPY
SRCS+=	adler32.c crc32.c infblock.c infcodes.c inffast.c inflate.c \
	inftrees.c infutil.c zutil.c 
@


1.34
log
@Use -ffreestanding.  It is REQUIRED by GCC 3.1 on all architectures.
I don't like putting this very-GCC centric option here; but no one as given
a better idea of handling it.

Reviewed by:	jhb
@
text
@d12 1
a153 4

beforeinstall:
	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/stand.h \
		${DESTDIR}/usr/include
@


1.33
log
@Break the sparc64 build.  I expect those that complained about this commit
to fix the sparc64 case to their liking.
@
text
@d14 2
a104 2
# XXX should be global
CFLAGS+= -ffreestanding
@


1.32
log
@sparc64 grew _setjmp/_longjmp.
@
text
@a13 2
CFLAGS+=	-ffreestanding

@


1.31
log
@Use -ffreestanding.
@
text
@a108 1
.if ${MACHINE_ARCH} != "sparc64"
a111 1
.endif
@


1.30
log
@Add -ffreestanding to CFLAGS for ia64.  This should probably be global
like on the kernel.
@
text
@a1 1
#
d14 1
a14 2
# Mostly OK, some of the libc imports are a bit noisy
CFLAGS+=	-Wall
@


1.29
log
@(forced)

Splitfs is subject of:

MFC after:	2 weeks
@
text
@d107 2
@


1.28
log
@Add splitfs vfs layer into libstand, which allows loading big kernels and
modules split across several physical medias. Following is how it works:

The splitfs code, when asked to open "foo" looks for a file "foo.split"
which is a text file containing a list of filenames and media names, e.g.

	foo.aa "Kernel floppy 1"
	foo.ab "Kernel floppy 2"
	foo.ac "Kernel and modules floppy"

For each file segment, the process is:

- try to open the file
- prompt "Insert the disk labelled <whatever> and press any key..."
- try to open the file
- return error if file could not be located

RE team is free to use this feature in the upcoming 5.0-DP1.

Reviewed by:	msmith, dcs
@
text
@@


1.27
log
@Add the following functions/macros to support byte order conversions and
device drivers for bus system with other endinesses than the CPU (using
interfaces compatible to NetBSD):

- bwap16() and bswap32(). These have optimized implementations on some
  architectures; for those that don't, there exist generic implementations.
- macros to convert from a certain byte order to host byte order and vice
  versa, using a naming scheme like le16toh(), htole16().
  These are implemented using the bswap functions.
- stream bus space access functions, which do not perform a byte order
  conversion (while the normal access functions would if the bus endianess
  differs from the CPU endianess).

htons(), htonl(), ntohs() and ntohl() are implemented using the new
functions above for kernel usage. None of the above interfaces is currently
exported to user land.

Make use of the new functions in a few places where local implementations
of the same functionality existed.

Reviewed by:	mike, bde
Tested on alpha by:	mike
@
text
@d156 1
@


1.26
log
@Fixed world breakage in previous commit.  The generated headers are in
the current directory which is rarely ${.CURDIR}.
@
text
@d36 4
a56 3
.PATH: ${.CURDIR}/../libc/alpha/net
SRCS+= htons.S ntohs.S htonl.S ntohl.S

a102 3

.PATH: ${.CURDIR}/../libc/ia64/net
SRCS+= htons.S ntohs.S htonl.S ntohl.S
@


1.25
log
@Complete bzip2-1.0.2 import.

MFC in:		14 days
@
text
@d119 1
a119 1
CFLAGS+=-I${.CURDIR} -DBZ_NO_STDIO -DBZ_NO_COMPRESS
@


1.24
log
@Remove the -I../libc/${MACHINE_ARCH} that was there solely for
the #include "DEFS.h" that was only used on i386 (which has been fixed).
@
text
@d119 3
a121 3
CFLAGS+=-I${.CURDIR}/../../contrib/bzip2 -DBZ_NO_STDIO -DBZ_NO_COMPRESS
SRCS+=	_bzlib.c crctable.c decompress.c huffman.c randtable.c
CLEANFILES+=   _bzlib.c _bzlib.c.orig
d123 14
a136 2
_bzlib.c: bzlib.c bzlib.c.diff
	patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.c}
@


1.23
log
@Make this Makefile suitable for sparc64.
@
text
@a116 3
# really only required for i386
CFLAGS+=-I${.CURDIR}/../libc/${MACHINE_ARCH}

@


1.22
log
@Add support for loading bzip2-compressed filesystems. Among other things
this would allow to load bzip2-compressed kernels/modules from the loader(8)
(support for that will be committer separately).

MFC after:	1 month
@
text
@a27 1

d38 2
a39 1
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc"
d111 1
d115 2
@


1.21
log
@MAN[1-9] -> MAN.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.20 2001/03/06 16:11:36 dfr Exp $
d117 9
d143 1
a143 1
SRCS+=	ufs.c nfs.c cd9660.c tftp.c zipfs.c
@


1.20
log
@A quick and dirty port of libstand to ia64.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.19 2000/11/05 14:55:08 ps Exp $
d13 1
a13 1
MAN3=		libstand.3
@


1.19
log
@Honor the ip address given in the root-path dhcp option.

PR:	21743
Submitted by:	Brian Candler <B.Candler@@pobox.com>
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.18 2000/10/10 13:22:41 obrien Exp $
d94 15
@


1.18
log
@Inital PowerPC loader build support.

Submitted by:	Benno Rice <benno@@jeamland.net>
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.17 2000/08/11 23:18:37 peter Exp $
a95 4
# network support from libc
.PATH:	${.CURDIR}/../libc/net
SRCS+=	inet_ntoa.c inet_addr.c

d113 1
a113 1
SRCS+=	arp.c ether.c in_cksum.c net.c udp.c netif.c rpc.c
@


1.17
log
@Add the -mpreferred-stack-boundary=2 option to reduce code bloat.  We
compile the kernel with this.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.16 2000/04/29 20:47:07 jlemon Exp $
d24 3
d39 1
a39 1
.if ${MACHINE_ARCH} == "i386"
@


1.16
log
@Add a readdir function to the loader fsops vector, and implement the
functionality for some of the filesystesms.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.15 2000/04/08 01:17:59 ps Exp $
d21 4
@


1.15
log
@Break out sendudp and readudp from net.c.  This is for PXE, so it
can use its own UDP interface.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.14 1999/08/28 00:05:29 peter Exp $
d107 1
a107 1
	fstat.c close.c lseek.c open.c read.c write.c
d118 1
a118 1
SRCS+=	dosfs.c
@


1.14
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
d110 1
a110 1
SRCS+=	arp.c ether.c in_cksum.c net.c netif.c rpc.c
@


1.14.2.1
log
@MFC: sync up loader with current, including PXE.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.14 1999/08/28 00:05:29 peter Exp $
d110 1
a110 1
SRCS+=	arp.c ether.c in_cksum.c net.c udp.c netif.c rpc.c
@


1.14.2.2
log
@MFC: readdir support for libstand
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.14.2.1 2000/04/15 03:09:28 ps Exp $
d107 1
a107 1
	fstat.c close.c lseek.c open.c read.c write.c readdir.c
d118 1
a118 1
SRCS+=	dosfs.c ext2fs.c
@


1.14.2.3
log
@MFC: Honor the ip address given in the root-path dhcp option.

PR:		21743
@
text
@d1 1
a1 1
# $FreeBSD$
d89 4
d110 1
a110 1
SRCS+=	arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c
@


1.14.2.4
log
@MFC: Add the -mpreferred-stack-boundary=2 option to reduce code bloat.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.14.2.3 2000/11/21 12:04:47 ps Exp $
a20 4
.if ${MACHINE_ARCH} == "i386"
CFLAGS+=	-mpreferred-stack-boundary=2
.endif

@


1.14.2.5
log
@MFC: MAN[1-9] -> MAN.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libstand/Makefile,v 1.14.2.4 2000/12/28 12:04:03 ps Exp $
d13 1
a13 1
MAN=		libstand.3
@


1.14.2.6
log
@MFC: optional support for loading bzip2-compressed kernels and modules.
@
text
@d1 1
a1 1
# $FreeBSD$
a98 9
# decompression functionality from libbz2
.PATH:	${.CURDIR}/../../contrib/bzip2
CFLAGS+=-I${.CURDIR}/../../contrib/bzip2 -DBZ_NO_STDIO -DBZ_NO_COMPRESS
SRCS+=	_bzlib.c crctable.c decompress.c huffman.c randtable.c
CLEANFILES+=   _bzlib.c _bzlib.c.orig

_bzlib.c: bzlib.c bzlib.c.diff
	patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.c}

d116 1
a116 1
SRCS+=	ufs.c nfs.c cd9660.c tftp.c zipfs.c bzipfs.c
@


1.14.2.6.2.1
log
@MFC: update bzip2 to version 1.0.2 to fix insecure permissions during
     symlink dereferencing and a race condition while creating new files.
@
text
@d101 3
a103 3
CFLAGS+=-I. -DBZ_NO_STDIO -DBZ_NO_COMPRESS
SRCS+=	_bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c _bzlib.h \
	_bzlib_private.h
d105 2
a106 14
# check your belt - ugly bzip2 stuff ahead
.for file in bzlib.c bzlib.h bzlib_private.h
CLEANFILES+=   _${file} _${file}.orig

_${file}: ${file} ${file}.diff
	patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.[ch]}
.endfor

.for file in crctable.c decompress.c huffman.c randtable.c
CLEANFILES+=    _${file}

_${file}: ${file}
	sed "s|bzlib_private\.h|_bzlib_private.h|" ${.ALLSRC} > ${.TARGET}
.endfor
@


1.14.2.7
log
@MFC: update bzip2 to version 1.0.2.
@
text
@d101 3
a103 3
CFLAGS+=-I${.CURDIR} -DBZ_NO_STDIO -DBZ_NO_COMPRESS
SRCS+=	_bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c _bzlib.h \
	_bzlib_private.h
d105 2
a106 14
# check your belt - ugly bzip2 stuff ahead
.for file in bzlib.c bzlib.h bzlib_private.h
CLEANFILES+=   _${file} _${file}.orig

_${file}: ${file} ${file}.diff
	patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.[ch]}
.endfor

.for file in crctable.c decompress.c huffman.c randtable.c
CLEANFILES+=    _${file}

_${file}: ${file}
	sed "s|bzlib_private\.h|_bzlib_private.h|" ${.ALLSRC} > ${.TARGET}
.endfor
@


1.14.2.8
log
@MFC: rev.1.26 fix world breakage.
@
text
@d101 1
a101 1
CFLAGS+=-I. -DBZ_NO_STDIO -DBZ_NO_COMPRESS
@


1.14.2.9
log
@MFC: allow loader(8) load kernels/modules split across several medias.
@
text
@a139 1
SRCS+=	splitfs.c
@


1.14.2.10
log
@MFC: bsd.incs.mk support and assorted header fixes:

Install sys/<arch>/include/pc/*.h to /usr/include/machine/pc/.

Install sys/netatm/*/*.h to /usr/include/netatm/*/.

Don't install compatibility symlinks for <machine/soundcard.h>
and <machine/joystick.h>.

Don't install IPFILTER headers.  Userland utilities fetch them
directly, and they were not visible in the SHARED=symlinks case.

Resurrect SHARED=symlinks in Makefile.inc1.

PR:		docs/29534, bin/28002
@
text
@a12 1
INCS=		stand.h
d141 4
@


1.14.2.11
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/4/lib/libstand/Makefile 100501 2002-07-22 14:21:52Z ru $
@


1.13
log
@Don't build with -g.  The a.out egcs can't handle it at the moment.
This seems to have snuck back into the Makefile in an unrelated
commit (rev. 1.8).
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.12 1999/02/12 17:20:10 dcs Exp $
@


1.12
log
@Copy _setjmp.S from libc in preparation for loader-specific version.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.11 1998/11/04 12:49:31 peter Exp $
d16 1
a16 1
CFLAGS+=	-Wall -g
@


1.11
log
@Remove stray .endif from previous commit  (I hope this is right)
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.10 1998/11/04 07:39:53 msmith Exp $
d94 1
a94 1
.PATH:	${.CURDIR}/../libc/${MACHINE_ARCH}/gen
@


1.11.2.1
log
@MFC. Remove setjmp/longjmp() dependency on floatiing point, on i386.

Also, mfc a modification to the file pager, to make it a little bit more
useful.

Approved by:	jkh
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.12 1999/02/12 17:20:10 dcs Exp $
d94 1
a94 1
.PATH:	${.CURDIR}/${MACHINE_ARCH}
@


1.11.2.2
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.10
log
@Well I never.  Seems like _setjmp()/_longjmp() are just what the doctor
ordered.  This brings the Alpha back to parity, and should bring us
BootForth on both platforms.

Submitted by:	John Birrell (jb@@freebsd.org)
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.9 1998/11/04 00:32:08 msmith Exp $
a97 1
.endif
@


1.9
log
@Don't try to build (nonexistent) Alpha setjmp until we have one.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.8 1998/11/04 00:23:11 msmith Exp $
d93 4
a96 3
# setjmp/longjmp
.if ${MACHINE_ARCH} == "i386"
.PATH:	${.CURDIR}/${MACHINE_ARCH}
a97 1
SRCS+=	setjmp.S
@


1.8
log
@Move setjmp/longjmp implementations here from libc; no signal handling
in libstand, only for i386 until I locate an alpha setjmp/longjmp.

Minimal 64-bit gcc integer support for i386.  This is kinda nasty, and
should be revisited once we decide whether the bootblocks need
quad arithmetic.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.7 1998/11/01 09:31:07 msmith Exp $
d94 1
d98 1
@


1.7
log
@Add:
	assert()
	setjmp()/longjmp()
	vsprintf()
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.6 1998/10/06 19:23:57 msmith Exp $
d16 1
a16 1
CFLAGS+=	-Wall #-g
d34 1
a34 1
        memcpy.c memmove.c memset.c rindex.c strcat.c strchr.c \
d94 1
a94 1
.PATH:	${.CURDIR}/../libc/${MACHINE_ARCH}/gen
@


1.6
log
@Enable the DOS filesystem.  This allows reading from various DOS filesystems
(FAT12/16/32, VFAT).

Make a private copy of strcasecmp, as the "real" one uses the system ctype
header, which introduces locale poisoning.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.5 1998/10/04 08:10:29 msmith Exp $
d23 3
a25 3
SRCS+=	__main.c bcd.c bswap.c environment.c getopt.c gets.c globals.c \
	pager.c printf.c strdup.c strerror.c strtol.c random.c sbrk.c \
	twiddle.c zalloc.c zalloc_malloc.c
d92 5
@


1.5
log
@Don't build with -g.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.4 1998/09/26 01:42:39 msmith Exp $
d27 2
d34 1
a34 1
        memcpy.c memmove.c memset.c rindex.c strcasecmp.c strcat.c strchr.c \
d41 1
a41 1
	memcpy.S memmove.S memset.c rindex.c strcasecmp.c strcat.c strchr.c \
d112 1
a112 2
# needs "open directory" support
#SRCS+=	dosfs.c
@


1.4
log
@Replace the old and extremely icky Mach/NetBSD allocator with a similarly
compact and much better one donated by Matt Dillon.  Implement a simple
sbrk() which uses the existing setheap() api.

Remove the custom allocator from the UFS code.  It wasn't working quite
right, and it shouldn't be needed with the new allocator.

Fix a serious problem with changing the value of already-existent
environment variables.  Don't attempt to modify the supposedly-const
argument to putenv()

Fix an off-by-one sizing error in the zipfs code detected by the new
allocator.

Submitted by:	zmalloc from Matt Dillon <dillon@@backplane.com>
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.3 1998/09/15 02:30:22 msmith Exp $
d16 1
a16 1
CFLAGS+=	-Wall -g
@


1.3
log
@Remove (wrong) OBJFORMAT setting.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.2 1998/08/20 08:23:12 msmith Exp $
d16 1
a16 1
CFLAGS+=	-Wall
d23 4
a26 3
SRCS+=	__main.c alloc.c bcd.c bswap.c environment.c getopt.c gets.c \
	globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \
	twiddle.c
@


1.2
log
@Install libstand header <stand.h> and manpage (libstand.3)
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.1.1.1 1998/08/20 08:19:55 msmith Exp $
a16 5

# i386 apps are loaded by an a.out only loader
.if ${MACHINE_ARCH} == "i386"
OBJFORMAT=	aout
.endif
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
# $Id$
d13 1
d116 4
@


1.1.1.1
log
@This is libstand; a support library for standalone executables (eg. bootstrap
modules).
Obtained from: NetBSD, with some architectural changes and many additions.
@
text
@@
