head	1.2;
access;
symbols
	v4-1-8:1.1.1.6
	RELENG_3_5_0_RELEASE:1.1.1.4
	RELENG_3_4_0_RELEASE:1.1.1.4
	v3_3_3:1.1.1.5
	RELENG_3_3_0_RELEASE:1.1.1.4
	RELENG_3_2_PAO:1.1.1.4.0.4
	RELENG_3_2_PAO_BP:1.1.1.4
	RELENG_3_2_0_RELEASE:1.1.1.4
	RELENG_3_1_0_RELEASE:1.1.1.4
	RELENG_3:1.1.1.4.0.2
	RELENG_3_BP:1.1.1.4
	RELENG_3_0_0_RELEASE:1.1.1.4
	v3_2_7:1.1.1.4
	v3_2_3:1.1.1.3
	v3-2-a7:1.1.1.3
	V3_2_A4:1.1.1.2
	ipfilter3_1_8:1.1.1.1
	DARRENR:1.1.1
	ipfilter3_1_7:1.1.1.1
	DARRENREED:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2000.02.10.05.08.14;	author peter;	state dead;
branches;
next	1.1;

1.1
date	97.02.09.22.49.48;	author darrenr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	97.02.09.22.49.48;	author darrenr;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	97.04.03.10.09.59;	author darrenr;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	97.05.25.15.44.17;	author darrenr;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	98.06.20.18.28.01;	author peter;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	99.11.08.20.50.09;	author guido;	state Exp;
branches;
next	1.1.1.6;

1.1.1.6
date	2005.04.25.17.30.03;	author darrenr;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Remove files not in the v3_3_8 import.
@
text
@#! /bin/sh
# $Id: buildsunos,v 2.0.1.1 1997/01/09 15:14:43 darrenr Exp $
:
rev=`uname -r | sed -e 's/^\([^\.]*\)\..*/\1/'`
cpu=`uname -m`
if [ $rev = 5 ] ; then
	solrev=`uname -r | sed -e 's/^\([0-9]*\)\.\([0-9]*\)$/\2/'`
	mkdir -p SunOS5/${cpu}
	/bin/rm -f SunOS5/${cpu}/Makefile
	/bin/rm -f SunOS5/${cpu}/Makefile.ipsend
	ln -s ../Makefile SunOS5/${cpu}/Makefile
	ln -s ../Makefile.ipsend SunOS5/${cpu}/Makefile.ipsend
fi
if [ $cpu = i86pc ] ; then
	make ${1+"$@@"} sunos5x86 SOLARIS2="-DSOLARIS2=$solrev" DCPU=${cpu}
	exit $?
fi
if [ x$solrev = x ] ; then
	make ${1+"$@@"} sunos$rev "ARCH=`uname -m`"
	exit $?
fi
make ${1+"$@@"} sunos$rev SOLARIS2="-DSOLARIS2=$solrev" DCPU=${cpu}
exit $?
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import IP Filter v3.1.7 into FreeBSD tree
@
text
@@


1.1.1.2
log
@Import IP Filter version 3.2alpha4 to bring in working LKM for 2.2
@
text
@d2 1
a2 1
# $Id: buildsunos,v 2.0.2.3 1997/03/30 15:37:34 darrenr Exp $
d15 1
a15 1
	make ${1+"$@@"} sunos5x86 SOLARIS2="-DSOLARIS2=$solrev" CPU=${cpu}
d22 1
a22 1
make ${1+"$@@"} sunos$rev SOLARIS2="-DSOLARIS2=$solrev" CPU=${cpu}
@


1.1.1.3
log
@Import version 3.2alpha7
@
text
@d2 1
a2 1
# $Id: buildsunos,v 2.0.2.4 1997/05/24 07:32:46 darrenr Exp $
d7 1
a7 1
	solrev=`uname -r | sh -c 'IFS=. read j n x; echo $n'`
@


1.1.1.4
log
@Import trimmed version of ipfilter 3.2.7.

Obtained from:  Darren Reed via http://cheops.anu.edu.au/~avalon/
@
text
@d2 1
a2 1
# $Id: buildsunos,v 2.0.2.4.2.1 1998/05/21 14:46:04 darrenr Exp $
a5 1
cpudir=${cpu}-`uname -r`
d8 5
a12 5
	mkdir -p SunOS5/${cpudir}
	/bin/rm -f SunOS5/${cpudir}/Makefile
	/bin/rm -f SunOS5/${cpudir}/Makefile.ipsend
	ln -s ../Makefile SunOS5/${cpudir}/Makefile
	ln -s ../Makefile.ipsend SunOS5/${cpudir}/Makefile.ipsend
d15 1
a15 1
	make ${1+"$@@"} sunos5x86 SOLARIS2="-DSOLARIS2=$solrev" CPU=${cpu} CPUDIR=${cpudir}
d22 1
a22 1
make ${1+"$@@"} sunos$rev SOLARIS2="-DSOLARIS2=$solrev" CPU=${cpu} CPUDIR=${cpudir}
@


1.1.1.5
log
@Import of ipfilter 3.3.3  in anticipation of its revival.
More to come in the next days.
@
text
@d2 1
a2 5
if [ ! -f netinet/done ] ; then
	echo "Do NOT run this script directly, do 'make solaris'!"
	exit 1
fi
# $Id: buildsunos,v 2.1.2.1 1999/08/08 13:55:20 darrenr Exp $
d5 2
a6 3
if [ -d /usr/ccs/bin ] ; then
	PATH=/usr/ccs/bin:${PATH}
fi
a7 2
	cpu=`uname -p`
	cpudir=${cpu}-`uname -r`
d9 1
a9 3
	if [ ! -d SunOS5/${cpudir} -a ! -h  SunOS5/${cpudir} ] ; then
		mkdir -p SunOS5/${cpudir}
	fi
d12 2
a13 18
	ln -s `pwd`/SunOS5/Makefile SunOS5/${cpudir}/Makefile
	ln -s `pwd`/SunOS5/Makefile.ipsend SunOS5/${cpudir}/Makefile.ipsend
	ARCHINC=
	XARCH=
	if [ -d /opt/SUNWspro/bin ] ; then
		CC="/opt/SUNWspro/bin/cc  ${CFL}"
		export CC
		/bin/optisa sparcv9 >/dev/null 2>&1
		if [ $? -eq 0 ] ; then
			ARCHINC="-I/usr/include/v9"
			XARCH="-xarch=v9 -xchip=ultra -dalign -xcode=abs32"
		fi
	else
		CC=gcc
	fi
else
	cpu=`uname -m`
	cpudir=${cpu}-`uname -r`
d15 2
a16 2
if [ $cpu = i386 ] ; then
	make ${1+"$@@"} sunos5x86 SOLARIS2="-DSOLARIS2=$solrev" CPU= CPUDIR=${cpudir} CC="$CC $XARCH" XARCH="$XARCH" ARCHINC="$ARCHINC"
d23 1
a23 1
make ${1+"$@@"} sunos$rev SOLARIS2="-DSOLARIS2=$solrev" CPU= CPUDIR=${cpudir} CC="$CC $XARCH" XARCH="$XARCH" ARCHINC="$ARCHINC"
@


1.1.1.6
log
@import ipfilter 4.1.8 into the vendor branch
@
text
@d6 1
a6 1
# Id: buildsunos,v 2.20 2004/02/07 18:08:46 darrenr Exp
a10 1
	export PATH
a11 1

a12 15
	if [ ! -d ../pfil ] ; then
		cat << __EOF__
pfil directory in .. missing, please download pfil package and extract that
into the parent directory.

See INSTALL.Sol2 for more instructions.
__EOF__
		exit 1
	fi
	#
	# /usr/ucb/cc will not work
	#
	PATH=`echo $PATH | sed -e s:/usr/ucb::g -e s/::/:/g`
	export PATH

d23 9
a31 14

	#
	# Default C compiler is "cc", override on make commandline
	#
	if [ "x$CC" = "x" ] ; then
		if echo '' | cc -E - >/dev/null 2>&1 ; then
			CC=cc
		else
			if echo '' | gcc -E - >/dev/null 2>&1 ; then
				CC=gcc
			else
				echo "No working compiler found"
				exit 1
			fi
d33 1
a33 3
	fi
	v=`echo '__GNUC__' | 2>&1 ${CC} -E - | 2>&1 sed -ne '/^[0-9]* *$/p'`
	if [ x$v != x ] ; then
a35 78

	case "$CC" in
	*gcc*)	# gcc
		XARCH32=""
		XARCH64="-m64 -mcmodel=medlow"
		;;
	*)	# Sun C
		XARCH32="-Xa -xildoff"
		XARCH64="$XARCH32 -xarch=v9 -xchip=ultra -dalign -xcode=abs32"
		;;
	esac

	export CC

	ISABITS=32

	OBJ32=sparcv7
	ARCHINC32=
	OBJ64=sparcv9
	ARCHINC64="-I/usr/include/v9"

	if [ $solrev -ge 7 ] && /bin/optisa sparcv8plus > /dev/null
	then
		# We run Solaris 7+ on 64 bit capable hardware.
		BUILDBOTH=true
	else
		BUILDBOTH=false
		OBJ32=.
	fi

	if $BUILDBOTH
	then
		echo Testing compiler $CC for 64 bit object file generation.
		t=conftest$$.c
		trap 'rm -f $t 32.out 64.out; exit 1' 0 1 2 3 15
		cat > $t <<-EOF
		#include <stdio.h>
		int main(void)
		{
			printf("%ld\n", (long) sizeof(long));
			exit(0);
		}
		EOF

		# Is it perhaps a 64 bit only compiler?
		if $CC $XARCH32 $t -o 32.out >/dev/null 2>&1 &&
		    [ "`./32.out`" = 4 ]
		then :; else
			echo $CC $XARCH32 cannot create 32 bit executables. 1>&2
			exit 1
		fi
		if $CC $XARCH64 $t -o 64.out >/dev/null 2>&1 &&
		    { out64=`./64.out 2>/dev/null` ;
		    [ "$out64" = 8 -o "`isainfo -b`" = 32 -a "$out64" = "" ]
		    }
		then
			echo "found 32/64 bit compiler" 1>&2
			CC64=true
		else
			CC64=false
		fi
		rm -f $t 32.out 64.out
		trap 0 1 2 3 15
	fi

	# If we're running 64 bit, we *must* build 64 bit.
	if ([ "`isainfo -b`" = 64 ]) 2>/dev/null ; then
		if $CC64 ; then :; else
			echo "No 64 bit capable compiler was found" 1>&2
			exit 1
		fi
		ISABITS="32 64"
	elif $BUILDBOTH && $CC64
	then
		ISABITS="32 64"
	else
		OBJ32=.
	fi
a39 4

# Default $MAKE to make
: ${MAKE:=make}

d41 1
a41 4
	if [ -n "$BPFILTER" ] ; then
		BPF="BPFILTER=./$BPFILTER"
	fi
	$MAKE $MAKEFLAGS ${1+"$@@"} sunos5x86 SOLARIS2="-DSOLARIS2=$solrev" CPU= CPUDIR=${cpudir} CC="$CC $XARCH32" XARCH="$XARCH32" ARCHINC="$ARCHINC32" BITS=32 OBJ=. $BPF
d45 1
a45 1
	make ${1+"$@@"} sunos$rev "TOP=.." "ARCH=`uname -m`"
d48 2
a49 12
for b in $ISABITS
do
    echo build $b bit binaries.
    for v in OBJ ARCHINC XARCH
    do
	eval $v=\"\$$v$b\"
    done
    if [ -n "$BPFILTER" ] ; then
	BPF="BPFILTER=$OBJ/$BPFILTER"
    fi
    $MAKE $MAKEFLAGS ${1+"$@@"} sunos$rev SOLARIS2="-DSOLARIS2=$solrev" CPU= CPUDIR=${cpudir} CC="$CC $XARCH" XARCH="$XARCH" ARCHINC="$ARCHINC" BITS=$b OBJ=$OBJ $BPF || exit $?
done
@

